# Increment the section number with 1, not 0.1 [duplicate]

Possible Duplicate:
Section numbering

I'm happy with the logical layout of my document, but the section numbering is bugging me.

I'd like the first section (the introduction) to be 1, not 1.1. Also, the second section should be 2, not 1.2 (yes, that's a one, like it is still the introduction). I'm getting something wrong, obviously. (I also want sections beginning at the top of a new page, and page numbering should start with the introduction, if you wonder about the other stuff I had to put in the document header. But those things work.)

Any other suggestions are welcome, of course.

% x.tex

\documentclass[a4paper, twoside, draft, 12pt]{report}

\usepackage[pdftex, final]{graphicx}
\graphicspath{{./pics/}}

\usepackage[parfill]{parskip}

\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}

\setcounter{tocdepth}{6}
\setcounter{secnumdepth}{6}
\setcounter{chapter}{1}

\begin{document}

\begin{titlepage}
% some stuff here
\end{titlepage}

\pagebreak
\tableofcontents
\thispagestyle{empty}
\pagebreak

\cleardoublepage
\pagenumbering{arabic}

\section{Introduction}

% first section - should have number 1, but have 1.1

\subsection{Services}

% subsection - should be 1.1, is 1.1.1

\section{The algorithm}

% new section - number is 1.2, should be 2

\end{document}


Edit

With the article solution, it suddenly looks like this here and there. Otherwise, it works.

-

## marked as duplicate by egreg, Paul Gaborit, Marco Daniel, lockstep, JakeSep 19 '12 at 7:37

Your used document class report starts sectioning (is this right in English?) with \chapter. Thats the reason where your 0. comes from. Change \section to \chapter or use document class article ... –  Kurt Sep 18 '12 at 21:29
@Kurt: article did it, but now I get big chunks of white here and there. It appears it tries to distribute paragraphs evenly on the page, but the result is rather... well, it looks like there is some thing missing, like a figure or picture. Do you know how to cure this as well? –  Emanuel Berg Sep 18 '12 at 21:37
@Emanu: Did you changed the above given MWE? Do you then mean the white space in the table of contents? \raggedbottom in the preamble can solve this problem. –  Kurt Sep 18 '12 at 21:48
@Kurt: Take a look at the screenshot I just posted and you'll understand instantly what the problem is. –  Emanuel Berg Sep 18 '12 at 22:11
@Emanu: I saw it. The problem is that LaTeX stretches the white space between headings and paragraphs. It often ocurs with less text. I think you should try \raggedbottom. –  Kurt Sep 18 '12 at 22:17

Your used document class report starts sectioning with \chapter. Thats the reason where your 0. comes from. Change \section to \chapter or use document class article.

The big chunks of white space, especially in the table of contents of your changed MWE (to class article), you can solve with macro \raggedbottom in your preamble. The problem is that LaTeX stretches the white space between headings and paragraphs. It often ocurs with less text. With \raggedbottom LaTeX has not to place the last line of the page always on the same place.

-

The class report uses chapters as its top level sectioning.
(part > chapter > section > subsection > …)

If you only want to use sections as the top level you should use the class article.
(part > section > subsection > …)

\renewcommand{\thesection}{\arabic{section}}


to your preamble so that \section{} omits the 1. but this still produces typographically errors in the Table of Contents. It would be better to just use the class article.

-
So you would recommend changing to article as this is more the intended way? article works for the problem described (the numbering), but it looks like there was a side effect. Check out my comment to Kurt above. –  Emanuel Berg Sep 18 '12 at 21:39
Use \clearpage or \newpage instead of \pagebreak. The latter tries to fill the vertical space on the page. (Or loose it completely because you have \cleardoublepage there anyway.) –  Qrrbrbirlbel Sep 18 '12 at 21:45
That didn't help. Take a look at the screenshot I just posted. Thanks for your effort. –  Emanuel Berg Sep 18 '12 at 22:10

If you want to keep the report document class and want the sections within each chapter to be numbered 1, 2, 3, etc rather than (if within Chapter 2, say) as 2.1, 2.2, 2.3, etc., you need to redefine the macro \thesection. For instance, you could issue the command

\renewcommand\thesection{\arabic{section}}


in the preamble.

Note that this will work even if you don't issue any \chapter commands at all.

-
Works, but has the whitespace problem described in the comments to the other answers. Have a look at the screenshot I just posted in the question. This is getting all confusing, why did it work before I started to fiddle with this numbering thing?! –  Emanuel Berg Sep 18 '12 at 22:16
@EmanuelBerg: Are you using \flushbottom anywhere in your document? If so, remove it. Also get rid of \pagebreak. –  Harish Kumar Sep 18 '12 at 22:52
@EmanuelBerg - there is absolutely no connection between redefining the appearance of section-level numbers and the appearance of excess amounts of whitespace. For the latter issue, try implementing some of the other comments, especially the suggestion to insert the instruction \raggedbottom, in your document's preamble. I'm not familiar with \pagebreak; if it's necessary to create a page break, issue either \clearpage or \newpage. –  Mico Sep 18 '12 at 23:19
@Mico: Right, check out Kurt's answer, the one I accepted, that solved all my problems with this. –  Emanuel Berg Sep 19 '12 at 22:43