Page LayoutStrange blank page after the preface

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Strange blank page after the preface

Post by AleCes »

I'm using the document class book with the openany option in order to avoid those blank pages between chapters.
Still a blank page comes out between the preface and the first chapter.
Note: this is a Serbian text, in order to help you find out the page in question, it has the vi (roman) numeral in the heading, on the left.
Attachments
Историја Византиског Царства.tex
History of the Byzantine Empire
(98.91 KiB) Downloaded 448 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Strange blank page after the preface

Post by AleCes »

Bump! Here is some code, maybe this will help you to understand the issue.

Code: Select all

\documentclass[a4paper, 12pt, openany]{book}
\usepackage{fullpage}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Minion Pro}
\usepackage{polyglossia}
\setmainlanguage{serbian}
\setotherlanguages{french, latin}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{bookmark}


\title{ИСТОРИЈА ВИЗАНТИСКОГ ЦАРСТВА}
\author{Шарл Дил}
\date{Јули 1919}



\begin{document}
\frontmatter
\maketitle
\tableofcontents

\chapter{ПРЕДГОВОР}
\mainmatter
\chapter{bla}
\chapter{bla}

\end{document}
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Strange blank page after the preface

Post by cgnieder »

This is caused by \mainmatter. In the book class it has the definition

Code: Select all

\cleardoublepage\@mainmattertrue\pagenumbering{arabic}}
You can see that it issues \cleardoublepage. You can redefine it, though:

Code: Select all

\makeatletter
\renewcommand\mainmatter{\clearpage\@mainmattertrue\pagenumbering{arabic}}
\makeatother
\makeatletter and \makeatother are necessary due to the @ in \@mainmattertrue.

Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Strange blank page after the preface

Post by AleCes »

cgnieder wrote:This is caused by \mainmatter. In the book class it has the definition

Code: Select all

\cleardoublepage\@mainmattertrue\pagenumbering{arabic}}
You can see that it issues \cleardoublepage. You can redefine it, though:

Code: Select all

\makeatletter
\renewcommand\mainmatter{\clearpage\@mainmattertrue\pagenumbering{arabic}}
\makeatother
\makeatletter and \makeatother are necessary due to the @ in \@mainmattertrue.

Regards
Hi cgnieder!

Thanks for your help, this solved my issue!

Regards
Post Reply