12

I want to use a list of \subsection elements numbered "1", "2", "3", "4"... but by default they're numbered "0.1", "0.2", "0.3", "0.4".

How do I do this?

8

Using \section* doesn't allow for a resetting of the subsection counter. For ease-of-use, you could redefine \section to always be \section* using the following:

enter image description here

\documentclass{article}
\let\oldsection\section
\renewcommand{\section}{\stepcounter{section}\oldsection*}
\renewcommand{\thesubsection}{\arabic{subsection}}
%\usepackage{chngcntr}% http://ctan.org/pkg/chngcntr
%\counterwithout{subsection}{section}
\begin{document}
\section{First section}
\subsection{First subsection}
\subsection{Second subsection}
\subsection{Last subsection}
\section{Second section}
\subsection{First subsection}
\subsection{Second subsection}
\subsection{Last subsection}
\section{Last section}
\subsection{First subsection}
\subsection{Second subsection}
\subsection{Last subsection}
\end{document}

If your subsection should be numbered continuously (without resetting after every section), then all you need to do is remove \stepcounter{section} from the redefinition of \section:

enter image description here

\documentclass{article}
\let\oldsection\section
\renewcommand{\section}{\oldsection*}
\renewcommand{\thesubsection}{\arabic{subsection}}
%\usepackage{chngcntr}% http://ctan.org/pkg/chngcntr
%\counterwithout{subsection}{section}
\begin{document}

The chngcntr package provides a similar mechanism for removing counter dependencies. For more on this kind of manipulation, see Continuous v. per-chapter/section numbering of figures, tables, and other document elements.

  • Great, this is exactly what I was trying to do. – Jay Sullivan May 24 '12 at 6:47
9

Add to the preamble

\renewcommand\thesubsection{\arabic{subsection}}

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.