Generalpage numbers

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
demon
Posts: 26
Joined: Thu Nov 27, 2008 3:45 pm

page numbers

Post by demon »

Hi there,

writing my thesis in LaTex and build a small (koma-scrreprt) template ... but I got problems with the numbering. Uni wants roman numbers for toc and preface, arabic numbers for the chapters. abstract and title without numbers.

This is my try:

Code: Select all

\begin{document}

\pagestyle{empty}
\selectlanguage{english}

\include{Frontmatter/Title}
\cleardoublepage

\include{Frontmatter/Abstract}
\cleardoublepage

\pagestyle{plain}
\pagenumbering{Roman}
\include{Frontmatter/Preface}
\cleardoublepage

\addcontentsline{toc}{chapter}{Preface}
\tableofcontents

% ********************************************************************
\setcounter{page}{1} %reset the page counter
\pagenumbering{arabic}

\include{Chapters/01}
\include{Chapters/02}
\include{Chapters/03}
\include{Chapters/04}
\include{Chapters/05}
\include{Chapters/06}

\appendix
\include{Chapters/0A}

\end{document}
But there's no page number on the second page of the toc. :( And how can I get 'Preface' in the toc without a number?

Thanks a lot!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

page numbers

Post by localghost »

demon wrote:[...] writing my thesis in LaTex and build a small (koma-scrreprt) template ... but I got problems with the numbering. Uni wants roman numbers for toc and preface, arabic numbers for the chapters. abstract and title without numbers. [...]
The features you are searching are provided by a book class. In your case this would be the scrbook class from KOMA Script. You can just insert the \frontmatter, \mainmatter and \backmatter switches at the right places instead of any command for page numbering.


Best regards and welcome to the board
Thorsten¹
demon
Posts: 26
Joined: Thu Nov 27, 2008 3:45 pm

Re: page numbers

Post by demon »

hm, but scrbook doesn't support \begin{abstract} ... how can I manage that?
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

page numbers

Post by phi »

I would suggest to continue using the scrreprt class, it's better suited for theses. The only things that \frontmatter and the likes actually do are forcing page breaks and changing the page numbering style, like you did manually. You should force a page break manually (using \clearpage or \cleardoublepage). I have tried it with the following example:

Code: Select all

\documentclass[english]{scrreprt}

\usepackage{babel}
\usepackage{blindtext}

\begin{document}

\pagestyle{empty}
%\selectlanguage{english}

\begin{titlepage}
\blindtext
\end{titlepage}
\cleardoublepage

\begin{abstract}
\blindtext
\end{abstract}
\cleardoublepage

\pagestyle{plain}
\pagenumbering{Roman}
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\Blindtext
\cleardoublepage
\tableofcontents

% ********************************************************************
%\setcounter{page}{1} %reset the page counter
\cleardoublepage
\pagenumbering{arabic}

\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument

\appendix
\blinddocument

\end{document}
Note that you don't have to reset the page counter manually, but you do have to insert an explicit shipout command before the page numbering style change command.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

page numbers

Post by localghost »

demon wrote:hm, but scrbook doesn't support \begin{abstract} ... how can I manage that?
The abstract of a book is usually a chapter mostly at the beginning of the document. For this reason the scrbook class doesn't support an abstract environment. Explanations can be found in the according sections of the KOMA Script documentation.
demon
Posts: 26
Joined: Thu Nov 27, 2008 3:45 pm

Re: page numbers

Post by demon »

Thanks phi. Everything works fine now. :)
Post Reply