2

There is the option twoside, to make chapters start on odd pages only. This way, when the document is printed two-sided, a new chapter will always start on the right side (odd page).

My question is: Is it possible to define a four-sided document? My reason is that, when I want to print two document pages on one side of the paper sheet, and also double-sided; so there are four different pages on one sheet of paper.

The document is divided into several chapters, and when I update one chapter, I would like to be able to just exchange that chapter's pages in the folder in which I keep the printed chapters (disregarding page numbers). This requires that every chapter starts only at page 5, 9, 13, ..., i.e. 4n+1.

I am using the scrbook documentclass. The following code starts a chapter at page 3, using the twoside option. I would like it to start at page 5.

\documentclass[12pt,abstracton,titlepage,parskip=false, no, no, twoside=true]{scrbook}
\usepackage{blindtext}

\begin{document}
\chapter{first chapter} \blindtext

\chapter{second chapter}
\blindtext
\end{document}
5
  • What are the options abstraction and no (used twice) good for?
    – Skillmon
    Jan 3, 2020 at 17:32
  • You could also learn how to use tools like pdftk (or pdfjam which wraps the LaTeX package pdfpages) and do this as post-processing (after the PDF file is generated), instead of trying to do everything from inside LaTeX. Jan 3, 2020 at 22:39
  • 1
    @ShreevatsaR but that wouldn't be any fun.
    – Skillmon
    Jan 4, 2020 at 9:39
  • @ShreevatsaR I assume that would also not change the page numbering.
    – Teepeemm
    Jan 4, 2020 at 13:18
  • 1
    @Teepeemm Yes correct; I imagine that's what is actually wanted too. Jan 4, 2020 at 13:46

1 Answer 1

5

The following does what you want by patching the \scr@startchapter macro which is internally used by \chapter to not use \cleardoublepage but to use \clearfourpage, which does what you want.

\documentclass[12pt,abstracton,titlepage,parskip=false, no, no,
twoside=true,open=right]{scrbook}
\usepackage{blindtext}
\usepackage{etoolbox}


\makeatletter
\patchcmd\scr@startchapter
  {\cleardoublepage}{\clearfourpage}{}{\GenericError{}{Patching failed}{}{}}
\newcommand*\newpage@twocolumn@helper
  {%
    \thispagestyle{empty}%
    \hbox{}%
    \newpage
    \if@twocolumn
      \hbox{}%
      \newpage
    \fi
  }
\newcommand*\clearfourpage
  {%
    \clearpage
    \if@twoside
      \ifodd\c@page
      \else
        \newpage@twocolumn@helper
      \fi
      \ifodd\numexpr\c@page/2\relax
      \else
        \newpage@twocolumn@helper
        \newpage@twocolumn@helper
      \fi
    \fi
  }
\makeatother

\begin{document}
\chapter{first chapter}
%\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext
\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext

\chapter{second chapter}
\blindtext
\end{document}

EDIT: The following also resets the page counter to 1 for each chapter and sets the \thepage macro to include the \thechapter counter:

\documentclass[12pt,abstracton,titlepage,parskip=false, no, no,
twoside=true,open=right]{scrbook}
\usepackage{blindtext}
\usepackage{etoolbox}


\makeatletter
\patchcmd\scr@startchapter
  {\cleardoublepage}{\clearfourpage\setcounter{page}{1}}{}{\GenericError{}{Patching failed}{}{}}
\newcommand*\newpage@twocolumn@helper
  {%
    \thispagestyle{empty}%
    \hbox{}%
    \newpage
    \if@twocolumn
      \hbox{}%
      \newpage
    \fi
  }
\newcommand*\clearfourpage
  {%
    \clearpage
    \if@twoside
      \ifodd\c@page
      \else
        \newpage@twocolumn@helper
      \fi
      \ifodd\numexpr\c@page/2\relax
      \else
        \newpage@twocolumn@helper
        \newpage@twocolumn@helper
      \fi
    \fi
  }
\makeatother

\begin{document}
\pagenumbering{Roman}
\tableofcontents
\clearfourpage
\renewcommand*\thepage{\thechapter--\arabic{page}}%
\setcounter{page}{1}
\chapter{first chapter}
\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext
%\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext

\chapter{second chapter}
\blindtext
\section{first section}
\blindtext
\blindtext
\blindtext
\section{second section}
\blindtext
\blindtext
\end{document}

(note that in this MWE the pages in the ToC are correct)

15
  • 1
    @Marie.P. you should only change the page numbering on pages which are right pages in the first place. All of LaTeX's internals decide on even/odd pages and the correct layout based on the page counter. So what you should do after the ToC etc. is \clearfourpage\pagenumbering{arabic} in the first place, that doesn't lie within the scope of this macro (in normal twoside documents you'd do \cleardoublepage\pagenumbering{arabic}).
    – Skillmon
    Jan 3, 2020 at 18:43
  • 1
    @Marie.P. also in this case it might be a good idea to reset the page counter on every chapter and have a prefix for the chapters, so use something like \clearfourpage\setcounter{page}{1}\renewcommand*\thepage{\thechapter---\arabic{page}} before every chapter (or add this to the chapter code...). This way your ToCs would stay correct for your chapters even if you only replace one chapter.
    – Skillmon
    Jan 3, 2020 at 18:49
  • 1
    @Marie.P. stupid error. Now corrected in new version of the answer. I'll also remove the edit.
    – Skillmon
    Jan 3, 2020 at 21:59
  • 1
    @Marie.P. can you please ask a follow up question? You can link back to this question there. Please provide a new MWE there which contains the \renewcommand*\thepage{...} code. Also there is a better way to get the page counter reset at every chapter, you could use \makeatletter\@addtoreset{page}{chapter}\makeatother instead (untested, might cause pages to start at 0 for each chapter).
    – Skillmon
    Jan 4, 2020 at 8:01
  • 1
    @Marie.P. ok, that \@addtoreset solution will break the start on every (4n+1)-th page. Instead We could add that reset to the \scr@startchapter macro after the \clearfourpage. See my new edit on how I'd do all this.
    – Skillmon
    Jan 4, 2020 at 10:41

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.