[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.83; Creating previews stops at multiple citation wit
From: |
David Kastrup |
Subject: |
Re: [Bug-AUCTeX] 11.83; Creating previews stops at multiple citation with class revtex4 |
Date: |
Fri, 25 Aug 2006 12:42:44 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> "Harry Schmidt" <address@hidden> writes:
>
>> In the following minimal example only the preview for the first $A$ is
>> rendered:
>>
>> \documentclass{revtex4}
>> \begin{document}
>> $A$
>> \cite{a:b_c,x.2003}
>> $A$
>> \begin{thebibliography}{2}
>> \bibitem{a:b_c} asdf
>> \bibitem{x.2003} defg
>> \end{thebibliography}
>> \end{document}
>>
>> I think this has to do with the document class. Changing revtex4
>> to article will remove the problem.
>
> Not really. Please complain to the author of natbib.sty. He uses
> \edef (not even address@hidden) on \mbox. It is more or less pure
> luck that this does not break with the default \mbox command. If he
> were to use address@hidden instead, this would be no problem with
> preview.sty.
>
> I might figure out a working fix involving eTeX (where available),
> but this should really be fixed in natbib.sty. Using \edef instead
> of address@hidden on LaTeX macros is plainly a bug and very wrong.
I checked in an eTeX-based workaround into preview.dtx. You might
want to apply the patch (and fix the checksum afterwards) if things
are urgent for you. It will only work on eTeX-based `latex' commands.
--- preview.dtx 15 Aug 2006 12:47:32 +0200 1.121
+++ preview.dtx 25 Aug 2006 12:29:11 +0200
@@ -527,11 +527,14 @@
% Now address@hidden needs its helper macro. In order to avoid
% recursive definitions, we advise only macros that are not yet
% advised. Or, more exactly, we throw away the old advice and only
-% take the new one.
+% take the new one. We use e\TeX's \cmd{\protected} where available
+% for some extra robustness.
% \begin{macrocode}
address@hidden@delay{%
\ifx#1\relax \let#1#2\fi
- address@hidden@}}}
+ address@hidden
+ address@hidden \else \protected\fi
+ address@hidden
% \end{macrocode}
%\end{macro}
%
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum