Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding lost floats

770 views
Skip to first unread message

Peter Flynn

unread,
Apr 4, 2012, 6:23:22 PM4/4/12
to
Despite all the comment about how hard floats are to control in LaTeX,
I've actually never really had this problem, possibly because the way I
write means that there are usually several paragraphs between each float.

But now I'm getting an oddity: "! LaTeX Error: Float(s) lost" at a
location in the document [114] where there are no floats. Comparing
input with output, all floats before the page have been correctly
processed and placed, and nothing has been lost.

What actually triggers this error message? I have dug into the LaTeX
source but that part of it requires more understanding of the internals
than I possess right now.

Is there something that will trace floats for me by outputting to the
log file when a float gets placed (rather than when it gets processed)?

///Peter


Marc van Dongen

unread,
Apr 5, 2012, 12:51:09 AM4/5/12
to
On Wednesday, April 4, 2012 11:23:22 PM UTC+1, peter wrote:

Hi Peter,

> But now I'm getting an oddity: "! LaTeX Error: Float(s) lost" at a
> location in the document [114] where there are no floats. Comparing
> input with output, all floats before the page have been correctly
> processed and placed, and nothing has been lost.

The marginpar environment also seems to be implemented using floats. Do you have marginpar environments in your document?

Putting an example on line may help.

Regards,


Marc van Dongen

Robin Fairbairns

unread,
Apr 5, 2012, 6:19:04 AM4/5/12
to
i never remember the exact sequence, so

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fllost

is what i go back to. (it looks quite well-written, though i say it
myself.)
--
Robin Fairbairns, Cambridge
sorry about all this posting. i'll go back to sleep in a bit.

Marc van Dongen

unread,
Apr 5, 2012, 6:28:01 AM4/5/12
to
On Thursday, April 5, 2012 11:19:04 AM UTC+1, Robin Fairbairns wrote:

> i never remember the exact sequence, so
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fllost
>
> is what i go back to. (it looks quite well-written, though i say it
> myself.)

Thanks for this. I should have also tried looking in the FAQ. Still it confirms my suspicion that a marginpar may be the cause of the problem. (I got a ``too many floats'' error because of them once, so I never forget this:-)

@Peter adding a \clearpage in the right place may solve the problem.

Regards,


Marc van Dongen

Peter Flynn

unread,
Apr 5, 2012, 4:12:36 PM4/5/12
to
I do indeed use \marginpar, but only a couple of times, and some 40-50
pages before the error occurs (and there are three \clearpages in
between). As this is generated from XML, and I know what creates what, I
was able to check it very easily, and it turned out as Robin suggested,
a stray \marginpar occurring inside a minipage, because I had commented
out the <xsl:if> code that was intended to detect it.

Thank you both!

///Peter
0 new messages