General ⇒ document structure
-
- Posts: 11
- Joined: Wed Nov 21, 2007 1:43 am
document structure
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.
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
document structure
Code: Select all
\let\cleardoublepageOriginal\cleardoublepage
\renewcommand{\cleardoublepage}%
{\newpage{\pagestyle{empty}\cleardoublepageOriginal}}
document structure
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}
-
- Posts: 11
- Joined: Wed Nov 21, 2007 1:43 am
document structure
Juanjo wrote: To get an empty page, one possible solution is to redefine \cleardoublepage as follows:
Put that in the preamble.Code: Select all
\let\cleardoublepageOriginal\cleardoublepage \renewcommand{\cleardoublepage}% {\newpage{\pagestyle{empty}\cleardoublepageOriginal}}
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?
-
- Posts: 11
- Joined: Wed Nov 21, 2007 1:43 am
document structure
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.