Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was wondering if there is any way to lessen the spaces between figures and text. In my paper I have a lot of figures (graphics) and it is inconvenient for me to have default (large) spaces between text and graphics. Is there any command I could use to change the default settings?

share|improve this question
1  
Maybe you'd benefit from grouping figures with subfig? –  N.N. Aug 25 '11 at 15:08
    
Here's a related answer: Space after float with h. It also shows a graphic of where the lengths play a role - from the layouts package documentation. –  Werner Aug 25 '11 at 15:47

1 Answer 1

up vote 41 down vote accepted

Change one or more of the following lengths:

  • \textfloatsep — distance between floats on the top or the bottom and the text;
  • \floatsep — distance between two floats;
  • \intextsep — distance between floats inserted inside the page text (using h) and the text proper.

The command used to change them is \setlength:

\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}

The default values in the article document class with the 10pt option are:

  • \textfloatsep: 20.0pt plus 2.0pt minus 4.0pt;
  • \floatsep: 12.0pt plus 2.0pt minus 2.0pt;
  • \intextsep: 12.0pt plus 2.0pt minus 2.0pt.

You can get them yourself with \showthe\textfloatsep or \the\textfloatsep etc.

The plus and minus parts allow the space to stretch or shrink (the greater they are, the more it stretches or shrinks when needed). It's not recommended to leave out the plus and minus parts, as it leaves LaTeX less typesetting choices to select from and the output might look worse.

When typesetting in two column mode, two more lengths are available:

  • \dbltextfloatsep — distance between a float spanning both columns and the text;
  • \dblfloatsep — distance between two floats spanning both columns.

Remember that too little space will, again, make the document look worse.

share|improve this answer
    
"\intextsep — distance between floats inserted inside the page text (using h) and the text proper." so if I use H(capital H) which option should I change ? –  kronos Aug 25 '11 at 15:38
    
@kronos: It is the same for h and H. –  Andrey Vihrov Aug 25 '11 at 15:44
3  
@AndreyVihrov One important question remains: How can I set this locally? I know I can use \begingroup, so my question is rather, does that change for the whole document if I place \setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt} before the figure? Also maybe there is a different way to obtain local changes? –  TomM Jan 3 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.