[texhax] texhax Digest, Vol 2006, Issue 283

Michael Barr mbarr at math.mcgill.ca
Tue Sep 19 14:15:24 CEST 2006


On Tue, 19 Sep 2006 C.A.Rowley wrote:

> > Incidentally, if you replace \emph{et al.} by {\it et al.}, it does work 
> > properly.
> > 
> 
> Coincidentally(??) this aside provides the clue as to why the spurious
> `, ' appears.
> 
> The problem was that, in the bad redefinition, in effect both an \hbox
> _and_ a TeX group (from the pair of {}) had been removed.
> 
> The TeX group was there for protection against some non-defensive
> internal programming using one temporary local switch for two purposes,
> one in \cite and one in \emph.  Putting the \emph in a group prevents
> any interference.
> 
> Many apologies for not documenting in the sources the importance of
> this group (did you look at ltbibl.dtx before chnaging it?).

Yes, Donald Arsenau has already pointed out this double use of the switch.  
I should point out that exactly the same problem occurs in breakcite.sty 
that is distributed by CTAN.  His suggestion is to change it to read

\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@m\ }%
     \edef\@citeb{\expandafter\@firstofone\@citeb}%
     \if at filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset at font\bfseries ?}%
       \G at refundefinedtrue
       \@latex at warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
        {{\csname b@\@citeb\@extra at b@citeb\endcsname}}}}{#1}}

\@ifundefined{@extra at b@citeb}{\def\@extra at b@citeb{}}{}

That adds the extra group and also prepares it for use as part of the 
chapterbib package and otherwise has no effect.  I have written to the 
contributor of the package (two days ago) with no response, asking if he 
minds the upgrade.  I am not sure where to go from here.

Michael



More information about the texhax mailing list