\documentclass{article}
\begin{document}
\begin{figure}
\caption{vector $\overrightarrow{OM}$}
\end{figure}
\end{document}
the error message (from out.log) :
! Illegal parameter number in definition of \reserved@a.
<to be read again>
\crcr
l.6 \caption{vector $\overrightarrow{OM}$}
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
The .dvi is however properly created.
Does anyone have any idea or explanation ?
Thanks in advance
> \documentclass{article}
> \begin{document}
> \begin{figure}
> \caption{vector $\overrightarrow{OM}$}
> \end{figure}
> \end{document}
>
> the error message (from out.log) :
> ! Illegal parameter number in definition of \reserved@a.
Put \protect in front of \overrightarrow.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
you have already had an explanation.
the error arose when writing the entry in the .aux file (writing to
the list of figures is a two-stage process). looking at the .aux, i
see
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces vector $\vbox {\mathsurround \z@ \everycr {}\tabskip \z@skip \halign {##\crcr $\mathsurround \z@ \relax \setbox \z@ \hbox {\color@begingroup -\color@endgroup }\ht \z@ \z@ \dp \z@ \z@ \box \z@ \mkern -7mu\cleaders \hbox {$\mkern -2mu\relax \setbox \z@ \hbox {\color@begingroup -\color@endgroup }\ht \z@ \z@ \dp \z@ \z@ \box \z@ \mkern -2mu$}\hfill \mkern -7mu\mathord \rightarrow $\crcr \noalign {\kern -\p@ \prevdepth -\@m \p@ } $\hfil \displaystyle {OM}\hfil $\crcr }}$}}{1}}
which is pretty comprehensively silly, as well as being wrong.
--
Robin Fairbairns, Cambridge
.