[texhax] Curious bug in breakcites
Michael Barr
barr at barrs.org
Thu Mar 1 12:49:14 CET 2007
If you compile the file:
\documentclass{article}
\usepackage{breakcites}
\newcommand{\etal}{\emph{et al.}}
\begin{document}
\cite{ABC}
\begin{thebibliography}{99}
\bibitem[A \etal\ (2000)]{ABC}
\end{thebibliography}
\end{document}
the output has an extra comma after the citation. So far, I have found
two ways to fix it: take the period out of the definition of \etal and
add it to the bibitem itself; or alter the definition of \@citex by
replacing the last line of \@citex
{\csname b@\@citeb\endcsname}}}{#1}}
with
{{\csname b@\@citeb\endcsname}}}}{#1}}
(i.e. add another level of grouping). Incidentally, the original last
line was
{\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
and that \hbox was what prevented the citations from breaking. I do not
understand why that extra level of grouping has that effect, or for that
matter why the period in the definition of \etal has that effect, but it
is clearly a bug.
--
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.
Benjamin Franklin
More information about the texhax
mailing list