[Tex/LaTex] Enumerate: make labels and items aligned left within a theorem

#enumerateamsthmenumitemtheorems

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.

Best Answer

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}