There seems to be a problem when combining the enumitem and nameref package. With the code below I get the error:
! Infinite glue shrinkage found in a paragraph.
I already checked the package documentation but neither package mentions the other as problematic in combination.
Removing the enumitem package gets rid of the error, but I need that package elsewhere in the document. This also shows the result that I am after, i.e. a cross-reference with the item label "Label".
Code:
\documentclass{article}
\usepackage{enumitem}
\usepackage{nameref}
\begin{document}
\begin{description}
\item [Label\label{Ref}] Text
\end{description}
\begin{itemize}
\item \nameref{Ref}
\end{itemize}
\end{document}
\item [Label\label{Ref}]
does what you think it does. Changing\nameref
to\ref
(to make it compile) we find this in the aux:\newlabel{Ref}{{}{1}{\enit@align {\enit@format {Label\label {Ref}}}}{}{}}
I'm not sure those commands are meant to be used outside\item[...]
of adescription
env.\item[Label]\label{Ref}
\nameref
, but I don't think it would ever had anywaysenumitem
has no fault in this. It's rathergettitlestring
. See github.com/ho-tex/gettitlestring/issues/1