轻松转到枚举列表项的好方法

轻松转到枚举列表项的好方法

假设我有一些简单的枚举列表。

\begin{enumerate}
\item arbitrary text
\item arbitrary text
...
\end{enumerate}

有没有一种优雅的方法来标记每个项目的枚举号,以便在我想编辑时更容易找到?(在 .tex 文件编译之前)

显而易见的方法是手动方式(注释标记)并通过 CTRL+F 或类似方式在我的编辑器中搜索注释模式。

\begin{enumerate}
\item arbitrary text % [Solution 1]
\item arbitrary text % [Solution 2]
...
\end{enumerate}

但这要求我自己跟踪每个项目,并且如果我执行 \setcounter{enumi}{(number that isn't continuation to the last list item number)},我需要手动在脑海中跟踪该特定枚举的当前数字,以便用搜索标签对其进行标记,然后我可以在编辑器中按 CTRL+F 键。

清晰示例

\begin{enumerate}
\item arbitrary text % [Solution 1]
\end{enumerate}

\begin{enumerate}
\setcounter{enumi}{50}
\item arbitrary text % [Solution 51] ... clunky
\end{enumerate}

假设每个项目下的文本很长,如果我在手动标记项目时在任何地方计数错误,我需要从最后一个位置开始重新计数,这并不理想。我正在寻找一个命令或一些“预处理器”?可以在 .tex 文件本身中处理此枚举项目标记。

相关内容