
我已經安裝了附加元件圖表在 WinEdt 中,它允許我在 WinEdt 樹中收集表格和圖形標題。
我也希望能夠收集演算法說明。
具有以下 MWE
\documentclass{article}
\usepackage{algorithm}
\begin{document}
\begin{table}[h]
\caption{Table test}
\end{table}
\begin{figure}[h]
\caption{Figure test}
\end{figure}
\begin{algorithm}[h]
\caption{Algorithm test}
\end{algorithm}
\end{document}
WinEdt 的樹顯示
有沒有辦法顯示演算法的分支?
答案1
更新 (2016-04-10)
透過安裝附加元件花車您將能夠收集演算法標題。
原答案
對的,這是可能的。按著這些次序:
顯示“選項介面”(選項->選項介面)
在「選項介面」中,雙擊「樹」項目(
Tree.ini
開啟)由於您安裝了附加元件“圖形和表格”,因此您應該有一行
END="Tables-TeX"
之後,插入以下行
BRANCH="Algorithms-TeX" BRANCH_CAPTION="Algorithms (#)" // Change Mode from TeX to ? to disable this item BRANCH_MODE_FILTER="TeX|DTX;INS;STY;AUX" BRANCH_ICON="CodeSample" BRANCH_SORTED=0 BRANCH_CASE_SENSITIVE=1 BRANCH_IGNORE_COMMENTS=1 BRANCH_IGNORE_VERBATIM=1 BRANCH_EXPANDED=0 ITEM="\begin{algorithm}?\end{algorithm}" ALT="\begin{algorithm*}?\end{algorithm*}" ALT="\begin{procedure}?\end{procedure}" ALT="\begin{procedure*}?\end{procedure*}" ALT="\begin{function}?\end{function}" ALT="\begin{function*}?\end{function*}" ALT="\begin{algorithm2e}?\end{algorithm2e}" ALT="\begin{algorithm2e*}?\end{algorithm2e*}" MODE_FILTER="TeX" CASE_SENSITIVE=1 BEGINNING_OF_LINE_ONLY=1 CURRENT_DOCUMENT_ONLY=1 ALL_OPENED_DOCUMENTS=0 COMPLETE_PROJECT_TREE=1 ICON="FlagPurple" LEVEL=0 CAPTION="%[!|Exe('%b\Macros\Gather\FigTab.edt');|];%-0" MAX_LINE_SPAN=99 ON_CLICK_MACRO="TreeTrack(2,1);" ON_DBL_CLICK_MACRO="TreeTrack(2,2);" ACTION="Find" IMAGE="Find" MACRO="TreeTrack(2);" SUBSTITUTION="\label{*}" SUB_FIND="\\label\{*\}" SUB_REPLACE="" SUB_REG_EX=1 SUB_CASE_SENSITIVE=1 SUBSTITUTION=" " SUB_FIND=" +{ }" SUB_REPLACE=" " SUB_REG_EX=1 SUB_CASE_SENSITIVE=1 SUBSTITUTION="\dots" SUB_FIND="\dots" SUB_REPLACE="..." SUB_REG_EX=0 SUB_CASE_SENSITIVE=1 SUBSTITUTION="\ldots" SUB_FIND="\ldots" SUB_REPLACE="..." SUB_REG_EX=0 SUB_CASE_SENSITIVE=1 END="\begin{algorithm}?\end{algorithm}" END="Algorithms-TeX"
按Shift+Ctrl+F9重新載入檔案。
現在,您將能夠收集由algorithm
和algorithm2e
包定義的以下環境的演算法說明:
algorithm
algorithm*
procedure
procedure*
function
function*
algorithm2e
algorithm2e*
使用 MWE,您將得到以下結果: