3

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}​
2
  • 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 at 14:45
  • Thank you for your reply @Bernard . Can you help me to add a new define for enumerate Jul 24 at 15:12
5

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

2
  • Thanks a lot, it is working, you saved me. Jul 24 at 15:38
  • 1
    You're welcome. Always glad to help!
    – Bernard
    Jul 24 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.