2

I have the following code which produces the document below:

\documentclass{article}

\usepackage{blindtext}
\usepackage{enumitem}

\setlength{\parindent}{0em}
\setlength{\parskip}{0em}

\setlist[enumerate]{noitemsep,label=\arabic*)}

\begin{document}
\blindtext

\begin{enumerate}
    \item \blindtext
    \begin{enumerate}[label=\alph*)]
        \item \blindtext
        \item \blindtext
    \end{enumerate}
\end{enumerate}
\end{document}

enter image description here

I would like to have the item labels aligned with the left-hand side of the text in the paragraph above it - i.e. I would like the "1)" label to move to the left slightly, and the "a)" label should move left by the same amount, so it is aligned with the text under item 1.

I've tried adding the leftmargin=\parindent option in the \setlist, but this pushed the labels too far left (behind the left margin).

Edit

A possible solution, provided by Bernard in the comments below, is to use the wide=0pt key. This produces the following result:

enter image description here

The problem I have with this is now the labels are aligned inside the rest of the paragraph (text appears directly below the label, which is not quite what I wanted).

6
  • 2
    Add the [wide=0pt] key.
    – Bernard
    Commented Oct 23, 2018 at 16:59
  • That's a good start, thank you. However, the "1)" label is now inside the paragraph, which I don't really want.
    – Garf
    Commented Oct 23, 2018 at 17:01
  • What do you mean with ‘inside the paragraph’?
    – Bernard
    Commented Oct 23, 2018 at 17:03
  • See edited question
    – Garf
    Commented Oct 23, 2018 at 17:06
  • do you really set your main text with parindent and parskip both zero? how can the reader see a new paragraph? Commented Oct 23, 2018 at 17:29

1 Answer 1

3

Is this what you want?

\documentclass{article}

\usepackage{blindtext}
\usepackage{enumitem}

\setlength{\parindent}{0em}
\setlength{\parskip}{0em}

\setlist[enumerate]{noitemsep,label=\arabic*),wide = 0pt, leftmargin = *}

\begin{document}

\blindtext

\begin{enumerate}
    \item \blindtext
    \begin{enumerate}[label=\alph*)]
        \item \blindtext
        \item \blindtext
    \end{enumerate}
\end{enumerate}

\end{document} 

enter image description here

0

You must log in to answer this question.

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