# How not to count middle white pages in page numbering?

In my document, I have some white pages that I don't want to be counted in page numbering. What should I do?

%pdflatex
\documentclass[a4paper,11pt,twoside,openany]{book}
\usepackage{lipsum}

\begin{document}
\lipsum[1-4]
\newpage\null\thispagestyle{empty}\newpage
\lipsum[5-8]
\newpage\null\thispagestyle{empty}\newpage
\lipsum[9-12]
\newpage\null\thispagestyle{empty}\newpage
\lipsum[13-16]
\end{document}

• Are these white pages in the middle of the document or at the start? – 1010011010 Oct 19 '14 at 16:17
• What would you like a PDF viewer to show for a page number when you're on the page without a page number? And what about after? – 1010011010 Oct 19 '14 at 16:22
• Maybe a combination of \thispagestyle{empty} and \addtocounter{page}{-1}? – Nico Vecchio Oct 19 '14 at 16:36
• Well, if you're going to mess up the fact that odd page is on the right when you open the document, simply don't use twoside at all. It's a complete non-sense. It would be really nice to get a MWE. – yo' Oct 19 '14 at 16:43
• And have you thought of openany option to the report or book class? Or changing some chapters to sections, because if you have 20 empty pages, it suggests that you have much more than 20 chapters, which seems to be simply too much for (even a long) thesis. – yo' Oct 19 '14 at 17:07

As per the comment, you can use \addtopagecounter{page}{-1}

\documentclass[a4paper,11pt,twoside,openany]{book}
\usepackage{lipsum}

\begin{document}
\lipsum[1-4]
\lipsum[5-8]
\lipsum[9-12]
\lipsum[13-16]
\end{document}


If you want to do it for all the \thispagestyle{empty} pages you can save some typing with a custom macro:

\documentclass[a4paper,11pt,twoside,openany]{book}
\usepackage{lipsum}

\begin{document}
\lipsum[1-4]
\newpage\null\eatpage\newpage
\lipsum[5-8]
\newpage\null\eatpage\newpage
\lipsum[9-12]
\newpage\null\eatpage\newpage
\lipsum[13-16]
\end{document}

• Thanks, it solved the numbering problem. Can I do anything with the PDF file problem? – Enthusiastic Engineer Oct 19 '14 at 17:11
• I'm sorry, what is the PDF file problem? – Nico Vecchio Oct 19 '14 at 17:13
• I don't want the white pages, also be calculated in total number of pages in the pdf file... – Enthusiastic Engineer Oct 19 '14 at 17:16
• So isn't it easier to change your document so that it does not produce the white pages at all? – Nico Vecchio Oct 19 '14 at 17:36
• \addtopagecounter ? – user31729 Oct 19 '14 at 19:28