[comp.text.tex] Solution: \ref in \caption

marcus@ecrc.de (Marcus Clemente) (06/04/91)

The reason for the error is that a figure is a moving argument and fragile arguments like ref have to be protected from expanding. So there must be a \ref before the \ref:

\caption{another example of figure \protect\ref{example}}

More information can be found in Lamports LaTeX book on page 59.

I would like to thank Nick Dokos (nick@osf.org) and Bernd Raichle
raichle@azu.informatik.uni-stuttgart.de for sending me the answer!


--
Marcus Clemente                          Internet: marcus@ecrc.de
ECRC GmbH     
Arabella Str. 17
D 8000 Munich 81                         Tel.:  +49/89/92699-109
Germany 

------------------------------------------------------------------
The difference between practice and theory in practice is always
greater than the difference between practice and theory in theory.