Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Acronym package - ! Missing \endcsname inserted.

1,050 views
Skip to first unread message

jel

unread,
Aug 11, 2008, 5:07:09 PM8/11/08
to
I'm using the acronym package and LaTeX seems to not like the
following acronym definition:

\acro{M\&S}{Modeling and Simulation}

LaTeX displays the error:

! Missing \endcsname inserted.
<to be read again>
\&
l.125 ...ink{M\&S}{M\&S}]{Modeling and Simulation}

If I simply hit return to continue processing the final result seems
to look fine in my acronym list but I'm not sure if this will cause me
grief in other ways.

Is this a real problem? Easily fixed?

Patrick Drechsler

unread,
Aug 11, 2008, 5:44:30 PM8/11/08
to
jel <john.la...@jhuapl.edu> writes:

> I'm using the acronym package and LaTeX seems to not like the
> following acronym definition:
>
> \acro{M\&S}{Modeling and Simulation}
>
> LaTeX displays the error:
>
> ! Missing \endcsname inserted.

[...]

> Is this a real problem? Easily fixed?

Use a short and simple command without markup:

,----[ acronym.pdf Section 2.3 ]
| Because internal commands take acronym for storing the different
| forms of the acronym, the TEX code for the acronym is limited by
| \csname. If the acronym requires problematic or complicate TEX stuff
| (font commands, . . . ), then this code can be given in the optional
| argument short name . The first argument acronym is then a simpler
| string to identify the acronym. For example, an acronym for water can
| look like this:
| \acro{H2O}[$\mathrm{H_2O}$]{water}
| Then \acs{H2O} gets "H2 O" and \acl{H2O} prints "water".
`----

So, instead of:

\acro{M\&S}{Modeling and Simulation}

try:

\acro{MandS}[M\&S]{Modeling and Simulation}

Cheers,

Patrick

David Kastrup

unread,
Aug 11, 2008, 5:45:35 PM8/11/08
to
jel <john.la...@jhuapl.edu> writes:

\acro{M&S}{Modeling and Simulation}...

I am not sure this will always do the right thing when used in tables,
however.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>

encon...@gmail.com

unread,
Oct 1, 2018, 10:33:56 AM10/1/18
to
Wow, great hack! Just tried it on my own problem and it works out perfectly. Thanks a lot!
0 new messages