[OS X TeX] Referring to custom labels in enumerate environments

Peter Pagin peter.pagin at philosophy.su.se
Sun May 7 02:15:30 EDT 2006


Hi,
you could try entering

\renewcommand{\theenumi}{T\arabic{enumi}}

just before the environment, and then skip the optional argument (i.e. 
[T1.]).

If you don't want to keep the change for other environments, just after 
the environment revert to

\renewcommand{\theenumi}{\arabic{enumi}}

Best,
Peter

Charilaos Skiadas wrote:
> I want to do the following, and I am wondering what the most elegant 
> way is:
>
> I have one particular enumerate environment, whose items I want to 
> number as:
> T1.
> T2.
> T3.
>
> etc. I used the enumerate package for this, and have currently 
> something like:
>
> \begin{enumerate}[T1.]
> \item ...\label{T1}
> \item ...\label{T2}
> \item ...\label{T3}
> \end{enumerate}
>
> Now, I want to use \eqref{T2} or \ref{T2}, or some other reference 
> tool, to get as an answer "T2", without the quotes of course, and 
> without the dot that appears in the item label. As it stands, these 
> produce "(2)" and "2" respectively. In the LaTeX Companion I found a 
> way to achieve this by redefining \labelenumi and using the varioref 
> package and \labelformat to set the format for all enumi's, but I 
> really only want to target this particular enumerate environment. 
> There are probably a number of ways to deal with this, but I am 
> looking for an elegant one. For now I will just go with "T\ref{T2}", 
> or even possibly T2, since I am not going to rearrange things too much 
> anyway, nor will I use the ref more than 3 times. So it is more of an 
> academic question, to which I'd like to know the answer. What is the 
> _best_ solution to this?
>
> TIA,
> Haris
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>          & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>

-- 
Peter Pagin
Professor
Department of Philosophy, Stockholm University
106 91 Stockholm, Sweden
tel: +46-8-162813, fax: +46-8-152226
email: peter.pagin at philosophy.su.se

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list