Closed lstonys closed 4 months ago
babel pushes citation label as \@tempa to \@citex but this command is too general and can be changed inside \@citex. It would be safer to expand \@tempa before passing it to \@citex (I had an issue with this case but can't find it now).
\@tempa
\@citex
Babel code
\bbl@redefine\@citex[#1]#2{% \@safe@activestrue\edef\@tempa{#2}\@safe@activesfalse \org@@citex[#1]{\@tempa}} \AtBeginDocument{% \@ifpackageloaded{natbib}{% \def\@citex[#1][#2]#3{% \@safe@activestrue\edef\@tempa{#3}\@safe@activesfalse \org@@citex[#1][#2]{\@tempa}}% }{}}
As a fix I had this code in my class file.
\AfterPackage{babel}{ \def\@citex[#1]#2{% \@safe@activestrue\edef\@tempa{#2}\@safe@activesfalse \edef\@tmp{\noexpand\org@@citex[\unexpanded{#1}]{\@tempa}}% \@tmp } \AtBeginDocument{% \@ifpackageloaded{natbib}{% \def\@citex[#1][#2]#3{% \@safe@activestrue\edef\@tempa{#3}\@safe@activesfalse \edef\@tmp{\noexpand\org@@citex[\unexpanded{#1}][\unexpanded{#2}]{\@tempa}}% \@tmp} }{}} }
could it be fixed in the future version?
babel pushes citation label as
\@tempa
to\@citex
but this command is too general and can be changed inside\@citex
. It would be safer to expand\@tempa
before passing it to\@citex
(I had an issue with this case but can't find it now).Babel code
As a fix I had this code in my class file.
could it be fixed in the future version?