Page LayoutReduce white Space below Figure Captions only

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Reduce white Space below Figure Captions only

Post by Tissie »

Hi All,

I am writing my PhD thesis in LaTeX (MiKTeX) and wish to reduce the excessive white space typically produced below figures.

I found a great solution for this by using

Code: Select all

\setlength{\belowcaptionskip}{-12pt}
such that the white space below a figure caption is reduced by 12pt.

However, the problem is that for Tables, I have placed the caption above the Table. So when using the above code, my tables are dragged into the table caption.

Is there a way to avoid the above code having the effect on my table captions?

My table captions are defined using

Code: Select all

\captionof{table}{...bla...bla}
and my figure captions are defined using

Code: Select all

\caption{...blabla...}
Any suggestions are welcome (except for moving table captions below the table ;) ;) ).

Thanks!

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Reduce white Space below Figure Captions only

Post by localghost »

I would start with a modification of the \intextsep length register and drop the idea regarding \belowcaptionskip.

Code: Select all

\setlength{\intextsep}{0pt plus 2pt}   % default value 12pt plus 2pt minus 2pt
This will set the space between floats (including caption) and the surrounding text to 0pt, which is stretchable by 2pt.

Due to missing information it is difficult to say more. Hence a proper minimal example will be very helpful.


Thorsten
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Reduce white Space below Figure Captions only

Post by Tissie »

Thx for your suggestion, it appears to be working okay around some figures, others not so much.

I understand the first argument of setting the space around captions to xpt. But what is meant by being stretchable by ypt??

Finally, in your code explanation, it says minus 2pt as default which is not used in the code. What does the minus 2 pt mean?

Thank you
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Reduce white Space below Figure Captions only

Post by localghost »

Tissie wrote:[…] I understand the first argument of setting the space around captions to xpt. But what is meant by being stretchable by ypt?? […]
LaTeX uses a flexible page layout mechanism to create pages according to typographical guidelines. This sometimes makes it necessary to clinch or stretch spaces between several objects on a page (equations, floats, paragraphs, …) to fill the pages equally. Therefore many lengths that determine spaces are rubber lengths which can vary. This can be suppressed by the \raggedbottom (← Link!) command, which causes that rubber spaces are neither clinched nor stretched. A side effect is that pages are not filled across the entire text height.
Tissie wrote:[…] Finally, in your code explanation, it says minus 2pt as default which is not used in the code. What does the minus 2 pt mean?
This means that a length using a register with such a setting can be clinched by 2pt. For the concrete example of \intextsep in its default settings this means that the normal value is 12pt, its minimal value 10pt and its maximal value 14pt.

For the modification of \intextsep I suggested it means that this length is 0pt and can only be stretched to a maximum of 2pt. It cannot be compressed.
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Re: Reduce white Space below Figure Captions only

Post by Tissie »

Thx a lot for your kind assistance :)

Best,
Tissie
Post Reply