以下定义我的枚举参数:
%----------------------------------------------------------------------------------
% Enumeration Parameters
%----------------------------------------------------------------------------------
\setlist[enumerate]{labelsep=*}
\setlist[enumerate,1]{labelindent=1em, itemsep=12pt, label=\bfseries\arabic*., ref={\bfseries\arabic*.}}
\setlist[enumerate,2]{leftmargin=*, itemsep=10pt, label={\bfseries(\emph{\alph*})},ref={\bfseries\theenumi(\emph{\alph*})}}
\setlist[enumerate,3]{leftmargin=*, topsep=10pt, itemsep=10pt, label={\bfseries(\emph{\roman*})}, ref={\bfseries\theenumii(\emph{\roman*})}}
我感兴趣的是提出一个动态引用设置,它将引用枚举环境之外的正常情况,如下面 MWE 中所示
Normal referencing: \ref{st1} and \ref{st2} and \ref{st3} work fine.
但在枚举中引用也不同。图片解释了我所寻找的内容。
以下是显示该问题的 MWE:
\documentclass[letterpaper]{article}
\usepackage{enumitem}
%----------------------------------------------------------------------------------
% Enumeration Parameters
%----------------------------------------------------------------------------------
\setlist[enumerate]{labelsep=*}
\setlist[enumerate,1]{labelindent=1em, itemsep=12pt, label=\bfseries\arabic*., ref={\bfseries\arabic*.}}
\setlist[enumerate,2]{leftmargin=*, itemsep=10pt, label={\bfseries(\emph{\alph*})},ref={\bfseries\theenumi(\emph{\alph*})}}
\setlist[enumerate,3]{leftmargin=*, topsep=10pt, itemsep=10pt, label={\bfseries(\emph{\roman*})}, ref={\bfseries\theenumii(\emph{\roman*})}}
\begin{document}
\noindent
Here is a MWE of the list set-up above.
\begin{enumerate}
\item Sample Text 1 \label{st1}. With level 2 referencing the same thing appears: \ref{st2}. I would prefer just \textbf{(\textit{a})} unless I specify a particular item in level 3 then something like \textbf{(\emph{a})(\emph{i})} would be better.
\begin{enumerate}
\item Sample Text 2 \label{st2} with reference level 3 is not appealing as shown here: \ref{st3}. I would prefer something like \textbf{(\emph{i})}.
\begin{enumerate}
\item Sample Text 3 \label{st3}
\end{enumerate}
\end{enumerate}
\end{enumerate}
Normal referencing: \ref{st1} and \ref{st2} and \ref{st3} work fine.
\end{document}
任何帮助将不胜感激。