207

Background

All book figures are set to "here definitely" (as they must come after the text that introduces them).

Problem

The list types (enumerated and bullet) have too much space between them. The reason seems to be because the TeX engine wants to use up as much space on the page as possible, since the next page is essentially a large image that cannot fit on the current page. For example:

Related Links

Question

What can be done to keep the text in lists together (even if it means plenty of space at the bottom of the page)?

5 Answers 5

28

As "plenty of space at the bottom of the page" seems to be acceptable to you, try to add \raggedbottom to your preamble (the default for the book class is \flushbottom).

A better solution is not to set every float to "here definitely", but to use \usepackage{flafter}. The flafter package ensures that floats won't be typeset before their in-text reference.

1
  • 1
    Or just use [!hbp] (i.e. don't allow the t option which could put the image before the relevant text)
    – Seamus
    Nov 28, 2010 at 14:46
336

My way of dealing with this situation is the "\itemsep"+length approach:

\begin{itemize} 
\itemsep0em 
\item one
\item two
\item three
\end{itemize}

where "length" can even be a negative value.

6
  • 6
    @LondonRob: The only reason I didn't accept this answer was because it felt like mixing presentation with content. Importing a package was simpler than changing all the itemized lists in the document. Adding \raggedbottom affected all lists using one line of code. Sep 19, 2014 at 5:05
  • 3
    @DaveJarvis: Yeah, actually this is a good solution, but not quite to the problem in the original post! Accepted answer is better for this particular use case. This answer is better for a more general problem of spacing in lists.
    – LondonRob
    Sep 19, 2014 at 12:03
  • 1
    @ Michael Clerx: for \begin{enumerate} use the very same \itemsep+length approach (this works with any list environment)
    – Harry
    Oct 28, 2016 at 12:20
  • 22
    It's cleaner to add it as a parameter: \begin{itemize}[\itemsep=0em] etc. Mar 23, 2017 at 13:21
  • 3
    with enumitem and \begin{enumerate}[itemsep=0em] works for me. Adding a `` stalls compilation
    – Damitr
    Apr 5, 2020 at 18:34
123

"enumitem" package

Using the enumitem package, we can achieve a lot. Not only can we reduce item separation, but also we can reduce list separation:

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}

\begin{document}
    A normal list:
    \begin{itemize}
        \item one
        \item two
        \item three
    \end{itemize}

    No item separation:
    \begin{itemize}[noitemsep]
        \item one
        \item two
        \item three
    \end{itemize}

    No item and no list separation:
    \setlist{nolistsep}
    \begin{itemize}[noitemsep]
        \item one
        \item two
        \item three
    \end{itemize}
\end{document}

output from example

Renew commands manually

Or you could renew the list commands:

\renewcommand{\@listI}{%
\leftmargin=25pt
\rightmargin=0pt
\labelsep=5pt
\labelwidth=20pt
\itemindent=0pt
\listparindent=0pt
\topsep=0pt plus 2pt minus 4pt
\partopsep=0pt plus 1pt minus 1pt
\parsep=0pt plus 1pt
\itemsep=\parsep}

Check also this post on stackoverflow.

4
7

I use vspace, gives you full control on the amount of space. I agree that case of long lists general solution like enumitem are better.

Code example:

    \begin{itemize}
        \vspace{-0.2cm}\item First Line
        \vspace{-0.2cm}\item Second Line 
    \end{itemize}

enter image description here

6

You could try to add a \vfill after your list:

\end{enumerate}
\vfill

~
The picture

the ~ is needed because space at the end of the page might won't show.

Another way is to explicitly change the page with \newpage

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .