6

I am compiling a simple document in pdflatex using RevTex4-1 class and am getting this warning:

Class revtex4-1 Warning: Repair the float package.

The document seems to be fine (I have a single figure in it). I can't find anything online explaining this warning though, so I decided to ask the community. What is this? Do I need to fix it? If so, how?

Here is my preamble:

documentclass[twocolumn,noshowpacs,noshowkeys,pra,aps,longbibliography]       {revtex4-1}%
\pdfoutput=1
\usepackage[caption=false]{subfig}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{url}
\usepackage{graphicx}
  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 May 28 '14 at 6:19
  • 1
    The warning should be Repairing the float package, as it tells you that some action has been taken by the class. It's annoying, but innocuous. There are several other Repairing... warnings defined in the class and this is the only one with Repair, but the surrounding code is very similar to the other codes with Repairing. – egreg May 28 '14 at 10:56
  • @ChristianHupfer I can definitely expand my example, but looks like egreg figured it out based on my pre-amble (and wrote a very nice expensive answer below). Is MWE still needed? – M.B.M. May 28 '14 at 21:56
17

The revtex4-1 class defines several similar messages, for instance

351 \@ifx{\eqnarray\eqnarray@LaTeX}{%
352  \class@info{Repairing broken LaTeX eqnarray}%
353  \let\eqnarray\eqnarray@fleqn@fixed
354  \newlength\eqncolsep
355  \setlength\eqncolsep\z@
356  \let\eqnarray@LaTeX\relax
357  \let\eqnarray@fleqn@fixed\relax
358 }{}%

The warning you get is quite similar in essence:

3979 \appdef\document@inithook{%
3980  \@ifxundefined\newfloat{}{%
3981   \@ifx{\float@end\float@end@float}{%
3982    \@ifx{\newfloat\newfloat@float}{\true@sw}{\false@sw}%
3983    }{\false@sw}%
3984    {%
3985     \class@warn{Repair the float package}%
3986     \let\float@end\float@end@ltx
3987     \let\newfloat\newfloat@ltx
3988    }{%
3989     \class@warn{Failed to patch the float package}%
3990    }%
3991  }%
3992 }%

but, for some reasons, “Repairing” turned into “Repair”. It's almost certainly a small bug, but the warning is completely innocuous.

It is issued because algorithm loads float. If you want to turn it off, use the silence package: add

\usepackage{silence}
\WarningFilter{revtex4-1}{Repair the float}

to your preamble and the warning will disappear.

  • Thank you for an extensive explanation. I've seen "Repairing [something]" before and knew that there was trouble when "Failed to [do something]" appeared after that. I never saw "Repair [something]" before and thought that LaTeX was asking me to repair something manually, hence my question. Appreciate the clarification! – M.B.M. May 28 '14 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.