In a 200 page book, I'm trying to use \usepackage{emptypage}
to remove page numbers from the automatically generated blank pages before a new chapter. For the some of these pages, I am still getting a page numbers. I cannot see anything different in content to trigger this. I am stumped!
If I take any single line of the content out before the new chapter, emptypage works! So it's like LaTeX thinks the content is spilling to the blank page when it is not.
Any Ideas?
Here is code:
% Designed to run under "pdfLaTeX + BibTeX + MakeIndex" option in TeXworks
\documentclass[openright,twoside,10pt]{book}
% Page Setup:
\usepackage[
paperwidth=6in,
paperheight=9in,
bindingoffset=0.2in,
left=1.25in,
right=1.25in,
top=1.1in,
bottom=1.1in,
includefoot
]{geometry}
\usepackage{graphicx}
\usepackage[usenames]{xcolor}
% Header/Footer Page Numbering and color:
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\setlength{\footskip}{45pt}
\fancyfoot[C]{\textcolor{gray}{\thepage}}
\pagestyle{fancy}
\fancypagestyle{frontmatter}{%
\renewcommand{\headrulewidth}{0pt}% No header rule
\renewcommand{\footrulewidth}{0pt}% No footer rule
\fancyhf{}% Clear header/footer
\fancyfoot[C]{\thepage}%
}
\fancypagestyle{mainmatter}{%
\renewcommand{\headrulewidth}{.4pt}% Header rule
\renewcommand{\footrulewidth}{.4pt}% Footer rule
\fancyhf{}% Clear header/footer
\fancyhead[L]{\leftmark}% Chapter in header Left
\fancyhead[R]{\thepage}% Page number in header Right
}
% Remove page numbers on empty pages
\usepackage{emptypage}
% Add dummy text:
\usepackage{lipsum}
% Paragraph Formatting:
\parindent=0in
\parskip=12pt
% Turn off section numbers (0=no numbers, 1=numbers):
\setcounter{secnumdepth}{0}
% package for adding pages after a page:
\usepackage{afterpage}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{0}% change to -1 if you don't want page numbers additive
\newpage}
%
%---------------------------------------Begin Book-------------------------- -------------
%
\begin{document}
. . .
\thispagestyle{empty}
\tableofcontents
\thispagestyle{empty}
\frontmatter
\pagestyle{frontmatter}
\section{Forward}
\lipsum[1-5]
\mainmatter
\pagestyle{frontmatter}
This is not where I want to live\\
In my heaven\\
Flags are for burning\\
And the only God is possibility\\
\\
We can change this\\
F-cked up world\\
Into whatever we want, so\\
Why does it always stay the same\\
\chapter*{Man With a Suitcase}
\thispagestyle{empty}
\addcontentsline{toc}{chapter}{Man With a Suitcase}
\newpage
\blankpage
\section{Two Little Sparrows}
All my heroes \\
have flown away \\
While the blossoms \\
\\
On the trees \\
Are bursting out \\
Beautiful, in the \\
\\
Spring air \\
Followed by the hot winds \\
That will blow across my face \\
\end{document}
underfull hbox badness 10000
for example could have the effect that you describe and is usually caused by mis-use of\\
\\
at the end of a paragrapgh or two consecutive\\
then tex warns you about a box of badness 10000 that is maximum badness and you should not ignore it! it does not make a vertical space (which you want) it makes a horizontal line of the paragraph, with no text in it. Such a line is always wrong and in particular it is not discarded at a page break so the page is white but it is not empty.tabular
. See When to use \par and when \\, or blank lines.\\
to force a linebreak is Ok but never do..possibility\\ \\
with two consecutive\\
and never do...across my face \\
with\\
at the end of a paragraph. Just use a blank line in both those cases. If you put\begin{verse}
\end{verse}` around it the verses will be separated by vertical space