Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!lth.se!newsuser From: collberg@dna.lth.se (Christian S. Collberg) Newsgroups: comp.text.tex Subject: \ref in \caption. Help with strange behavior. Message-ID: <1991Mar25.121813.13904@lth.se> Date: 25 Mar 91 12:18:13 GMT Article-I.D.: lth.1991Mar25.121813.13904 Sender: newsuser@lth.se (LTH network news server) Organization: Department of Computer Science, Lund University Lines: 69 The following document (capttest.tex): --------------------------------------------------------- \documentstyle{article} \begin{document} \section{First Section} \label{SectLab} \begin{figure} askjdfhaslkjf asdkfaskjd jsadfhlkj \caption{Blah blah in section \ref{SectLab} blah blah.} \end{figure} \end{document} --------------------------------------------------------- produces the following response when processed with LaTeX: ---------------------------------------------------------------------------- > latex capttest.tex This is TeX, C Version 3.0 (capttest.tex LaTeX Version 2.09 <7 Dec 1989> (/usr/local/lib/tex/inputs/article.sty Document Style `article' <16 Mar 88>. (/usr/local/lib/tex/inputs/art10.sty)) No file capttest.aux. LaTeX Warning: Reference `SectLab' on page 1 undefined. [1] (capttest.aux) LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. ) Output written on capttest.dvi (1 page, 444 bytes). Transcript written on capttest.log. > latex capttest.tex This is TeX, C Version 3.0 (capttest.tex LaTeX Version 2.09 <7 Dec 1989> (/usr/local/lib/tex/inputs/article.sty Document Style `article' <16 Mar 88>. (/usr/local/lib/tex/inputs/art10.sty)) (capttest.aux) ! Argument of \@caption has an extra }. \par } \addcontentsline ...\protect \contentsline {#2}{#3 }{\the \@temptokena }}}}\@... \@caption ... the#1\endcsname }{\ignorespaces #2}} \begingroup \@parboxrestor... l.13 ... blah in section \ref{SectLab} blah blah.} ------------------------------------------------------------------------------- Can anyone explain this? I apologize in advance if the answer is obvious, has been answered a zillion times before, can be found on page xxx of the LaTeX manual, or is on the FAQ... Chris-- -------------------------------------------------------------------- Christian.Collberg@dna.lu.se