Re: Strange message for \nobreakdash inside a \caption
- From: Nicola Talbot <nlct@xxxxxxxxxxxxx>
- Date: Fri, 29 Feb 2008 10:41:21 -0800 (PST)
On Feb 29, 6:30 pm, "Mariano Suárez-Alvarez"
<mariano.suarezalva...@xxxxxxxxx> wrote:
Hi all,
the following little piece of code results in an unintelligible error:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{figure}
A figure goes here.
\caption{The caption\nobreakdash-goes here}
\end{figure}
\end{document}
This is using amsmath's \nobreakdash.
If one changes that to plain latex's \nobreakdashes
the error goes away.
Is there any actual difference between the two macros?
They are similarly scary...
-- m
\nobreakdashes is robust whereas \nobreakdash is fragile, so you need
to protect it:
\caption{The caption\protect\nobreakdash-goes here}
Regards
Nicola Talbot
.
- References:
- Strange message for \nobreakdash inside a \caption
- From: Mariano Suárez-Alvarez
- Strange message for \nobreakdash inside a \caption
- Prev by Date: Strange message for \nobreakdash inside a \caption
- Next by Date: Re: The Problems of TeX
- Previous by thread: Strange message for \nobreakdash inside a \caption
- Index(es):