2

I have a document with an enumerate environment, where I have baselinestretch set to 1, and for the most part, this appears to be working. However, when the contents of an \item in an enumerate environment are longer than one line, the spacing between the lines within the item appears to be about double what it is in the rest of the document.

So, this code:

Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing
\begin{enumerate}[noitemsep]
  \item first item
  \item second item (imagine this fills a line on the page)
        still the second item, which has wrapped onto this new line.
  \item third item
\end{enumerate}
Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing

results in a document that looks sort of like this:

Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing
  1. first item
  2. second item (imagine this fills a line on the page)
                                 <-- this is the space I am refering to -->
     still the second item, which has wrapped onto this new line.
  3. third item
Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing

How should I fix that?

  • Unlike any other programming languages, it makes a lot of difference if you change the preamble of your document in terms of the output, such as clashing packages or page settings changed by some detail in the code and so on. That's why we need to have a complete example together with the relevant parts of your preamble included. Otherwise, we might not be able to reproduce your problem. – CarLaTeX Jun 1 '17 at 6:15
  • 2
    I cannot reproduce the described result. Please show us a minimal but working example (MWE) from \documentclass till \end{document} that allows us to reproduce the issue. – Schweinebacke Jun 1 '17 at 6:15
1

If you get that space then your image has some whitespace at the bottom or a depth, which is, of course, unusual. An image without a depth is placed with its bottom on the current line:

\documentclass[12pt]{article}
\usepackage[demo]{graphicx}
\usepackage{enumitem}
\begin{document}    

Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing
\begin{enumerate}[noitemsep]
    \item first item
    \item \includegraphics[width=\linewidth,height=1cm]{demo}
    still the second item, which has wrapped onto this new line.
    \item third item
\end{enumerate}
Regular lines of text (imagine this fills a line on the page)
wrap with the correct spacing

\end{document}

enter image description here

| improve this answer | |

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.