Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

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.

share|improve this answer
    
Great, this is exactly what I was trying to do. –  notfed May 24 '12 at 6:47
add comment

Add to the preamble

\renewcommand\thesubsection{\arabic{subsection}}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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