[Tex/LaTex] Indentation in enumerate/list

#enumerateenumitemindentation

I'm trying to get rid of indentation in enumerate. The code below shows the indentation with enumerate, and then the only partial fix I could implement. With enumitem package I could avoid indentation on the 'count' line through leftmargin=*, but there is still indentation in the text. How could I fix that?

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}

\blindtext

\begin{enumerate}
\item Case $a\in B$

\blindtext

\item Case $a\in C$

\blindtext

\end{enumerate}

\begin{enumerate}[leftmargin=*]
\item Case $a\in B$

\blindtext

\item Case $a\in C$

\blindtext

\end{enumerate}

\end{document}

Best Answer

This requires some manual adjustment, as you have to modify the argument for widest to be the widest number in the list. As the item numbers are right aligned, only the widest run to the margin, the rest are indented a bit.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{showframe}
\begin{document}

\begin{enumerate}[label=(\roman*),widest=viii,itemindent=*,leftmargin=0pt]
\item Case $a\in B$

More text \setcounter{enumi}{7}
\item Case $a\in B$

more text
\end{enumerate}

\begin{enumerate}[widest=99,itemindent=*,leftmargin=0pt]
\item Case $a\in B$

More text \setcounter{enumi}{9}
\item Case $a\in B$

more text
\end{enumerate}
\end{document}

enter image description here

Related Question