3

I'm trying to use enumitem to modify my lists so that they're flush to the left side of the paper but so that any nested lists are properly indented.

This is what I've tried:

\documentclass[12pt,letterpaper]{article}
    \usepackage{enumitem}
    \setlist{nolistsep}
    \newenvironment{notes}
        {\begin{itemize}[label=,leftmargin=0em,labelindent=1cm]\ignorespaces}
        {\end{itemize}\ignorespacesafterend}

\begin{document}
\begin{notes}
    \item item 1
    \item item 2
        \begin{notes}
            \item item 2.a
            \item item 2.b
        \end{notes}
\end{notes}

\end{document}

It ends up looking like this:

item 1
item 2
item 2.a
item 2.b

How can I modify it so it looks like this?

item 1
item 2
    item 2.a
    item 2.b

1 Answers1

2

You can us adjust the \leftmargin once you are inside the notes list:

    \newcommand{\LeftMargin}{0em}%
    \newenvironment{notes}{%
         \begin{itemize}[label=,leftmargin=\LeftMargin,labelindent=1cm]%
          \renewcommand*{\LeftMargin}{1cm}%
          \ignorespaces%
    }{%
        \end{itemize}%
        \ignorespacesafterend%
    }
Peter Grill
  • 223,288