GeneralRenumbering chapters

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jgaspard
Posts: 20
Joined: Tue Aug 19, 2008 4:16 pm

Renumbering chapters

Post by jgaspard »

Hi all (and sorry if this problem already emerged in here) !

Here's my "problem":

- I'd like to number the "Deuxième partie" chapters from 1 to 3 (from "Méthodologie" to "Discussion").
- I don't want the "Part" pages to have a page number.

How could I do that? Thanks a lot!

Here is my .tex:

\documentclass[10pt,a4paper]{report}
\usepackage[francais]{babel}
\usepackage[applemac]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

\pagestyle{plain}

\tableofcontents

\chapter*{Introduction}
\addcontentsline{toc}{part}{Introduction}

\part*{Première partie}
\addcontentsline{toc}{part}{I. Première partie}

\chapter{Union européenne et médias}

\chapter{Politique européenne}

\part*{Deuxième partie}
\addcontentsline{toc}{part}{II. Deuxième partie}

\chapter{Méthodologie}

\chapter{Résultats}

\chapter{Discussion}

\chapter*{Conclusion}
\addcontentsline{toc}{part}{Conclusion}

\end{document}

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Renumbering chapters

Post by phi »

Hello,
for the first problem you can use the chngcntr package:

Code: Select all

\usepackage{chngcntr}
\counterwithin{chapter}{part}
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Renumbering chapters

Post by gmedina »

Hi,

for the second problem you can redefine the \part command as implemented in report.cls. To do so, add this in the preamble:

Code: Select all

%redefining \part to use empty as pagestyle
\makeatletter
\renewcommand\part{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \thispagestyle{empty}%default: plain
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \null\vfil
  \secdef\@part\@spart}
\makeatother
As an alternate solution to the first problem, you can reset manually the chapter counter. You can add

Code: Select all

\setcounter{chapter}{0}
just before

Code: Select all

\part*{Deuxième partie}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jgaspard
Posts: 20
Joined: Tue Aug 19, 2008 4:16 pm

Re: Renumbering chapters

Post by jgaspard »

Perfect you guys! Thanks a lot and a happy new year!
Post Reply