Re: warning about multiply-defined labels
Ben Mueller <[email protected]> Wed, 23 Feb 2005 21:06:50 +0100 (CET)
| Newsgroups | gmane.comp.tex.texpower.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 23 Feb 2005, Hans F. Nordhaug wrote:
> \documentclass{seminar}
> \usepackage[display]{texpower}
> \begin{document}
> \begin{slide}
> \liststepwise*{
> \begin{enumerate}
> \item \step{\ifthenelse{\value{step}=\value{firststep}}{\label{foo}}{}}
> \step{bar}
> \end{enumerate}
> }
> \ref{foo}
> \end{slide}
> \end{document}
> ----
> The trick is putting \label{foo} inside a step and only execute \label for
> the first step. (You can of course make a command for this work around if
> you really need it a lot.)
>
Hi Hans,
looking at your solution I found another approach:
---
\documentclass{seminar}
\usepackage[display]{texpower}
\begin{document}
\begin{slide}
\liststepwise{
\begin{enumerate}
\item \switch{\label{foo}}{bar}
\end{enumerate}
}
\ref{foo}
\end{slide}
\end{document}
---
In this case it's also possible to have several items and labels,
inserting e.g. "\item \step{\switch{\label{bar}}{foo}}" ...
Thanks
Ben
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click