# I am using Lyx to edit my document and would like to reduce the spacing between subsections

I am using floats throughout the text perhaps this messes with spacing. It seems such an easy thing to adjust, yet I find no answer.

-
I've supplied a generic answer to your problem addressing lengths between text elements and headings/floats. You need to provide more detail in order to obtain an adequate solution. For example, what document class are you using? You mention both floats and headings; is this correct? Perhaps you can include an image of the desired and current output to highlight your problem. See How can I upload an image to be included in a question or answer? –  Werner Nov 25 '12 at 18:00

As a general guide, the `layouts` documentation provides the different lengths associated with various elements within a document.

### Section layout:

In the default LaTeX document classes (`article`, `book` and `report`), sections are set using `\@startsection`. Here's a take with some description of when each argument means if you wish to change `\subsubsection`, say (taken directly from the `layouts` documentation):

``````\makeatletter
\renewcommand{\subsubsection}{\@startsection%
{subsubsection}% name
{3}% level
{0mm}% indent
{-\baselineskip}% beforeskip
{0.5\baselineskip}% afterskip
{\large\itshape}}% style
\makeatother
``````

A visual representation of the length locations/usage within the context of the heading (two different types, depending on whether `afterskip` is positive/negative ~ display/run-in):

There's also the `titlesec` and `sectsty` packages that could help in adjusting these values.

### Floats layout:

Lengths affecting the location of textual content with respect to floats are `\floatsep`, `\textfloatsep` and `\intextsep`. Their default values, as set in `latex.ltx`, are:

``````\newskip\floatsep
\newskip\textfloatsep
\newskip\intextsep
\setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}% 12pt plus 2pt minus 2pt
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}% 20pt plus 2pt minus 4pt
\setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}% 12pt plus 2pt minus 2pt
``````

A visual representation of their locationa amongst other document elements are given in Figure 13:

You can modify this in the preamble of your LyX document. For example, adding

``````\setlength{\textfloatsep}{\baselineskip}
``````

would fix the separation between top/bottom floats to a line of text.

Note that all these modifications, if applied, will have a global effect on your document. This is a good thing, for the sake of consistency. However, manual modifications are also possible (not recommended), and should be left until the end of your document production.

-