Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!geac!sq!lsuc!maccs!art From: art@maccs.dcss.mcmaster.ca (Art Mulder) Newsgroups: comp.text.tex Subject: listoffigures question/problem Summary: \underline causes a jump out of mathmode for some reason Keywords: latex listoffigures math mode Message-ID: <26AB19EC.17589@maccs.dcss.mcmaster.ca> Date: 23 Jul 90 15:38:20 GMT Distribution: na Organization: McMaster University, Hamilton, Ontario, Canada Lines: 44 Hello all, I trying to get \listoffigures to work and am having some difficulty. I have some simple macro's: | \newcommand{\un}{\underline} | \newcommand{\pth}[1]{\un{path} \; #1 \; \un{end}} used in a caption of a figure as follows: | \caption{Labelled sm net intuitively corresponding to $\pth{a;a}$ | \label{fig:227}} which puts the following into my .lof file: [originally this was all one line, I have inserted line breaks] | \contentsline {figure}{\numberline {2.30}{\ignorespaces Labelled | sm net intuitively corresponding to $\relax $\@@underline {\hbox | {path}}$\relax \mskip \thickmuskip a;a \mskip \thickmuskip \relax | $\@@underline {\hbox {end}}$\relax $ }}{81} when I run the file through latex for the second time (to get the cross references right) I get this error: | ! Missing $ inserted | < inserted text> | $ | ... | l.32 ...$\@@underline {\hbox{path}}$\relax $ }}{81} It appears that latex is putting extra begin-math-mode end-math-mode dollar signs around the text that is underlined in the caption! This occurs in several captions that I have, all with regards to underlining. When I manually take out the extra dollar signs, latex works. Now I can keep doing this, but there are about 10-15 instances of underlining in captions, and ever time I process the book I have to manually correct them, and it is a pain. Am I doing something wrong? Can anyone suggest a way for me to work around this? Any help is appreciated. Please email to me and I will post the solution if there is one. -- ----------- Art Mulder, art@maccs.DCSS.mcmaster.ca ...!uunet!utai!utgpu!maccs!art