[Tex/LaTex] How to change the spacing between figures/tables and text

floatsspacing

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?

Best Answer

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.