Text FormattingRemove blank page

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
mike1264
Posts: 27
Joined: Wed Jul 24, 2013 6:07 pm

Remove blank page

Post by mike1264 »

Hi,
For a book layout I am trying to publish a 'copyright page' on a left page and a 'table of contents' on a right page. At the moment my code prints a title page (right) [correct] then adds an empty interleaf page (left) [wrong] then the copyright page (right) [wrong] and a table of contents (left) [wrong]. Can anyone suggest a way of getting rid of the interleaf page?

Code: Select all

\documentclass[10pt,english,british,twoside,openany]{scrbook}
	\usepackage{blindtext}
	\usepackage[automark,headsepline,footsepline=.25pt]{scrlayer-scrpage}
	\usepackage{microtype}
	\usepackage{ragged2e}
	\usepackage{graphicx}
	\usepackage[british]{babel}
	\pagestyle{scrheadings}
	\addtokomafont{pageheadfoot}{\slshape}
	\addtokomafont{pagehead}{\tiny}
	\addtokomafont{pagefoot}{\small}
	\addtokomafont{disposition}{\rmfamily}% rm for chapter headings
	\ohead{\leftmark}
	\ihead{Ben Francis}
	\ofoot{\mytitle}
	\cfoot{\pagemark}
	\renewcommand\thepart{\Alph{part}}
	\usepackage{fontspec}
	\setmainfont{Linux Libertine O}%JB: Just as an example
	\renewcommand*{\partpagestyle}{empty}
	\usepackage{geometry}
		\geometry{paperwidth=5.06in,paperheight=7.81in,
		verbose,
		tmargin=0.5in,
		bmargin=1in,
		inner=0.75in,
		outer=0.5in,
		headheight=0.1in,
		headsep=0.15in,
		footskip=0.45in,
		twoside}
	\newcommand{\mytitle}{Tears in the Rain} 

\begin{document}
	\title{\mytitle}
\frontmatter
	\date{}
	\maketitle
	\begin{titlepage}
		\begin{flushright}
        {\huge \mytitle}%JB: Those are switches active
        \par\end{flushright}{\huge \par}
	\end{titlepage}


	\begin{titlepage}
		\noindent\includegraphics[width=4in,height=2in]{../images/bensig}
		\vspace*{0.5in}
		\begin{flushright}
        {\Huge{}Tears in the Rain}
        \par\end{flushright}{\Huge \par}
	\end{titlepage}

	\begin{titlepage}
		\begin{center}
        		\emph{Copyright}
		\end{center}
		\begin{center}
        		\textcopyright{ 2014 Ben Francis All rights reserved.}
		\end{center}
		\vspace*{0.5in}
		\begin{center}
        \begin{minipage}[t]{0.5\paperwidth}
         	No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form, or by any means;
mechanical, electrical, photocopying, scanning, recording or otherwise, without prior written consent from the publishers. Every effort has been made to contact all copyright holders. The author and publisher will gladly rectify any omissions.
        \end{minipage}
		\end{center}
		\vspace*{0.5in}
		\begin{center}
        		ISBN:
		\end{center}
		\vspace*{0.2in}
		\begin{center}
        		A CIP Record for this book is available from the British
        Library.
		\end{center}
		\vspace*{0.1in}
		\begin{center}
        		Typeset in \LaTeXe
		\end{center}
	\end{titlepage}

	\tableofcontents

	\addchap{Preface}

		\emph{Tears in the Rain}, set in the emerging hippie Age of Aquarius in the early nineteen sixties... % input pref.file here

\mainmatter
	\part{Genesis}
	\addchap{One}
		\input{./one_one.tex} %need path to files
		\input{./one_two.tex}
		\input{./one_three.tex}
		\input{./one_four.tex}
		\addchap{Two}
		\input{./two_one.tex}
		\input{./one_two.tex}
		\input{./one_three.tex}
		\input{./one_four.tex}
	\part{How it all ended}
	% input rest of book
\end{document}
Many thanks,
Mike

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Remove blank page

Post by esdd »

Use only one titlepage environment for the titlepage and the copyright page and insert \clearpage and \thispagestyle{empty} between them:

Code: Select all

\documentclass[10pt,
        %english, % removed because of british
        british,twoside,openany]{scrbook}
        \usepackage{blindtext}
        \usepackage[automark,headsepline,footsepline=.25pt]{scrlayer-scrpage}
        \usepackage{microtype}
        \usepackage{ragged2e}
        \usepackage[demo]{graphicx}
        \usepackage[british]{babel}
        \pagestyle{scrheadings}
        \addtokomafont{pageheadfoot}{\slshape}
        \addtokomafont{pagehead}{\tiny}
        \addtokomafont{pagefoot}{\small}
        \addtokomafont{disposition}{\rmfamily}% rm for chapter headings
        \ohead{\leftmark}
        \ihead{Ben Francis}
        \ofoot{\mytitle}
        \cfoot{\pagemark}
        \renewcommand\thepart{\Alph{part}}
        \usepackage{fontspec}
        \setmainfont{Linux Libertine O}
        \renewcommand*{\partpagestyle}{empty}
        \usepackage{geometry}
                \geometry{paperwidth=5.06in,paperheight=7.81in,
                verbose,
                tmargin=0.5in,
                bmargin=1in,
                inner=0.75in,
                outer=0.5in,
                headheight=12pt,% enlarged as suggested by scrlayer-scrpage
                headsep=0.15in,
                footskip=0.45in,
                twoside}
        \newcommand{\mytitle}{Tears in the Rain} 

\begin{document}
        \title{\mytitle}
        \author{}% avoid the missing author warning
        \date{}
\frontmatter
        \maketitle
        \begin{titlepage}
                \begin{flushright}
        {\huge \mytitle}
        \par\end{flushright}{\huge \par}
        \end{titlepage}


        \begin{titlepage}
                \noindent\includegraphics[width=4in,height=2in]{../images/bensig}
                \vspace*{0.5in}
                \begin{flushright}
        {\Huge{}Tears in the Rain}
        \par\end{flushright}{\Huge \par}
        %\end{titlepage}
%
        %\begin{titlepage}
        \clearpage % added code
        \thispagestyle{empty} % added code
                \begin{center}
                        \emph{Copyright}
                \end{center}
                \begin{center}
                        \textcopyright{ 2014 Ben Francis All rights reserved.}
                \end{center}
                \vspace*{0.5in}
                \begin{center}
        \begin{minipage}[t]{0.5\paperwidth}
                No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form, or by any means;
mechanical, electrical, photocopying, scanning, recording or otherwise, without prior written consent from the publishers. Every effort has been made to contact all copyright holders. The author and publisher will gladly rectify any omissions.
        \end{minipage}
                \end{center}
                \vspace*{0.5in}
                \begin{center}
                        ISBN:
                \end{center}
                \vspace*{0.2in}
                \begin{center}
                        A CIP Record for this book is available from the British
        Library.
                \end{center}
                \vspace*{0.1in}
                \begin{center}
                        Typeset in \LaTeXe
                \end{center}
        \end{titlepage}

        \tableofcontents

        \addchap{Preface}

                \emph{Tears in the Rain}, set in the emerging hippie Age of Aquarius in the early nineteen sixties... % input pref.file here

\mainmatter
        \part{Genesis}
        \addchap{One}

\end{document}
Best regards
Elke
mike1264
Posts: 27
Joined: Wed Jul 24, 2013 6:07 pm

Re: Remove blank page

Post by mike1264 »

Hi Elke,

Thank you very much indeed. Your suggestion works brilliantly!

Much appreciated,
Mike
mike1264
Posts: 27
Joined: Wed Jul 24, 2013 6:07 pm

Re: Remove blank page

Post by mike1264 »

Elke,
One small question - how do I insert a blank page before a 'part' page in the same document?

Thanks,
Mike
esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Remove blank page

Post by esdd »

If the part page should be a right hand page:

Code: Select all

...
\cleardoubleoddpage
\part{Part title}
%\cleardoubleoddpage 
...
Best regards
Elke
Post Reply