Text FormattingSpace between figure and text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm

Space between figure and text

Post by avp3000 »

Hello,

I get too much space between the caption of a figure and the following text. I searched for old posts and stumbled upon the command

Code: Select all

\textfloatsep
. However, I saw some examples for

Code: Select all

\setlength{\textfloatsep}{%%}
and noticed that for %% I have to use a value + value - value. As in

Code: Select all

\setlength
{\textfloatsep}{20pt plus 2pt minus 4pt}
. Can you tell what these values stay for, what are the default values under the article class and whether this is the right way to change the spacing at all.

Thank you very much in advance.

Recommended reading 2024:

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

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

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Space between figure and text

Post by gmedina »

That's and example of a "rubber length"; i.e., a one that has a natural length plus a degree of elasticity.

Something like 20.0pt plus 2.0pt minus 4.0pt represents a length with natural length of 20pt that can, if necessary, shrink to 18pt or expand to 24pt.

You can find the value of \textfloatsep by adding \the\textfloatsep to the body of your document. Once compiled you will see the value.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm

Re: Space between figure and text

Post by avp3000 »

Thanks gmedina, you gave me a very useful explanation :) :D
Post Reply