Hello.
How to make page numbering for each chapter in style of "chapternum-pagenum"? For ex., page 5-23 is the 23d page of chapter 5.
Page Layout ⇒ Page numbering like "chapter-page"
NEW: TikZ book now 40% off at Amazon.com for a short time.
Page numbering like "chapter-page"
Hi,
you can redefine the \thepage command to include the chapter number, and then to restart the page counter every time a new chapter begins you can use the chngcntr package. Take a look at the following example:
you can redefine the \thepage command to include the chapter number, and then to restart the page counter every time a new chapter begins you can use the chngcntr package. Take a look at the following example:
Code: Select all
\documentclass{book}
\usepackage{chngcntr}
\usepackage{lipsum} % just to generate some text
\counterwithin{page}{chapter}
\renewcommand\thepage{\thechapter--\arabic{page}}
\begin{document}
\chapter{Test chapter one}
\stepcounter{page}
\lipsum[1-30]
\chapter{Test chapter two}
\stepcounter{page}
\lipsum[1-30]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 2
- Joined: Wed Dec 09, 2009 1:44 pm
Re: Page numbering like "chapter-page"
Thank you very much!