General ⇒ Inserting a blank page if current page number is even
-
- Posts: 6
- Joined: Thu Oct 28, 2010 7:59 pm
Inserting a blank page if current page number is even
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 ...)?
NEW: TikZ book now 40% off at Amazon.com for a short time.
Inserting a blank page if current page number is even
You can probably just add \cleardoublepage before \appendixpage. If not, it would be helpful to see a minimal working example showing the problem.
-
- Posts: 6
- Joined: Thu Oct 28, 2010 7:59 pm
Re: Inserting a blank page if current page number is even
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.
Inserting a blank page if current page number is even
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.
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}
-
- Posts: 6
- Joined: Thu Oct 28, 2010 7:59 pm
Re: Inserting a blank page if current page number is even
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?