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.
   \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.

share|improve this question
4  
Use \section*{Preface} \addcontentsline{toc}{section}{Preface}. –  Harish Kumar Apr 8 '13 at 2:34
5  
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

1 Answer 1

up vote 14 down vote accepted

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}
share|improve this answer

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.