I'm using \section in one of my documents. However, I would like my sections to be numbered in the following way: "Step 1: -----", "Step 2: -----", etc. Is there a simple way to do this with the section command, while still having the steps automatically renumber themselves (i.e. so I can refer to the section numbers with \ref)?
2 Answers
A version which changes the \thesection command to include Step. As a result, it should be replaced everywhere. If you don't want that you'll have to change \thesubsection to not include Step. Also it would lead to problems if you use a ToC, as the width of Step 1: would be too wide.
\documentclass[]{article}
\usepackage{duckuments}
\renewcommand*\thesection{Step \arabic{section}:}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\begin{document}
\duckument
\end{document}
A version with changing the section header and using cleveref to change the reference format to Step ... etc.
\documentclass{article}
\usepackage{cleveref}
\crefname{section}{step}{steps}
\Crefname{section}{Step}{Steps}
\newcommand{\sectionheadingformat}{%
Step \thesection: -----\quad%
}
\makeatletter
\let\latex@@seccntformat\@seccntformat
\renewcommand{\@seccntformat}[1]{%
\ifnum0=\pdfstrcmp{#1}{section}%
\sectionheadingformat%
\else
\latex@@seccntformat{#1}%
\fi
}
\makeatother
\begin{document}
\tableofcontents
Please see \Cref{foo:sec} or \Cref{other:sec}.
\section{Section} \label{foo:sec}
\subsection{Subsection}
\subsubsection{SubSubsection}
\section{Other section} \label{other:sec}
\end{document}


Step 1as well? What about the entry in the toc? What is ----- supposed to be?