2

The following defines my enumeration parameters:

%----------------------------------------------------------------------------------
%                               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*})}}

What I am interested is in coming up with a dynamic referencing set-up that will reference normal outside the enumerate environment as shown in the MWE below in the line

Normal referencing: \ref{st1} and \ref{st2} and \ref{st3} work fine.

but also references differently within the enumerate. The image explains what am looking for.

enter image description here

Here is MWE that shows the issue:

\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}

Any help would be greatly appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.