[texhax] spurious space with abbrevs.sty
Ulrike Fischer
news3 at nililand.de
Fri Sep 28 13:26:54 CEST 2012
Am Fri, 28 Sep 2012 10:44:41 +0200 schrieb Herbert Voss:
> there is a problem with the internal macro \maybe at space@
> which _always_ inserts a space. However, the package abbrevs
> loads some other packages which might have change their
> behaviour.
I can't see how it could ever have worked: \maybe at space@ uses
\t at st@ic which sets \maybe at icfalse. Testing afterwards with
\if at tempswa doesn't make sense.
\documentclass[10pt]{article}
\usepackage{abbrevs}
\makeatletter
\newcommand\t at st@space{} %new
\def \t at st@space {%
\expandafter\let\expandafter
\reserved at b\expandafter=\reserved at a\relax
\ifx\reserved at b\@let at token
\@tempswafalse
\@break at tfor
\fi
}
\renewcommand\maybe at space@ {%
\@tempswatrue
\expandafter \@tfor
\expandafter \reserved at a
\expandafter :%
\expandafter =%
\nospacelist
\do \t at st@space %new
\if at tempswa
\space
\fi
}
\makeatother
\begin{document}
\newabbrev\pc{Personal computer (PC)}[PC]
{\pc}abc {\pc}abc \pc abc
\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
More information about the texhax
mailing list