# Space between item label and paragraph, enumitem

In the MWE below, how can I reduce the space between the (i)/(ii) and their respective paragraphs, i.e. the blue lines? I would like to

1. keep the "exercises" labels hugging the left margin
2. keep the "subparts" labels hugging the left margin

If I use the labelsep parameter, the (i) and (ii) are dragged away from the left margin. Moreover, I don't think I'm using the widest parameter correctly.

\documentclass{article}
\usepackage[margin={1.25in,1.1in}]{geometry}
\usepackage{mathtools,enumitem,lipsum}

\newlist{exercises}{enumerate}{1}
\setlist[exercises]{label=\textbf{\thesection-\arabic*.\;},align=right,leftmargin=0pt,itemsep=15pt}
\newlist{subparts}{enumerate}{2}
\setlist[subparts]{label=(\roman*),align=left,widest=i}

\begin{document}

\section{Testing section}

\begin{exercises}
%
\item \lipsum[1]
\item
\begin{subparts}
\item \lipsum[2]
\item \lipsum[3]
\end{subparts}
\item
\end{exercises}

\end{document}


• Are you sure you want the first level list labels in the margin? – Bernard Jun 22 '18 at 19:09
• Yes, the idea is that they are labeling exercises. – user217285 Jun 22 '18 at 19:12

The widest-parameter, from page 5 in the docs, says it should be used in conjunction with the *-values. That is if we do leftmargin=* then the widest=i would decide how much leftmargin there should be. This used in combination with labelsep gives you a result that I think is what you want:

\setlist[subparts]{label=(\roman*),align=left,widest=ii,
labelsep=0pt,leftmargin=*}


Where labelsep is the distance from the counter mark. If you increase the widest you increase the space between the "anchor point" of the label (try changing it to e.g. widest=i or widest=iii or widest=asdf). labelsep increases extra distance from the widest label and out.

Doing this produces:

Here is the code in it's entirety:

\documentclass{article}
\usepackage[margin={1.25in,1.1in}]{geometry}
\usepackage{mathtools,enumitem,lipsum}

\newlist{exercises}{enumerate}{1}
\setlist[exercises]{label=\textbf{\thesection-\arabic*.\;},align=right,leftmargin=0pt,itemsep=15pt}
\newlist{subparts}{enumerate}{2}
\setlist[subparts]{label=(\roman*),align=left,widest=i,
labelsep=0pt,leftmargin=*}

\begin{document}

\section{Testing section}

\begin{exercises}
%
\item \lipsum[1]
\item
\begin{subparts}
\item \lipsum[2]
\item \lipsum[3]
\end{subparts}
\item
\end{exercises}

\end{document}


Something like this?

\documentclass{article}
\usepackage[margin={1.25in,1.1in}, showframe]{geometry}
\usepackage{mathtools,enumitem,lipsum}

\newlist{exercises}{enumerate}{1}
\setlist[exercises]{label=\textbf{\thesection-\arabic*.\;}, labelsep=2pt, leftmargin=0pt, itemsep=15pt}
\newlist{subparts}{enumerate}{2}
\setlist[subparts]{label=(\roman*), wide=0pt, leftmargin=* , labelsep=-3pt}

\begin{document}

\section{Testing section}

\begin{exercises}
%
\item \lipsum[1]
\item
\begin{subparts}
\item \lipsum[2]
\item \lipsum[3]
\end{subparts}
\item
\end{exercises}

\end{document}