[texhax] Curious bug in breakcites

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Thu Mar 1 21:41:21 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).
> [snip]

I suspect that it has to do with the \leavemode command in the definition of
\emph.
Here are some more ways around the problem:

1. \newcommand{\etal}{\emph{et al}.}
2. \newcommand{\etal}{\mbox{\emph{et al.}}}
3. \newcommand{\etal}{{\it et al.}}

Cheers,  Phil



More information about the texhax mailing list