I'm using enumitem
and trying to label items with only their current level, but reference them with their full "absolute" value. Here's a sample document:
\documentclass[letterpaper]{article}
\usepackage{enumitem}
\newlist{parin}{enumerate}{4}
\setlist[parin,1]{label=\arabic*.,ref=\arabic*,leftmargin=*}
\setlist[parin,2]{label=(\alph*),ref=\theenumi\alph*,leftmargin=*}
\setlist[parin,3]{label=(\arabic*),ref=\theenumii\arabic*,leftmargin=*}
\setlist[parin,4]{label=(\roman*),ref=\theenumiii\roman*,leftmargin=*}
\begin{document}
\begin{parin}
\item Foo
\label{foo}
\begin{parin}
\item Bar
\label{bar}
\begin{parin}
\item Baz
\label{baz}
\begin{parin}
\item Label Me
\label{labelme}
\end{parin}
\end{parin}
\end{parin}
\end{parin}
\ref{foo}
\ref{bar}
\ref{baz}
\ref{labelme}
\end{document}
The expected output is for the references to appear as:
1 1a 1a1 1a1i
But instead, they appear as:
1 0a 1 i
Would love some guidance, thanks!