5

I am using revtex 4.1 and am getting an error:

"A float is stuck (cannot be placed); try class option [floatfix]"

In the revtex documentation it states:

"REVTEX uses the ltxgrid package, which provides the ability to attempt repairs when LATEX’s float placement mechanism is about to fail, but that facility is turned off by de- fault. Users should invoke the floatfix document class option to enable this LATEX extension."

My question is: which line of Tex code should I use to enable floatfix?

  • 2
    You should use it in your \documentclass. So it would be something like \documentclass[floatfix]{revtex4}. – TeXnician Jun 28 '17 at 15:02

1 Answers1

7

As mentioned in the comments, this can be enabled by adding the option to the initial \documentclass call, at the start of the file:

\documentclass[floatfix]{revtex4}

However, even when the document is compiling perfectly, there isn't a full guarantee that this will make the warnings go away.

E.P.
  • 1,415
  • Be aware, floatfix can also cause problems when placing floats. Just prevented one of my files to compile. – Kay Jun 22 '19 at 14:49
  • @Kay This kind of anecdotal evidence isn't terribly useful without a MWE. But yes, the floatfix option isn't terribly reliable - this is well known. – E.P. Jun 22 '19 at 20:53
  • unfortunately, I got this error too and did not fix by floatfix option. Is there any options? – sara00 May 11 '22 at 08:18
  • 1
    @sara00 I am unaware of any programmatic fixes for this. If the output looks OK to you, I would recommend ignoring the warning. If there is an actual problem, you will need to reposition the floats by hand, both by adjusting the point in the text where they're called and by editing the [hbtp] placement options. See e.g. the quote from the revtex manual here. – E.P. May 11 '22 at 10:31
  • @E.P Very thanks for your help – sara00 May 11 '22 at 10:43