# Correctly skipping pages for page numbering

I have a book I'm laying out in pdflatex. The page numbers are on the outer corners of the pages (along with some other header and footer stuff.)

Occasionally, the document has a full-page image inserted like a plate, where that page has no style at all, just the image. The catch is that these pages also shouldn't be counted for page numbers, so that you get

page 54 page with image page 55

I've got it skipping the page for page numbering purposes, but it doesn't skip the page for determining whether it's a right or left handed page, which means that after an image page the page numbers seem to jump from the outer corners to the inner corners.

The code I'm using is this:

%end of page 54

\newpage
\thispagestyle{empty}
%insert image
\newpage
\setcounter{page}{55}

%begin page 55 content


(with the details of inserting the page hand-waved away since each image is a slightly different size and needs unique handling.)

(And the outer margin is close enough to the gutter margin that I can't tell if the margins are correctly flip-flopping as well, but I think they are.)

So, how do I tell TeX to keep the page numbers in the right place after skipping a page?

-

In a twoside layout even pages are always on the left side and odd pages on the right side. If you insert one unnumbered page this get out of sync. So you must also insert its (unnumbered) back.

-
Well, hey. That was easy, and actually much closer to the "old-school plate" look I was going for. – Electrons_Ahoy Jan 17 '11 at 21:39
aren't left and right inverted in your answer? At least for left-to-right writing. :-) – egreg Jun 3 '11 at 17:03
@egreg Yes seems so. (I'm one of the people who always says "turn left" when they mean "turn right") – Ulrike Fischer Jun 3 '11 at 19:08
corrected. :-) – egreg Jun 3 '11 at 21:02

This is a non-answer, but meant seriously: Don't do it! If you have a full-page image, then it's indeed a good idea not to print a page number on that page. Nevertheless, the page should be counted. If I'd buy your book and discover the messy page numbering, I'd find it annoying.

There is one case where it's good not to count the pages with images, namely if you have several pages in a row that just contain images. But this should be an even number of pages.

-

This answer does what you want, but it has nasty side effects, which may be hard to fix. Page references (e.g. in table of contents) will be messed up.

Use the fancyhdr package to set the header so that it displays the page number minus the number of plates that have been encountered.

\documentclass[twoside]{article}
\usepackage{fancyhdr}

\newcounter{displaypage}

\newcommand{\mypageno}{%
\setcounter{displaypage}{\thepage}
\thedisplaypage
}

\pagestyle{fancy}
\fancyfoot{}

\newcounter{stepback}
\setcounter{stepback}{0}

\newcommand{\platepage}{%
\thispagestyle{empty}
This is a plate page.
}

\begin{document}
A \eject
B \eject
C \eject
\platepage \eject
E \eject
F \eject
\platepage \eject
G \eject
H \eject
I
\end{document}

-