5

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
  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – cfr
    Commented Nov 16, 2014 at 19:53

1 Answer 1

4

Package chappg helps:

\documentclass{report}
\usepackage[auto]{chappg}
\pagenumbering{bychapter}
\begin{document}
\chapter{First chapter}
\end{document}
4
  • It works well with standard classes. But It seems not to work for classes generated by sphinx. Just some more Infos.
    – lazyboy
    Commented Nov 16, 2014 at 22:02
  • Unfortunately this breaks \ifodd\thepage... Commented Dec 2, 2015 at 15:21
  • 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 package zref). Commented Dec 2, 2015 at 20:17
  • 1
    Good point. Fortunately KOMA has it's helpfull \ifthisipageisodd, too Commented Dec 3, 2015 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .