10

I'm using the book style, and I've got a title and ToC, they generate a lot of blank spaces after them that is completely unnecessary; how do I stop this behaviour?

Here is my example code

\documentclass[12pt]{book}
\usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}
\usepackage[pdftex]{graphicx}
\parindent 10in
\parskip 0.05in
\title{My Broken Example}
\begin{document}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\raggedright

\chapter{First chapter}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet justo ut odio fringilla varius. Maecenas porttitor convallis suscipit. Aenean dictum faucibus purus nec gravida. Phasellus laoreet dolor sit amet orci ultrices varius. Curabitur tempus feugiat nisl, non pretium lacus tincidunt ut. Suspendisse placerat, sem eu rhoncus auctor, diam nisi pulvinar est, id venenatis urna mauris vel dui. 

In vitae arcu ac tortor vehicula dignissim ac sit amet velit. Aenean sapien velit, vestibulum at facilisis nec, egestas sed quam. Nunc sem lectus, condimentum eget porttitor sit amet, euismod vel lorem. Nullam vulputate pellentesque cursus. 

Vestibulum porta, purus id ultricies facilisis, neque nunc aliquet lectus, sit amet vulputate arcu mauris in diam. Praesent interdum lectus ac ligula cursus sed pretium mi tincidunt. Mauris blandit interdum sem, ac porta metus sagittis et. In at ligula id justo gravida rhoncus at vitae massa. Morbi mi tortor, dignissim et pellentesque quis, placerat ut lorem. 

\chapter{Second} Aliquam ut lorem sed tortor gravida feugiat. Aenean mattis aliquam diam, vitae tempus est lobortis ut. Nam augue urna, iaculis eget varius non, sagittis tempus nibh. Donec vitae laoreet enim. Vivamus vel quam ut nunc ultrices mollis. Cras a magna dolor. Sed et luctus lorem. Vivamus nunc felis, volutpat quis bibendum in, dapibus et justo. Donec eget nulla nunc.

Mauris et magna libero, sed euismod turpis. Morbi accumsan rhoncus tempor. Integer venenatis ipsum sit amet erat porttitor a scelerisque nisl malesuada. Mauris porta ultricies risus, sit amet tincidunt risus fermentum interdum. Nunc massa ipsum, tincidunt nec fermentum eget, euismod sit amet leo. Quisque consequat, erat dictum luctus tristique, justo odio congue velit, ac lacinia dolor erat vel libero. Sed pulvinar metus ut est interdum dignissim. Quisque lacus velit, porttitor nec malesuada sed, placerat et augue.

\end{document}
10

The title and table of contents are followed by \cleardoublepage command. You can temporarily switch \cleardoublepage to \clearpage as shown in this code of yours. Here we use braces to make this redefintion local.

\documentclass[12pt]{book}
\usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}
\usepackage[pdftex]{graphicx}
\title{My Broken Example}
\begin{document}
\frontmatter
%% Note the brace here 
{\let\cleardoublepage\clearpage 
\maketitle
\tableofcontents
} %%% and here.
\mainmatter
\raggedright
\parindent 0.5in
\chapter{First chapter}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet justo ut odio fringilla varius. Maecenas porttitor convallis suscipit. Aenean dictum faucibus purus nec gravida. Phasellus laoreet dolor sit amet orci ultrices varius. Curabitur tempus feugiat nisl, non pretium lacus tincidunt ut. Suspendisse placerat, sem eu rhoncus auctor, diam nisi pulvinar est, id venenatis urna mauris vel dui.

In vitae arcu ac tortor vehicula dignissim ac sit amet velit. Aenean sapien velit, vestibulum at facilisis nec, egestas sed quam. Nunc sem lectus, condimentum eget porttitor sit amet, euismod vel lorem. Nullam vulputate pellentesque cursus.

\indent Vestibulum porta, purus id ultricies facilisis, neque nunc aliquet lectus, sit amet vulputate arcu mauris in diam. Praesent interdum lectus ac ligula cursus sed pretium mi tincidunt. Mauris blandit interdum sem, ac porta metus sagittis et. In at ligula id justo gravida rhoncus at vitae massa. Morbi mi tortor, dignissim et pellentesque quis, placerat ut lorem.

\par Aliquam ut lorem sed tortor gravida feugiat. Aenean mattis aliquam diam, vitae tempus est lobortis ut. Nam augue urna, iaculis eget varius non, sagittis tempus nibh. Donec vitae laoreet enim. Vivamus vel quam ut nunc ultrices mollis. Cras a magna dolor. Sed et luctus lorem. Vivamus nunc felis, volutpat quis bibendum in, dapibus et justo. Donec eget nulla nunc.

Mauris et magna libero, sed euismod turpis. Morbi accumsan rhoncus tempor. Integer venenatis ipsum sit amet erat porttitor a scelerisque nisl malesuada. Mauris porta ultricies risus, sit amet tincidunt risus fermentum interdum. Nunc massa ipsum, tincidunt nec fermentum eget, euismod sit amet leo. Quisque consequat, erat dictum luctus tristique, justo odio congue velit, ac lacinia dolor erat vel libero. Sed pulvinar metus ut est interdum dignissim. Quisque lacus velit, porttitor nec malesuada sed, placerat et augue.

\end{document}
| improve this answer | |
  • Wow, not only did you solve my problem but taught me something new! – Pureferret Aug 9 '12 at 19:20
  • If I don't want a TOC, then there will still be a blank page after the title. Can you add information about how to remove even that? – Zelphir Kaltstahl Feb 23 '16 at 4:37
  • @Zelphir: In this particular case, it is because the chapter starts on odd page. If you use openany it is removed. For your case, I have no idea until I see the code. Or you can use \let\cleardoublepage\clearpage soon after the \maketitle command as it is done for toc (within braces) – user11232 Mar 27 '16 at 3:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.