1

How can I prevent my class based on memoir to reset the page counter for the second \mainmatter?

I have following layout:

\frontmatter

.....abstract, acknowledgement,table of content

\mainmatter

.....chapter1, usw

\backmatter

.....glosar, sources

\mainmatter

.....appendix chapter1,

The last \mainmatter acts as appendix but I wanted to have the same chapter layout so I used \mainmatter but I want to continue the page numbering?

2

memoir provides a starred version \mainmatter* that doesn't reset the page numbering.

Alternatively (if you're not using memoir), you can make \pagenumbering gobble it's argument so it turns into a no-op:

\frontmatter
...
\mainmatter
...
\backmatter
...
\renewcommand{\pagenumbering}[1]{}% Remove functionality of \pagenumbering
\mainmatter
...
  • sadly boh did not work for me. i solved it temporarly by adding a counter which saves the page number in the backmatter and than resetts the pagenumber to the saved value in the second mainmatter. i wand to add the function to my class file, so the tex file looks cleaner any idea on how to accomplish this? – MadMax Dec 12 '16 at 13:48
  • @MadMax: Hmmm. Can you provide me with a minimal working example (MWE) that replicates the problem? Then I'll have something tangible to work with. – Werner Dec 12 '16 at 16:35
  • 1
    @MadMax: Perhaps you may have used what I put down as \pagenumber. In fact, it should have been \pagenumbering. – Werner Dec 29 '16 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.