[Tex/LaTex] How to preserve the page numbers between a twoside and a oneside layout

double-sidedpage-numbering

I want to publish a document in both printed and electronic versions. I use twoside,open=right for the printed version and oneside for the electronic version.

Due to the empty pages which are inserted in the twoside layout, the page numbers are going to diverge between the two layouts (see example below). Is there a sensible way to keep the page numbers in sync?

Solutions I can think of:

  • Insert empty pages in the oneside layout. [Maybe this could be done by using the twoside layout and shifting the type area back to the center (ugly).]
  • Use another layout for the electronic version. What is the 'best practice'? Publish the electronic version (for use in PDF reader) with the twoside layout?

Here is a simple example demonstrating the issue (I use the KOMA classes, but the same thing happens with book). The twoside layout has 10 pages while the oneside layout has 9 pages.

\documentclass[twoside,open=right]{scrbook}
% \documentclass[oneside]{scrbook}

\usepackage{blindtext}

\begin{document}

\blinddocument
\Blindtext
\blinddocument

\end{document}

Best Answer

With a KOMA-Script class you could set twoside=semi and use scrlayer-scrpage to change the header and footer to oneside-layout.

\documentclass[twoside=semi,open=right]{scrbook}
\usepackage[automark]{scrlayer-scrpage}
\clearpairofpagestyles
\chead{\leftmark}
\cfoot{\pagemark}

\usepackage{blindtext}
\begin{document}
\blinddocument
\Blindtext
\blinddocument
\end{document}