Keywords: LaTeX | blank page elimination | appendix formatting | page layout | document class options
Abstract: This technical paper provides an in-depth analysis of the causes and solutions for blank pages appearing between appendix chapters in LaTeX two-sided documents. It explores the page layout mechanisms of book document classes and presents three primary methods: the openany option, redefinition of cleardoublepage, and oneside layout switching, supported by comprehensive code examples and practical implementation guidelines.
Problem Background and Cause Analysis
In LaTeX's two-sided layout (twoside) mode, chapters (including appendix chapters) default to starting on odd-numbered pages, following traditional publishing standards. When a chapter ends on an even page, the system automatically inserts a blank page to ensure the next chapter begins on an odd page. While this mechanism is generally appropriate for main text sections, it often creates unnecessary blank pages in appendices.
Core Solutions
We present several validated solutions to address blank pages between appendix chapters:
Document Class Option Adjustment
The most straightforward solution is using the openany option in the document class declaration:
\documentclass[openany]{book}
\begin{document}
\chapter{Main Chapter}
\appendix
\chapter{Appendix A}
\chapter{Appendix B}
\end{document}
This option makes all chapters (including appendices) start on the next available page, regardless of odd/even numbering, completely eliminating blank pages.
Local Behavior Modification
To remove blank pages only in appendices while maintaining traditional layout in the main text:
\documentclass{book}
\begin{document}
\chapter{Main Chapter}
\cleardoublepage
\makeatletter
\@openrightfalse
\makeatother
\appendix
\chapter{Appendix A}
\chapter{Appendix B}
\end{document}
This approach temporarily disables the \@openright flag, modifying page start rules specifically for appendix sections.
Command Redefinition Method
Another effective approach is redefining the \cleardoublepage command:
\let\cleardoublepage\clearpage
Placing this command before the appendix section replaces the double-page clearing command with a single-page version, preventing blank page generation.
Layout Mode Switching
For documents not requiring double-sided printing, use single-sided layout:
\documentclass[oneside]{book}
In single-sided mode, \cleardoublepage behaves identically to \clearpage, naturally eliminating blank pages.
Technical Details Deep Dive
Understanding the mechanisms behind these solutions is crucial:
Page Start Control Mechanism: LaTeX implements odd-page start control through the \cleardoublepage command. This command checks the current page number and inserts a blank page if it's even. In single-sided layout, this command degenerates to ordinary \clearpage.
Document Class Option Scope: The openany option affects chapter start rules throughout the entire document, while local modification methods allow finer control, changing behavior only in specific sections like appendices.
memoir Class Flexibility: The memoir document class supports using \openany as a declaration within the document, providing greater flexibility:
\documentclass{memoir}
\begin{document}
\chapter{Main Chapter}
\openany
\appendix
\chapter{Appendix A}
\end{document}
Practical Application Recommendations
Based on different usage scenarios, we recommend the following strategies:
Academic Papers: Use local behavior modification to maintain professional formatting standards in main text while eliminating blank pages only in appendices.
Technical Documentation: Consider using the openany option, as technical documents often prioritize content compactness over traditional formatting norms.
Electronic Documents: Single-sided layout (oneside) is optimal since electronic reading doesn't require consideration of double-sided printing symmetry.
Common Issues and Considerations
When implementing these solutions, consider the following points:
Command Placement: Redefined commands or local modifications must be executed before the appendix begins, typically immediately preceding the \appendix command.
Document Class Compatibility: Different document classes may have slight variations in page start control implementation; testing in the actual environment is recommended.
Typesetting Quality Considerations: While eliminating blank pages improves document compactness, traditional formatting standards should still be considered for formal publishing contexts.
By deeply understanding LaTeX's page layout mechanisms and flexibly applying these solutions, users can effectively control document page structure to meet formatting requirements across various scenarios.