GeneralError: Float(s) lost

General information and discussion about TeXnicCenter
Post Reply
codingLikeHell
Posts: 2
Joined: Fri Feb 03, 2012 2:34 pm

Error: Float(s) lost

Post by codingLikeHell »

Hello,

I am editing a 'report' document in latex and I tried to embed a figure. Therefore, I chose "insert->figure" from the main menue, which causes Texniccenter to include the figure into a 'figure' environment.

However, trying to compile the document results in a 'Float(s) lost' error, independent of the scaling of the picture. I finally managed to get it compiled, but for this I had to remove the surrounding figure-environment.

Can anyone please tell me why this happens?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Error: Float(s) lost

Post by Stefan Kottwitz »

Hi,

this can happen if you use a float, such as figure or table, within another float (figure, table) environment or within marginpar, or inside a \parbox, a minipage or even a \footnote. Just check this, try using floating figures outside of such environments.

Stefan
LaTeX.org admin
codingLikeHell
Posts: 2
Joined: Fri Feb 03, 2012 2:34 pm

Re: Error: Float(s) lost

Post by codingLikeHell »

thanks a lot! :-) actually, it is insight of a minipage. so now I will try to put it outsided of this environment!
alanq
Posts: 21
Joined: Mon Dec 28, 2009 3:03 am

Error: Float(s) lost

Post by alanq »

For those struggling with this problem caused by a \marginpar inside, for example, a \parbox, try marginnote.
Post Reply