42
   \documentclass[11pt,a4paper]{article}
    \usepackage[T1]{fontenc}
    \usepackage{lipsum}
    \usepackage{tocloft}
    \begin{document}

    \tableofcontents
    \thispagestyle{empty}    
    \newpage

    \section{Preface} %want section number to be 0
    \thispagestyle{empty}    
    \pagenumbering{roman}
    \lipsum[1-3]
    \newpage

    \section{Start From Here}
    \lipsum[1-5]

    \section{And So On...}
    \lipsum[1-5]
    \end{document}

How do I get section numbering to start at 0?

Edit: I know I can do \section*{Preface}, but that removes it from the ToC, which isn't what I want.

  • 6
    Use \section*{Preface} \addcontentsline{toc}{section}{Preface}. – user11232 Apr 8 '13 at 2:34
  • 9
    If you really want a 0 section, add this to the preamble: \setcounter{section}{-1}; otherwise, do as Harish has suggested. – Gonzalo Medina Apr 8 '13 at 2:37
  • @GonzaloMedina I have \thispagestyle{empty} because I want to clear out the header and footer, but I want to include a roman numeral on the preface. Is this possible? – AlanH Apr 8 '13 at 2:43
  • @AlanH sure; please give me some minutes. – Gonzalo Medina Apr 8 '13 at 2:44
  • @AlanH Your wish with the pagenumbering is a separate question … – Speravir Apr 8 '13 at 2:48
56

Just insert \setcounter{section}{-1} in the preamble.

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{tocloft}
\setcounter{section}{-1}

\begin{document}
\tableofcontents
\newpage
\thispagestyle{empty}
\section{Preface} %want section number to be 0
\lipsum[1-3]
\newpage
\section{Start From Here}
\lipsum[1-5]
\section{And So On...}
\lipsum[1-5]
\end{document}
  • 5
    Why do I need to set the counter to -1, rather than 0? – user27182 Oct 7 '14 at 15:16
  • 7
    The default is 0. Each chapter increments the number and is labelled with the incremented number. So -1 produces 0 as the first label. – Martin Brandenburg Mar 14 '15 at 23:39

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.