36

I'm having a bit of trouble with section numbering. When I use \section{} it starts at 0.1 rather than 1.0.

Here's my preamble:

\documentclass[12pt]{report}
\usepackage{hyperref}
\usepackage[landscape]{geometry}
\usepackage{wallpaper}
\usepackage{fullpage}

Any thoughts?

0

3 Answers 3

42

The problem is caused because you are using a document class that has chapters, (in this case, report, but the book class would give a similar effect) but you haven't provided any \chapter command. In most classes that provide chapters, the section numbers are dependent on the chapter number (i.e., sections are numbered as chapter.section). Since you have no \chapter command the chapter counter is 0, and so the first section is prefixed with 0 also.

To solve the problem, either provide a \chapter commmand, or if you don't need chapters in your document, use a document class like article which doesn't use chapters.

Here's a sample document that shows the effect:

\documentclass{report} % change this to article to get the correct numbering
\begin{document}
%\chapter{A chapter} % or un-comment this to get the correct numbering with report
\section{A section}
\end{document}
3
  • 1
    It is my understanding that report.cls is intended for things like conference reports where lots of articles are collected into one large document. But its ill-selected name has caused countless students to use it for lab reports.
    – kahen
    Sep 18, 2012 at 22:16
  • 2
    @kahen Actually I suspect that report was likely named as a class for what are often called 'Technical Reports' which are monographs that have structures similar to books but are not formal books. These are very common in computer science and engineering; not so much in other fields.
    – Alan Munn
    Sep 18, 2012 at 23:17
  • 1
    Actually neither nor. The report class is for those very large book-like reports such as produced by government, industry , and academia on some large and weighty topic, where division into chapters is a reasonable approach. Some day I should write a package called shortreport which simply obliterates all references to parts and chapters so that the structure is based wholly on sections. In the meantime, just redefine \thesection as shown in latex.silmaril.ie/formattinginformation/reprog.html Jul 18, 2022 at 11:21
3

If you want to stick with the report style you can always increment the Chapter number first before \begin{document} using:

\setcounter{chapter}{1}

this will give 1.1 etc. e.g

\documentclass[12pt]{report}
\setcounter{chapter}{1}
\begin{document}
\section{Introduction}
etc
\end{document}
0

If your want a title page looking like a report, but with article numbering, just use titlepage

\documentclass[titlepage]{article}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .