Graphics, Figures & Tables ⇒ Unwanted space between text and table in Lyx
Unwanted space between text and table in Lyx
The last line at the top and the first line at the bottom (both marked blacked) in the attachment show unwanted white space which i need to remove. The same is happening between a table and the new paragraph that starts below it.
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: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Unwanted space between text and table in Lyx
In a case, when we have a very bad page break, which means like 10 cm white space at the page, this stretch looks crazy. So, you could improve the page break, or disable that vertical page balancing.
It could be that you use figures or tables without floating. So they would not move within the text for better page breaks. I could tell you more, if you would post a LaTeX exported file as attachment here.
Switching of vertical balancing is easy: simply add
\raggedbottom
to the document preamble. I just recommend to check the page break situation at that pass though, such as: what comes directly after that page with the big spaces.Stefan
Re: Unwanted space between text and table in Lyx
Thanks for the reply, I am using RevTex 4.1 document class but with custom class option of aip,preprint.
I observed that in both the cases where a large space is present between the table and the paragraph or between two paragraphs, the following page has a figure in the beginning. Since the figure with its caption won't fit in the same page, Lyx is generating white space to keep the page margins same.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Unwanted space between text and table in Lyx
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Unwanted space between text and table in Lyx
Have a look at this LyX dialog - I would consider this "Here definitely" generally as problematic:
"Here, definitely" is a problem if there's simply not enough space Here. So it has to move anyway, but leaves a big gap at the end of a page. The automatism with the other points prevents that.
I would remove the checkmark for "Here definitely", and check Top, Bottom, Page and Here if possible, furthermore I would check "Ignore LaTeX rules" for easier placement.
Try and take a look how the page is filled then.
Stefan