1

For example, the following code

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{enumerate}[itemsep=0ex]
\item Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate.
\item Rough winds do shake the darling buds of May,
And summer’s lease hath all too short a date.
\end{enumerate}

\end{document}

will yield the texts in the following format

sonnet

I want to reduce the space between space within a list, like the space between "temperate" and the "shall I" line. I tried enumerate package keywords like itemsep, parsep, or nosep, and none of them worked. Both itemsep and parsep reduced space between sentence 1 and 2 rather than line 1 and 2.

I think enumerate should be able to control this but I cannot find it.

10
  • 1
    Welcome! Please edit to make your code compilable. That's much more useful than a mere fragment. Your snippet isn't supported by core LaTeX, we don't know what class you are using etc.
    – cfr
    Commented Feb 6, 2018 at 4:25
  • 1
    Also your curly apostrophes don't typeset.
    – cfr
    Commented Feb 6, 2018 at 4:27
  • It sounds like you want to decrease the line spacing, in which case this is nothing to do with the enumerate environment. Try \renewcommand{\baselinestretch}{0.8}.
    – user30471
    Commented Feb 6, 2018 at 4:28
  • @cfr Thank you for your comment! I left class file out for not being wordy. It should compile now.
    – Musen
    Commented Feb 6, 2018 at 4:28
  • The class can affect the typesetting of the environment, so leaving it out means we don't know what the starting point is. Your apostrophes still disappear, though.
    – cfr
    Commented Feb 6, 2018 at 4:30

1 Answer 1

1

in case that this features you like to have in all enumerate lists:

\documentclass[12pt]{article}
%\usepackage{enumitem}
\usepackage{etoolbox} % <--- added
\AtBeginEnvironment{enumerate}{\linespread{.84}\selectfont}% <--- added

\begin{document}
\begin{enumerate}
    \item Shall I compare thee to a summer's day?
    Thou art more lovely and more temperate.
    \item Rough winds do shake the darling buds of May,
    And summer' lease hath all too short a date.
\end{enumerate}
\end{document}

enter image description here

note: package etoolbox provide bunch of very helpful macros. among them is \AtBeginEnvironment which insert at beginning of named environment's the code which you like to execute at its beginning. this make the same result as it is obtained, when you all your enumitem lists write as

{\linespace{0.84}\selectfont}
\begin{enumerate}
    \item Shall I compare thee to a summer's day?
    Thou art more lovely and more temperate.
    \item Rough winds do shake the darling buds of May,
    And summer' lease hath all too short a date.
\end{enumerate}
}

in your case i use it to reduce line spreading in all enumerate list from normal 1 to 0.84. this has nothing with package enumitem, however it works also with it if you use it for other list settings.

in case, that you wish to change line spreading only in one ˙enumeratelist, than you use above showed example and omitetoolboxand definition with\AtBeginEnvironment`.

for more help you should provide complete small document which we can copy and test. solution in my mwe (minimal working example) works as advertised :-).

4
  • Can you explain a little bit more about command AtBeginEnvironment and what it does? Also wondering why you made it even without \usepackage{enumitem}?
    – Musen
    Commented Feb 6, 2018 at 5:05
  • Also, I can see it works in the minimal case I set up, but it does not work in my real document. I think your explanation may guide me to a practical solution.
    – Musen
    Commented Feb 6, 2018 at 5:08
  • @Musen If it works in your MWE but not in your real document, it might be helpful to show your complete document or preamble. It could be another package specific settings that interfere with enumitem. Commented Feb 6, 2018 at 5:33
  • 1
    With the enumitem package, you could also just include the before option. E.g., \begin{enumerate}[before=\linespread{.84}\selectfont].
    – rickhg12hs
    Commented Dec 24, 2021 at 23:26

You must log in to answer this question.

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