[XeTeX] revTeX + xltxtra + figure

Ross Moore ross at ics.mq.edu.au
Sun Jun 28 10:32:16 CEST 2009


Hello Arno,

On 28/06/2009, at 5:29 PM, Arno Trautmann wrote:

> Hi all,
>
> me again …
> I have a strange error trying to compile a revTeX4-Document (for
> PRL-papers, here for download:
> ftp://aps.org/pub/revtex/revtex4.cls
> )
> using XeLaTeX and xltxtra.

The incompatibility is with  revtex4  and  fixltx2e .
Try the following start to your example, with the
last line either commented or not. You should see
the same error, since  xltxtra  requires  fixltx2e.sty .

>>> \documentclass{revtex4}
>>> \usepackage{
>>> fontspec,
>>> xunicode
>>> }
>>> %\RequirePackage{fixltx2e}[2006/03/24]



> The following document:
> ––
> \documentclass{revtex4}
> \usepackage{
>   xltxtra
> %fontspec,
> %xunicode
> }
> \begin{figure}
> test
> \end{figure}
> \end{document}

You forgot  \begin{document} here,
but no matter.


> ––
> gives me the output:
> ––
> ! Missing number, treated as zero.
> <to be read again>
>                    \aftergroup
> l.35 \end{document}
> ––
> However, using fontspec and xunicode directly instead of loading  
> xlxtra
> works fine.

This way you aren't also loading  fixltx2e.sty .

So the test in  xltxtra.sty  should be more particular.

My guess is that something that  fixltx2e.sty  does is
done already in  revtex4 .  The attempt to make the same
patch twice then breaks things again.



> Can anybody give me a hint what I am doing wrong?

I don't know why  xltxtra.sty  has the line

   \RequirePackage{fixltx2e}[2006/03/24]

Surely Will can explain, when he gets a chance to do so.

You could try taking a local copy of  xltxtra.sty  and
commenting-out this line.  Watch out for anything else
breaking, and report it back here.



> Fileversions:
> ––
> This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
> xltxtra.sty    2008/07/29 v0.4 Improvements for the "XeLaTeX" format
> ––
> revTeX4 redefines figure in the following way, maybe this helps:
> ––
> \newenvironment{figure}
>                {\@float{figure}}
>                {\end at float}
>
> \def\@float#1{%
>  \@ifnextchar[{%}]{%Brace-matching klootch
>   \@yfloat\width at float{#1}%
>  }{%
>   \@ifxundefined at cs{fps@#1}{%
>    \edef\reserved at a{\noexpand\@yfloat\noexpand\width at float{#1}[\csname
> fps@\endcsname]}\reserved at a
>   }{%
>    \edef\reserved at a{\noexpand\@yfloat\noexpand\width at float{#1}[\csname
> fps@#1\endcsname]}\reserved at a
>   }%
>  }%
> }%
>
> \def\end at float{%
>  \end@@float{%
>   \check at currbox@count
>  }%
> }%

This kind of change could be relevant, as fixltx2e.sty
seems to have a lot of coding to handle floats differently
within a 2-column setup.

Tracing this is pretty difficult.
I'd like to hear from some of the package writers,
to better understand how their coding efforts have
created some kind of clash.

> ––
>
> cheers,
> Arno


Hope this helps,

	Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the XeTeX mailing list