[texhax] abbrevs package: incorrect spacing
Paul Isambert
zappathustra at free.fr
Thu Nov 10 08:22:58 CET 2011
Le 10/11/2011 07:36, jtzzaa11-texhax1 at yahoo.com a écrit :
> Hello,
>
> I'm using the "abbrevs" package to define macros. The manual says that a space will be added after a macro unless the following nonwhite character is in a set of predefined characters, which include left and right curly braces. However, in this simple example a space is added after the macro:
>
> \newabbrev{\mymac}{123}
> xx{\mymac}abc
>
>
> produces
>
>
> xx123 abc
>
>
> Any suggestions how to solve this?.
The problem is that abbrevs relies on a test from the LaTeX kernel
(\t at st@ic) that is supposed to set some conditional (\if at tempswa) to
false in some condition (in your case, if the next character belongs to
the \nospacelist); this is indeed the definition of \t at st@ic as shown in
the LaTeX2e sources -- but in reality \t at st@ic uses another conditional,
namely \ifmaybe at ic.
A solution would be to change line 480 in abbrevs.sty from
"\@tempswatrue" to "\maybe at ictrue" and line 488 in the same file from
"\if at tempswa" to "\ifmaybe at ic". I don't know if it might break something
elsewhere, though.
Best,
Paul
More information about the texhax
mailing list