0

I am trying to repeat the content of an enumerate item.

I tried it with the nameref package but without success:

\documentclass{article}

\usepackage{nameref}

\begin{document}

\begin{enumerate}
\item First item\label{enu:first}
\item Second item
\end{enumerate}

This is the text of the first list item: \nameref{enu:first}

\end{document} 

\nameref{enu:first} seems to create just an empty string in this case. What I would like it, or some similar command using the label key, to create is "First item".

  • 2
    by default latex never access all the item text, if you need that it would be easier to have a custom syntax where the item text was in {...} as the argument of a command then it would be easier to save. Otherwise you need some slightly tricky code to collect up text to the next following \item or \end{enumerate} – David Carlisle May 6 at 16:52
  • Thanks. I think I would prefer the slightly Tricky Code since I could then leave all the other text as it is. – Daniel May 6 at 20:19

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.