GeneralInserting a blank page if current page number is even

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
rockefeller
Posts: 6
Joined: Thu Oct 28, 2010 7:59 pm

Inserting a blank page if current page number is even

Post by rockefeller »

Hi, I use \appendixpage to insert a page which separates my appendices from the rest of my report. However, I always print my reports using two-sided printing, and sometimes this page ends up on the backside of another page. I'd like to insert a blank page before \appendixpage (but only if necessary). How? Using conditionals (if currentpage mod 2 > 0 ...)?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Inserting a blank page if current page number is even

Post by frabjous »

You can probably just add \cleardoublepage before \appendixpage. If not, it would be helpful to see a minimal working example showing the problem.
rockefeller
Posts: 6
Joined: Thu Oct 28, 2010 7:59 pm

Re: Inserting a blank page if current page number is even

Post by rockefeller »

Thanks for your reply. cleardoublepage doesn't work. I think it's because I use \documentclass[a4paper]{report}. I'll make a minimal working example within a few days unless someone provides a solution before that.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Inserting a blank page if current page number is even

Post by frabjous »

It should work if you add the twoside option to the document class. (If you don't want different margins on odd/even pages, you can use geometry to set them to the same...)

For example, in this example, the chapter ends on page 5, page 6 is left blank, and the appendix page is on page 7.

Code: Select all

\documentclass[a4paper,twoside]{report}
\usepackage[left=1.5in,right=1.5in]{geometry}
\usepackage{appendix}
\usepackage{lipsum}% for generating filler text
\begin{document}
\chapter{A chapter}
\lipsum[1-25]% filler text
\cleardoublepage
\appendixpage
\appendix{An appendix}
\lipsum[1-5]
\end{document}
rockefeller
Posts: 6
Joined: Thu Oct 28, 2010 7:59 pm

Re: Inserting a blank page if current page number is even

Post by rockefeller »

Thanks, works great. There is a minor issue though, the blank page gets a page number. I'm unable to remove it with \thispagestyle{empty}. Is there a simple way to remove it?
Post Reply