Generaldocument structure

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Abu Noor El-Din
Posts: 11
Joined: Wed Nov 21, 2007 1:43 am

document structure

Post by Abu Noor El-Din »

Hi all,

I am writing my thesis using latex. I am editing in the book class (book.cls) of the TeXnicCenter.
I have a problem that every environment ends in an even page (I mean by environment here: chapter, contents, list of tables, list of figures). For example, a list of figures takes only onepage but the following page to it is also reserved to the list of figures also (so the result is empty page but with the headers and footers of the list of figure page) which is very annoying.

I hope if I manage to explain the problem well.

Thanks in advance.

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

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

document structure

Post by Juanjo »

To get an empty page, one possible solution is to redefine \cleardoublepage as follows:

Code: Select all

\let\cleardoublepageOriginal\cleardoublepage
\renewcommand{\cleardoublepage}%
  {\newpage{\pagestyle{empty}\cleardoublepageOriginal}}
Put that in the preamble.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

document structure

Post by gmedina »

The solution that Juanjo suggested will prevent the footers and headers from appearing in the additional pages. However, if you want to get rid of those pages, you can use the openany option for the book class, as the following example shows:

Code: Select all

\documentclass[twoside,openany]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{LEFT} 
\chead{CENTER}
\rhead{RIGHT}
\lfoot{left} 
\cfoot{\thepage}
\rfoot{right}
\renewcommand\headrulewidth{1pt}
\renewcommand\footrulewidth{0.5pt}

\begin{document}
\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
\clearpage

\chapter{The first chapter}

\end{document} 
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Abu Noor El-Din
Posts: 11
Joined: Wed Nov 21, 2007 1:43 am

document structure

Post by Abu Noor El-Din »

Juanjo wrote: To get an empty page, one possible solution is to redefine \cleardoublepage as follows:

Code: Select all

\let\cleardoublepageOriginal\cleardoublepage
\renewcommand{\cleardoublepage}%
  {\newpage{\pagestyle{empty}\cleardoublepageOriginal}}
Put that in the preamble.



Thanks Juanjo. It is exactly what I want.

I may use \pagestyle{plain} instead of \pagestyle{empty} in order to write the page number on this blank page. But in text books is there a page number in this blank page?
Abu Noor El-Din
Posts: 11
Joined: Wed Nov 21, 2007 1:43 am

document structure

Post by Abu Noor El-Din »

gmedina wrote: The solution that Juanjo suggested will prevent the footers and headers from appearing in the additional pages. However, if you want to get rid of those pages, you can use the openany option for the book class, [/code]


Thanks gmedina for your continuous help.
Post Reply