Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Currently I have the following TeX

\begin{enumerate}
\item First idea
\item \label{idea:s} Second idea
\end{enumerate}

\begin{enumerate}
\item Point about \ref{idea:s}
\end{enumerate}

I would like to be able to somehow name the lists themselves, and then the reference idea:s could be something like List I.a, or something like that. How can I name enumerated lists? I was thinking that defining an environment like a theorem environment would work, but is there a more preferred way?

http://en.wikibooks.org/wiki/LaTeX/Theorems#Basic_theorems

share|improve this question

1 Answer 1

up vote 5 down vote accepted

This might be what you're after, and uses the enumitem package to obtain the appropriate formatting.

A new environment biglist is created that has the following default formatting:

  • Item labels are given as a Roman numeral indicating the list identifier/name, followed by ., followed by the item number (in alphabetic enumeration).
  • Item references are given as List~<label> where <label> is as described above.

This will allow you to use the enumerate environment for other lists in your document, while biglist is reserved for your "named lists". The formatting, of course (in terms of labelling and referencing) can be modified. Additional options can also be specified via an optional argument to \begin{biglist}[<other parameters>]. These include the item separation, indent, etc.

enter image description here

\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\newcounter{biglist} \renewcommand{\thebiglist}{\Roman{biglist}}%
\newenvironment{biglist}[1][*]
  {\stepcounter{biglist}%
   \begin{enumerate}[label=\thebiglist.\alph*,ref=List~\thebiglist.\alph*,#1]}% \begin{biglist}
  {\end{enumerate}}% \end{biglist}
\begin{document}
\begin{biglist}
\item First idea
\item \label{idea:s} Second idea
\end{biglist}

\begin{enumerate}
\item Point about \ref{idea:s}
\end{enumerate}
\end{document}​

The above can be made more dynamic by allowing you to specify the name as an optional argument as well, and even choose between something other than (say) List, or stick to that as the default.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.