4

Just what the title says: I want to make an enumerate list in which both the labels and items are aligned to the left. I can currently only get one or the other.

Minimal working example:

\documentclass{report}
\usepackage{amsthm}
\usepackage{enumitem}

\newtheoremstyle{theorem}
    {1em}{}{\itshape}{}{\bfseries}{}{1em}
    {\thmname{#1}\thmnumber{ #2}\thmnote{ (\normalfont\textit{#3})}}
\theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]

\begin{document}
\begin{thm}
\mbox{}\vspace{-0.175cm}
\begin{enumerate}[leftmargin=0.87cm, labelsep=0.325cm, 
    align=left, itemsep=-0.1cm, font=\normalfont, label=(\roman*)]

    \item First item.
    \item Second item.
    \item Third item.

\end{enumerate}
\end{thm}
\end{document}

I also would like a way to have the labels flush left with the margin, besides guessing and manually adjusting it each time.

It should look something like this:

(i)    First item.
(ii)   Second item.
(iii)  Third item. 
(iv)   Fourth item. 
etc.
7

Let enumitem figure out the leftmargin=* along with align=left:

enter image description here

As per you comments if you want it left aligned but with some indent, then you could define a custom alignment:

\SetLabelAlign{LeftAlignWithIndent}{\hspace*{2.0ex}\makebox[1.5em][l]{#1}}

and then using align=LeftAlignWithIndent you get:

enter image description here

Notes:

  • The showframe package was used just to show the page margins. It is not needed in your actual use case.

Code:

\documentclass{report}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{showframe}

\SetLabelAlign{LeftAlignWithIndent}{\hspace*{1.0ex}\makebox[1.25em][l]{#1}}

\newtheoremstyle{theorem}
    {1em}{}{\itshape}{}{\bfseries}{}{1em}
    {\thmname{#1}\thmnumber{ #2}\thmnote{ (\normalfont\textit{#3})}}
\theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]

\begin{document}
\begin{thm}
\mbox{}\vspace{-0.175cm}
\begin{enumerate}[leftmargin=*, labelsep=*, 
    align=left, itemsep=-0.1cm, font=\normalfont, label=(\roman*)]

    \item First item.
    \item Second item.
    \item Third item.

\end{enumerate}
\end{thm}

\begin{thm}
\mbox{}\vspace{-0.175cm}
\begin{enumerate}[leftmargin=*, align=LeftAlignWithIndent, 
    itemsep=-0.1cm, font=\normalfont, label=(\roman*)]

    \item First item.
    \item Second item.
    \item Third item.

\end{enumerate}
\end{thm}
\end{document}
  • This wasn't part of the original question, but how would I make the labels (still aligned left) some fixed distance from the margin? For instance, \parindent from the margin? – Randy Randerson Oct 14 '14 at 1:49
  • @fctaylor25: See revised solution. – Peter Grill Oct 14 '14 at 7:08
2

Is that OK? I introduced parameter values that depend on the font, so that you can change it (size, family) without having to recompute them. I defined a labelwidth large enough for the label not to overlap the item body.

If you want the labels to begin at a nonzero distance from the left margin, they'd look better right-aligned, in my opinion. I give an example of this.

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage{enumitem}

\newtheoremstyle{theorem}
    {1em}{}{\itshape}{}{\bfseries}{}{1em}
    {\thmname{#1}\thmnumber{ #2}\thmnote{ (\normalfont\textit{#3})}}
\theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]

\begin{document}

\begin{thm}\mbox{}
\begin{enumerate}[wide = 0pt, labelwidth = 2em, labelsep*=0em, itemindent = 0pt, leftmargin = \dimexpr\labelwidth + \labelsep\relax, noitemsep,topsep = 1ex, font=\normalfont, label=(\roman*)]

    \item First item.
    \item Second item. Second item. Second item. Second item. Second item. Second item. Second item. Second item.
    \item Third item.

\end{enumerate}
\end{thm}

\begin{thm}\mbox{}
Text text text text text text text text text text text text text text text text text text text text text text text text text.
\begin{enumerate}[wide = 0pt,align = right, labelwidth = 3em, leftmargin =\dimexpr\labelwidth + \labelsep\relax , noitemsep,topsep = 1ex, font=\normalfont, label=(\roman*)]
    \item First item.
    \item Second item. Second item. Second item. Second item. Second item. Second item. Second item. Second item.
    \item Third item.

\end{enumerate}
\end{thm}

\end{document} 

enter image description here

  • @fctaylor25: I added an example of the labels beginning at 1 em distance from the left margin. I mage it right-aligned, as I think it looks better in that case, but it's easy to have it left-aligned. – Bernard Oct 14 '14 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.