Hello, ** Igor A. Kotelnikov [2012-04-03 19:52:31 +0700]:
Dear Frends!
I've ran into subtle error when tried to run lualatex over source file for revtex4 or revtex4-1 class. Here is MWE:
===================================== \documentclass{revtex4} \usepackage{ifluatex,ifxetex} \newif\ifunicode \ifxetex\unicodetrue\else\ifluatex\unicodetrue\fi\fi
\ifunicode \usepackage{fontspec} \setmainfont{Cambria} \else \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \fi \usepackage{graphicx}
\begin{document} \begin{figure} \includegraphics{123.png} \end{figure} \end{document} =====================================
It works fine if 1) I run pdflatex rather then lualatex of xelatex, 2) or comment out \begin{figure} and \end{figure} lines 3) or comment out \usepackage{fontspec}, \setmainfont{Cambria}. 4) or choose article class instead of revtex.
Here is compilation log: [...]
This doesn't related with luatex either, please see
http://tug.org/pipermail/xetex/2009-June/013520.html
Just try the following example document with either xelatex or lualatex
(both would fail) and even pdflatex will:
<file name="ex.ltx">
\documentclass{revtex4}
\usepackage{fixltx2e}
\begin{document}
Hello,
World.
\begin{figure}
This is a figure
\end{figure}
\end{document}
</file>
The 'fixltx2e' package is included by `fontspec-patches.sty', see e.g.
http://tex.stackexchange.com/questions/27872/revtex-4-1-fixltx2e-includegrap...
Unfortunately, fontspec uses `usepackage' so you can't call it using
`RequirePackage'.
---
WBR, Vladimir Lomov
--
"Being disintegrated makes me ve-ry an-gry!"