4

I would like auto numbering to continue after the custom label if possible? I tried setcounter{enumi} but I don't know how to get the last auto number and then add one to it.

I would also like the single custom label aligned with all the other labels if possible.

\documentclass[oneside,12pt]{scrartcl}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{refcount}
\usepackage{enumitem}

\begin{document}

\lipsum[66]

\begin{enumerate}[label=\textbf{Step \arabic*}:]
\addtolength{\itemindent}{1.65cm}

\item I like a clean look so I aligned Step 1 with the text.  This is what I want with all my steps.

\item [\textbf{Step 2 a)}:] I can manually put in Step 2 a): but how do I get it to align with Step 1 and the other steps?

%\setcounter{enumi}{2} Not sure how to set this dynamically

\item I really want this to be Step 3 without having to hardcode in Step 3 because I have a bunch more steps that I just want to be auto numbered.

\item \lipsum[66] % Should be step 4

\end{enumerate}

\end{document}

Alignment of custom label

3
  • You can add \stepcounter{enumi} to the item with the custom number in order to increase the counter by one. Regarding the alignment: could you please specify more detailes, how the desired alignment should look like? You could left-align all 'Step's by adding the option align=left to the enumerate environment.
    – leandriis
    Jun 10, 2018 at 19:22
  • You can use \addtocounter{enumi}{1} to set the counter value relative to it's past value. By default the labels of an enuerate are aligned right.
    – dexteritas
    Jun 10, 2018 at 19:25
  • Thank you! align=left worked with the addtolength to get exactly what I wanted Jun 10, 2018 at 19:39

1 Answer 1

5
\documentclass[oneside,12pt]{scrartcl}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{refcount}
\usepackage{enumitem}
\SetLabelAlign{step}{\bfseries Step #1:\hfil}
\begin{document}

\lipsum[66]

\begin{enumerate}[label=\arabic*,align=step,itemindent=\leftmargini]

\item I like a clean look so I aligned Step 1 with the text.  This is what I want with all my steps.

\stepcounter{enumi}
\item [\theenumi{} a)] I can manually put in Step 2 a): but how do I get it to align with Step 1 and the other steps?

 Not sure how to set this dynamically

\item I really want this to be Step 3 without having to hardcode in Step 3 because I have a bunch more steps that I just want to be auto numbered.

\item \lipsum[66] % Should be step 4

\end{enumerate}

\end{document}

enter image description here

You must log in to answer this question.

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