121

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)?

16

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
    Or just use [!hbp] (i.e. don't allow the t option which could put the image before the relevant text) – Seamus Nov 28 '10 at 14:46
192

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.

  • 2
    @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. – Dave Jarvis Sep 19 '14 at 5:05
  • @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 '14 at 12:03
  • Is there something similar for \begin{enumerate}? – Michael Clerx Oct 28 '16 at 11:35
  • 1
    @ Michael Clerx: for \begin{enumerate} use the very same \itemsep+length approach (this works with any list environment) – Harry Oct 28 '16 at 12:20
  • 5
    It's cleaner to add it as a parameter: \begin{itemize}[\itemsep=0em] etc. – Abhishek Divekar Mar 23 '17 at 13:21
54

"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.

  • 1
    good answer. This solution applies to all lists. Using \itemsep0em requires one to add it to each list. So this solution is much easier actually. I am surprised no one up voted it before. – Nasser Aug 9 '14 at 19:25
3

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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