5

I'm writing a text and I want to save as much space as I can. I'm using the package \usepackage{enumitem} in order to manipulate the enumerate easily. In the following code there si a problem with the alignment

\documentclass{article}
\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}
  \begin{enumerate}[leftmargin=0pt, label=\bfseries{Problem \theenumi.-}, itemindent=*]
    \setcounter{enumi}{1}\item \blindtext
    \setcounter{enumi}{10}\item \blindtext
    \setcounter{enumi}{2}\item \blindtext
  \end{enumerate}
\end{document} 

enter image description here

Clearly, when the counter has 2 digits, the alignment fails. How can I solve this problem? Is there another package that I can use?

1 Answer 1

5

You can add align=left:

\documentclass{article}
\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}
  \begin{enumerate}[leftmargin=0pt, label=\textbf{Problem \theenumi.-}, itemindent=*,align=left]
    \setcounter{enumi}{1}\item \blindtext
    \setcounter{enumi}{10}\item \blindtext
    \setcounter{enumi}{2}\item \blindtext
  \end{enumerate}
\end{document} 

result

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .