Re: Comments on bibulus.sty
Morten Høgholm <[email protected]> Sun, 20 Aug 2006 22:48:12 +0200
| Newsgroups | gmane.comp.tex.bibulus.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 20 Aug 2006 22:36:27 +0200, Thomas Widmann <[email protected]> =20 wrote: > Morten H=F8gholm <[email protected]> wrote a long time > ago: A long time indeed... >> 1) \cite should be a robust command, so use \DeclareRobustCommand >> for it. > > Hmmmm, bibulus.sty at the moment has the following definition: > > \def\cite{% > \bgroup% Terminated by \bibulus@cite > \@ifnextchar[%] > {\bibulus@cite@withafter}% > {\bibulus@cite@plain}% > } > > I haven't looked at this for a long time -- what is it doing? Is it > just trying to allow an optional argument in square brackets? How > does that fit in with \DeclareRobustCommand? Something using \@ifnextchar or a similar look-ahead should always be =20 robust in case it finds itself in a moving argument, which tends to happe= n =20 quite often. Using \DeclareRobustCommand to define it instead of \def wil= l =20 work. --=20 Morten