Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

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

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
Works perfectly. Thanks ! –  Thomas Richard Mar 14 '13 at 16:59
1  
BTW: KOMA-Script provides \ifthispageodd{<true>}{<false>} (which however needs two compilation runs) –  cgnieder 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” :) –  cgnieder Mar 14 '13 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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