# Have \cleardoublepage working in oneside scrreprt

That seems quite elementary, but I didn't find the answer. How can I have the \cleardoublepage command work in a oneside environment? That seems kind of odd to ask for that, but I have to send an application file with a bunch of documents added to a .tex file via pdfpages. And I don't know whether it will be seen only on screen, printed on a one-sided printer or printed on a two-sided printer.

So I want the layout to be one-sided for the file not to look too odd on a computer screen or if printed onesidedly. But I also want new parts of the document to start on an odd page, so that my id card is not printed on the back of my research statement in case of two-sided printing.

Here is an example :

\documentclass[oneside,openright]{scrreprt}
\begin{document}
Foo1.
\newpage
Foo2.
\cleardoublepage
Foo3.
\cleardoublepage
Foo4
\end{document}


I would like "Foo4" to be on page 5, as it is in twoside mode.

-
Welcome to TeX.sx! –  hpesoj626 Mar 14 '13 at 12:06
Thanks for the welcome. –  Thomas Richard Mar 14 '13 at 16:59

You can define your own command:

\documentclass[oneside,openright]{scrreprt}

\newcommand\cleartooddpage{\clearpage
\ifodd\value{page}\else\null\clearpage\fi}

\begin{document}
Foo1.
\newpage
Foo2.
\cleartooddpage
Foo3.
\cleartooddpage
Foo4
\end{document}


Add \thispagestyle{empty} after \null if you don't want headers and footers on the empty page.

-
Works perfectly. Thanks ! –  Thomas Richard Mar 14 '13 at 16:59
BTW: KOMA-Script provides \ifthispageodd{<true>}{<false>} (which however needs two compilation runs) –  clemens Mar 14 '13 at 18:27
@cgnieder Testing \ifodd\value{page} after a \clearpage is safe. –  egreg Mar 14 '13 at 19:08
I know and I'm sure you wouldn't have suggested it if it wasn't. That's why I only made a “by the way” :) –  clemens Mar 14 '13 at 19:11