0

I am trying to make a nested enumerate list like this one:

enumerate list

I would like to reduce the spacing between Outer item 1 and Inner item 1.1, but keep all other spacings. How?

Current code:

\documentclass[a4paper]{article}
\usepackage{enumitem}
\begin{document}

\begin{enumerate}
    \item Outer item 1
        \begin{enumerate}[label=\alph*., nolistsep]
            \item Inner item 1.1
            \item Inner item 1.2
            \item Inner item 1.3
            \item Inner item 1.4
        \end{enumerate}
    \item Outer item 2
        \begin{enumerate}[label=\alph*., nolistsep]
            \item Outer item 2.1
            \item Outer item 2.2
        \end{enumerate}
\end{enumerate}

\end{document}

I tried with nolistsep at outer enumerate and with topsep=0pt, but I didn't manage to get what need.

3
  • When posting a MWE, please make sure it compiles. This is especially needed when you're using a package that it needs in order to compile. Since you only are trying to change the spacing in one place, my first thought is to use \vspace* with a negative distance. It's not the most elegant solution, but it's an easily customizable quick fix.
    – user26305
    Jun 26, 2023 at 19:36
  • "keep all other spacings" mean avoid only space starting both nested lists? or what seems more weird to me, maintain also the space between 2 and 2.1 ?
    – Fran
    Jun 27, 2023 at 5:41
  • The first option. :)
    – Lolek
    Jun 27, 2023 at 20:36

1 Answer 1

1

I found an answer that works for me, using parsep to avoid spacing between Outer item 1 and Inner item 1.1 and itemsep to make the spacing between Inner item 1.4 and Outer item 2 a bit larger:

\documentclass[a4paper]{article}
\usepackage{enumitem}
\begin{document}

\begin{enumerate}[parsep=0pt, itemsep=8pt]
    \item Outer item 1
        \begin{enumerate}[label=\alph*., nolistsep]
            \item Inner item 1.1
            \item Inner item 1.2
            \item Inner item 1.3
            \item Inner item 1.4
        \end{enumerate}
    \item Outer item 2
        \begin{enumerate}[label=\alph*., nolistsep]
            \item Outer item 2.1
            \item Outer item 2.2
        \end{enumerate}
\end{enumerate}

\end{document}

You must log in to answer this question.

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