Document ClassesUnwanted blank pages in »book« class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Unwanted blank pages in »book« class

Post by coachbennett1981 »

I am compiling a book for someone and I am having trouble getting rid of extra pages. After each chapter, there is a blank page. Our cost is based on number of pages. Is there way to eliminate this? I have included the code, but none of the chapters are attached.

Thank you for you time,

Nick

Code: Select all

\documentclass[12pt]{book}
\usepackage{amsmath,amssymb,amsfonts} % Typical maths resource packages
\usepackage{graphics}                 % Packages to allow inclusion of graphics
\usepackage{color}                    % For creating coloured text and background      
\usepackage{multicol}
 \usepackage{enumitem}
\usepackage{tikz}
\usepackage{pst-circ}
\usetikzlibrary{positioning}
\usetikzlibrary{calc,through,backgrounds}
\usepackage[font=small,labelsep=none]{caption}
\usepackage{subfig}
\usepackage{pstricks}
\usepackage{pst-bar}
\usepackage{pstricks-add}
\usepackage{cancel}
\input{longdiv(2).tex}

\setlength\pdfpageheight{10.0in}
\setlength\pdfpagewidth{8.0in}

\setlength\topmargin{-0.5in}
\setlength\headheight{0.0in}
\setlength\headsep{0.5in}
\setlength\textheight{8.5in}
\setlength\textwidth{7in}
\setlength\oddsidemargin{-0.5in}
\setlength\evensidemargin{-0.5in}
\setlength\parindent{0.25in}
\setlength\parskip{0.25in}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}
\newcommand\T{\rule{0pt}{4.0ex}}
\newcommand\B{\rule[-2.0ex]{0pt}{0pt}}

\newcommand{\field}[1]{\mathbb{#1}}
\newcommand{\N}{\field{N}}
\newcommand{\Z}{\field{Z}}
\newcommand{\Q}{\field{Q}}
\newcommand{\R}{\field{R}}

\def\R{\mathbb{ R}}
\def\S{\mathbb{ S}}
\def\I{\mathbb{ I}}
\makeindex

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{varwidth,caption}
\usepackage{pstricks-add}
\newcommand\SideBySide[2]{\par
    \begin{minipage}[t]{0.48\linewidth}#1\end{minipage}
    \hfill
    \begin{minipage}[t]{0.5\linewidth}\centering#2
    \end{minipage}}
\title{Praxis 1: A study Guide  }

\author{Jane Doe \\ Jon Doe  \\
{\small\em \copyright \  Draft date \today }}

 \date{ }
\begin{document}
\def\firstcircle{(0,0) circle (1.5cm)}
\def\secondcircle{(45:2cm) circle (1.5cm)}
\def\thirdcircle{(180:2cm) circle (1.5cm)}
\setcounter{page}{1}

\maketitle
 \addcontentsline{toc}{chapter}{Contents}
\pagenumbering{roman}
\tableofcontents 
\chapter*{Preface}\normalsize
  \addcontentsline{toc}{chapter}{Preface}
\pagestyle{plain}
\pagestyle{headings}
\pagenumbering{arabic}
\include{ch2}
\include{ch4}
\include{ch5}
\include{ch6}
\include{ch7}
\include{ch8}
\include{ch9}
\include{Percentfinal}
\include{ch11}
\include{ch12}
\include{ch13}
\include{ch14}
\include{ch15}
\include{ch16}
\include{ch17}
\include{chapter18}
\include{ch19}
\include{ch20}
\include{ch21}
\include{ch22}
\begin{thebibliography}{99}
  \addcontentsline{toc}{chapter}{Bibliography}
\bibitem{lamport} L. Lamport. {\bf \LaTeX \ A Document Preparation System}
Addison-Wesley, California 1986.
\end{thebibliography}

\include{index}
  \addcontentsline{toc}{chapter}{Index}
\end{document}
Last edited by coachbennett1981 on Tue Mar 08, 2011 6:16 pm, edited 1 time in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unwanted blank pages in »book« class

Post by localghost »

You still have to learn how to build a minimal example. That's a point you should keep in mind for the future. Every documentation about LaTeX basics suggests to use the openany option for the document class.


Thorsten
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Unwanted blank pages in »book« class

Post by coachbennett1981 »

Thanks.. I understand about the minimal working example. I was simply not sure how to make one for this book feature.

Nick
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unwanted blank pages in »book« class

Post by localghost »

coachbennett1981 wrote:[…] I was simply not sure how to make one for this book feature. […]
Just for notification [1]. This should help you for the next time.

[1] View topic: Avoidable mistakes
Post Reply