LyXKeep floating Figures within a Subsection

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
brianeno
Posts: 5
Joined: Sat Jul 30, 2011 11:46 pm

Keep floating Figures within a Subsection

Post by brianeno »

Hello,

I am using LyX to write my thesis but I have the following problem. Often LyX decides, at the produced PDF, to place graphics and images outside the section or subsection they belong to in order to keep formating. I can understand that, but I am looking for some time now on how to prevent it and always keep the graphics within their section. I would appreciate your help and advise.
Best
v.
Last edited by brianeno on Sat Aug 06, 2011 7:10 pm, edited 1 time in total.

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: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Keep floating Figures within a Subsection

Post by Stefan Kottwitz »

Hi,

you could use the placeins package:

Code: Select all

\usepackage[section]{placeins}
This prevents figures from floating cross section boundaries. Furthermore, you can use its command \FlotBarrier before subsections for limiting the floating.

Stefan
LaTeX.org admin
brianeno
Posts: 5
Joined: Sat Jul 30, 2011 11:46 pm

Re: Keep floating Figures within a Subsection

Post by brianeno »

Thanks Stefan,

it seems that is not that straight forward to edit the tex code in Lyx. (A bit weird) .. but I found out searching for the placeins that you can check the document's properties at Lyx and select Float Placement as: Here Definitely which keeps the figure at place. The Here if possible options gave me lots of errors.
Thanks a lot
V.
Post Reply