[Tex/LaTex] paragraph numbering

numberingsectioning

I am using the paragraph section head, i.e.,

\paragraph{This is a cool paragraph} 

I would like it to compile with numbering. If I change the secnumdepth (i.e., \setcounter{secnumdepth}{4}) this will work, but produce the "wrong" type of numbering, i.e.,

1.1.1.1 This is a cool paragraph

1.1.1.2 This is another cool paragraph etc.

What I would like is

1 This is a cool paragraph

2 This is another cool paragraph

or, if not,

1.1 This is a cool paragraph

1.2 This is another cool paragraph

where the first 1 indicates the section number and suppresses the subsection and subsubsection numbers. Can this be done?

Best Answer

Here's an enumitem way instead of \paragraph. The paragraphlisti counter is reset by each subsubsection step (if such levels are used at all)

David Carlisle's comment about \renewcommand{\theparagraph}{\arabic{paragraph}} is of course the easiest way!

\documentclass{article}

\usepackage{chngcntr}
\usepackage{enumitem}

\newlist{paragraphlist}{enumerate}{1}


\setlist[paragraphlist,1]{leftmargin=*,label={\bfseries \arabic*}}

\counterwithin{paragraphlisti}{subsubsection}

\begin{document}

\section{Foo}

\subsection{Foo sub}

\subsubsection{Foo subsub}

\begin{paragraphlist}

\item New Paragraph

\item Other Paragraph
\end{paragraphlist}


\section{Bar}

\subsection{Bar sub}

\subsubsection{Bar subsub}

\begin{paragraphlist}

\item New Paragraph

\item Other Paragraph
\end{paragraphlist}


\end{document}

enter image description here