4

How to put a repeated word "Step" before this enumerate This answer?

Step 1. text
Step 1.1 text
Step 1.2 text
Step 2 text

\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\begin{document}
\begin{enumerate}
  \item First
  \begin{enumerate}[label*=\arabic*.]
    \item Second
    \item Third
  \end{enumerate}
  \item Fourth
\end{enumerate}
\end{document}​
campa
  • 31,130
  • 1
    Welcome to TeX SX! You can use [label*=Step \arabic], or define a new enumerate-like list, say enumstepsand define its layout in the preamble, to avoid repeating the optional arguments in the document body each time you want to use it. – Bernard Jul 24 '21 at 14:45
  • Thank you for your reply @Bernard . Can you help me to add a new define for enumerate – Ahmed Desoky Jul 24 '21 at 15:12

1 Answers1

6

Here is a code defining a new list type:

\documentclass{article}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\newlist{enumsteps}{enumerate}{2}
\setlist[enumsteps,1]{label=Step \arabic*. }
\setlist[enumsteps,2]{label=Step \arabic{enumstepsi}.\arabic* }

\begin{document}

\begin{enumsteps} \item First \begin{enumsteps} \item Second \item Third \end{enumsteps} \item Fourth \end{enumsteps}

\end{document}​

enter image description here

Bernard
  • 271,350