# REVTeX 4.1 + fixltx2e + includegraphics = doesn't work?

I use MacOSX Leopard and TeXShop. This piece of code works:

\documentclass[preprint,floatfix]{revtex4-1}
\usepackage{graphicx}
\begin{document}

\title{empty}

\section{fixltx2e or REVTeX 4.1 problem or mine?}

\begin{figure}[htb]
\centering
\includegraphics[width=0.5\textwidth]{fig1.pdf}
\caption{Awesome Image}
\label{fig:awesome_image}
\end{figure}

\end{document}


But if I load fixltx2e, the same piece of code it DOESN'T work!

\documentclass[preprint,floatfix]{revtex4-1}
\usepackage{fixltx2e}
\usepackage{graphicx}
\begin{document}

\title{empty}

\section{fixltx2e or REVTeX 4.1 problem or mine?}

\begin{figure}[htb]
\centering
\includegraphics[width=0.5\textwidth]{fig1.pdf}
\caption{Awesome Image}
\label{fig:awesome_image}
\end{figure}

\end{document}


This is the error that is produced:

<fig1.pdf, id=1, 61.25pt x 74.7pt> <use fig1.pdf>
No file test3.bbl.
[1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
! Missing number, treated as zero.
\aftergroup
l.20 \end{document}


Any idea how to fix this?

-
The problem comes from the \@addtocurcol defined in fixltx2e.sty. Perhaps someone can detect the cause. –  Gonzalo Medina Sep 8 '11 at 18:30

You can compile it if you load fixltx2e before the class. In that case you need \RequirePackage since \usepackage cannot be used before \documentclass.
\RequirePackage{fixltx2e}

This receipt has helped me to solve another trouble with RevTeX+figure. figure did not work for me if I tried to compile my document using XeTeX or LuaTeX. A maintainer of RevTeX answered me that they do not support XeTeX/LuaTeX (sic!). It would be interesting to understand why \RequirePackage{fixltx2e} makes a remedy for the problem with figure environment in RevTeX class. Note that RevTeX uses its own mechanism of placing floats which evidently fails under (Xe/Lua)TeX. –  Igor Kotelnikov Feb 8 '13 at 5:24