2

I'd like to number some of my paragraph headings. If I use \theparagraph, the counter starts at zero and doesn't count up. How can I fix this?

MWE:

\documentclass{article}
\begin{document}

\section{Heading}
\subsection{Heading}
\subsubsection{Heading}
\paragraph{\theparagraph \quad Heading} 
\paragraph{\theparagraph \quad Heading}

\end{document}
0

1 Answer 1

5

The key is the counter secnumdepth (i.e., section numbering depth), which defaults to 3 in the article class. To get paragraphs numbered and counted (in addition to sections, subsections, and subsubsections), just increase the default value of secnumdepth to 4.

\documentclass{article}
\setcounter{secnumdepth}{4}
\begin{document}

\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph} 
\paragraph{Paragraph}
\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 .