How can I change the page numerbering to 1-1, 1-2, ect. The first number is the number of chapter, the second numner is the page in the chapter.
1 Answer
Package chappg
helps:
\documentclass{report}
\usepackage[auto]{chappg}
\pagenumbering{bychapter}
\begin{document}
\chapter{First chapter}
\end{document}
-
It works well with standard classes. But It seems not to work for classes generated by sphinx. Just some more Infos.– lazyboyCommented Nov 16, 2014 at 22:02
-
-
1@TobiasKienzler
\ifodd\thepage
should not be used, because\thepage
can be quite different from an Arabic number, e.g. Roman numeral, letter. And\thepage
can be wrong because of the asynchronous page routine. This can be solved by setting a page label and evaluating the page reference in the following LaTeX run (e.g. see packagezref
). Commented Dec 2, 2015 at 20:17 -
1Good point. Fortunately KOMA has it's helpfull
\ifthisipageisodd
, too Commented Dec 3, 2015 at 10:50
\documentclass{...}
and ending with\end{document}
.