My question is related to this question here. I also want a blank page after every page but i want it to be counted. That means I want only the oddnumbered pages to be filled with content, with the formatting of the odd numbered pages. The solution with the atbegshi package gives my the empty page but the formatting on the contentpages changes between even- and odd numbered pages (and also the pagenumber).

Or, in other words: Is there a way to pretend that every page is an odd page?

If I'm unclear please tell me. I found it hard to explain my problem.

Thanks for any help!

(The reason for all this: Bilingual book and a set documentclass)

  • Welcome to TeX.SX! – Bobyandbob Jul 12 '18 at 14:57
  • Do you really want an empty page or do you simply want to number the page with odd numbers? – Ulrike Fischer Jul 12 '18 at 15:00
  • @UlrikeFischer the doumentclass that i use has different heads for even and odd pages. So, I want to number the pages with odd numbers and apply the oddpage format of the class to it if that makes any sense. – Verdruss Jul 12 '18 at 15:03
  • You didn't answer my question. Do you really want the empty pages? – Ulrike Fischer Jul 12 '18 at 15:06
  • @UlrikeFischer Sorry. Well, no, in the end i just want to merge two pdfs somehow, one with even, one with odd pages. When I tried that worked better with empty pages but they are not necessary, no. – Verdruss Jul 12 '18 at 15:08

Try in the preamble

|improve this answer|||||
  • One last question: Now the table of contents has all the page numbers incremented by 1 (So something on page 4 is labeled 5 in the TOC and so on). Do you know why this could happen? – Verdruss Jul 12 '18 at 16:09
  • Yes I know what happens but I don't have the time now to build a test document and try out solutions. – Ulrike Fischer Jul 12 '18 at 16:27

With this, all pages are numbered either odd or even. It's done by adding a hook to the output routines, right after page counting is done. The hook is set with \AtPageCounting, adding another \setcounter{page} here. The advantage of this is, that there is no more of-by-one error.

Of course, having only odd or even page numbers will confuse the heck out of book classes, i.e. with only odd numbers there will never be an empty page before a new chapter and with only even numbers there will be an empty page before all new chapters. But with the option openany this doesn't matter anymore.

With only \AtPageCounting{\stepcounter{page}} all page numbers are odd. By adding the line \AtBeginDocument{\stepcounter{page}} all pages are even numbered.

Caution: this hook is not meant for doing any typesetting! This was not tested and will very likely lead to crazy errors!

And also, caution: there are packages/classes, which change the output routines. With those this may not work. But I tested it with the standard classes, the KomaScript classes and memoir. It works with all of them.


% the hook

% insert hook after page counting
    \GenericWarning{(preamble)\@spaces\@spaces\@spaces\@spaces}{Package preamble Warning: patching \string\@outputpage\space did not work.}}

% setting the hook

% to step page counter by 2

% the above alone leads to only odd page number
% adding this line leads to only even page numbers



|improve this answer|||||
  • This also looks pretty good, thank you. Right now i just did two different documents and Frankensteind the toc of the first one into the second one. Your solution is much cleaner, i guess :D – Verdruss Jul 16 '18 at 19:36

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.