2

I am finalizing my thesis, I wrote my abstract, and I compressed everything to fit nicely on one page. Now I realized that my abstract was on a left-hand page but it needs to be on a right-hand page, so I added a \cleardoublepage instruction.

However, after doing so my abstract does not fit on one page anymore. It now has a complete paragraph that spills over to the next page.

\documentclass[a4paper,12pt]{book}
\usepackage{pdfpages}
\usepackage{verbatim}
\usepackage{stmaryrd}
\usepackage{array}
\usepackage{vub}
\usepackage[T1]{fontenc}
\usepackage[scaled]{uarial}
\usepackage{tocloft}
\usepackage{blindtext}
\usepackage{fancyhdr}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\setlength{\marginparwidth}{0pt}
\makeatletter

\makeatother
\geometry{textwidth=390pt}

\geometry{bindingoffset=2cm}


\begin{document}
    \maketitle

    % I want a blank page in between title page and abstract
    % I tried the following two commands, both show the same issue
    \cleardoublepage
    \newpage\null\thispagestyle{empty}\newpage

    \cleardoublepage
    \setcounter{page}{1}
    \pagenumbering{roman}
    \input{sections/abstract}
    % ...

\end{document}

Even when i add a blank left-hand page with \newpage\null\thispagestyle{empty}\newpage instead of \cleardoublepage, the problem still persists. It seems like right-hand pages are less long than left-hand pages. Is this even possible?

And this is the vub package:

\ProvidesPackage{vub}
\RequirePackage{color}
\RequirePackage{ifxetex}
\RequirePackage{tikz}
\RequirePackage{adjustbox}
% VUB is in Belgium, we use A4
% Additionally, we use `geometry` to play with margins on the title page
\RequirePackage[a4paper]{geometry}
%\RequirePackage[T1]{fontenc}

\RequirePackage{kvoptions}
\DeclareBoolOption[false]{spotcolors}
\DeclareComplementaryOption{nospotcolors}{spotcolors}
\ProcessKeyvalOptions*{}

\ifvub@spotcolors
\RequirePackage[spotcolors]{vubprivate}
\else
\RequirePackage{vubprivate}
\fi

\newcommand\@faculty{Set a faculty using \textbackslash faculty\{\textit{Engineering Sciences}\}}
\newcommand\@subtitle{}

\newcommand\pretitle[1]{%
  \makeatletter%
  \newcommand\@pretitle{#1}%
  \makeatother%
}

\newcommand\promotors[1]{%
  \makeatletter%
  \newcommand\@promotors{#1}%
  \makeatother%
}

\@ifundefined{faculty}{%
    \newcommand{\faculty}[1]{%
        \makeatletter%
        \renewcommand\@faculty{#1}%
        \makeatother%
    }%
}

\@ifundefined{subtitle}{%
    \newcommand{\subtitle}[1]{%
        \makeatletter%
        \renewcommand\@subtitle{#1}%
        \makeatother%
    }%
}

\renewcommand\maketitle{
\begin{titlepage}
    \newgeometry{left=18mm,top=20mm,right=10mm}
    \begin{minipage}{\dimexpr\textwidth}
      \raisebox{\dimexpr \triangleH-\height\relax}{\includegraphics[width=5.66cm]{vub_logo_cmyk}}%
      \hfill%
      \vubtriangle
    \end{minipage}

    \vfill

    \hspace{25mm}\begin{minipage}{\dimexpr\textwidth-58mm}
        \ifdefined\@pretitle%
            \vubfont\small\color{vuboranje}\@pretitle
        \fi

        \vubfontbf{\color{vubbleu}\flushleft{\Huge\expandafter\uppercase\expandafter{\@title}}}

        \vspace{5mm}

        {\color{vubbleu} \LARGE\vubfont\@subtitle}

        \vspace{3cm}

        {\color{vuboranje} \large\vubfont\@author}

        \vspace{5mm}

        {\color{vubbleu} \large\vubfont\@date}
    \end{minipage}

    \vfill

%    \hspace{25mm}\begin{minipage}{\dimexpr\textwidth-58mm}
%        \ifdefined\@promotors%
%            \vubfont{\color{vubbleu}\@promotors}
%
%            \vspace{2mm}
%        \fi
%
%        \vubfontbf{\color{vubbleu}\fontsize{10pt}{10pt}\selectfont \@faculty}
%    \end{minipage}

    \hspace{25mm}\begin{minipage}{\dimexpr\textwidth-58mm}
        \ifdefined\@promotors%
                \vubfont{\color{vuboranje}Promotor:\\}
                %\vspace{1mm}
            \vubfont{\color{vubbleu}\@promotors}

            \vspace{2mm}
        \fi

        \vubfontbf{\color{vubbleu} \@faculty}
    \end{minipage}
    \restoregeometry
\end{titlepage}
}

\endinput

Thanks for your help!

EDIT: The abstract is structured as follows:

\section*{Abstract}
% ... large text that should fit one page ...

There are 6 lines that spill on to the next page.

To give you a visual clue of what's happening and why i think right-hand pages are less long, this is without a white page (so this is a left-hand page):

Without white page

With a white page (this is a right page):

enter image description here

Notice that i left the phrase that is common to both versions.

  • Please provide more information about what's in abstract.tex. Also, how long (how many rows?) is the paragraph that spills over onto the next page? – Mico Jun 17 '18 at 8:35
  • A separate comment: It's kind of weird to have both \setcounter{page}{1} and \pagenumbering{roman}, as the \pagenumbering macro automatically resets the value of the page counter to 1. – Mico Jun 17 '18 at 8:40
  • Do you know about the \enlargethispage macro? If the number of rows spilling over to the next page of the Abstract isn't more than 2 or 3, try inserting \enlargethispage{1.5\baselineskip} immediately after \section*{Abstract} and check if the abstract material now fits on just one page. Or, just shorten the material in the abstract suitably... – Mico Jun 17 '18 at 8:41
  • @Mico thanks for pointing out. I added some images of what's actually happening. The problem is i already shortened the abstract remarkably that i cannot shorten it even more. But still, this should fit on one page since it works as you can see on the first image, but not on a right page for some reason. With the enlargethispage macro there are still 5 lines spilling over. – Kevin Jun 17 '18 at 8:45
  • Please provide a screenshot of the full abstract page, not just the lower part. – Mico Jun 17 '18 at 8:47
2

Your problem is that you are changing the page geometry inside a group, the titlepage environment. This is wrong. Changing page geometry in the middle of a document is not easy and \newgeometry and \restoregeometry should be always used at the document level. When used inside a group it leads to inconsistent \textheight:

\documentclass{book}
\usepackage{geometry,lipsum}

\begin{document}
\begingroup
\newgeometry{left=18mm,top=20mm,right=10mm}
blub
\restoregeometry
\endgroup

\lipsum \lipsum \lipsum

\end{document}

enter image description here

If you correct the titlepage code the current abstract page will be shorter. So you will either have to shorten the abstract text or use \enlargethispage if you want to keep everything on one page.

  • Ok thanks, so I got unlucky that the left page showed a bug which allowed the entire abstract to fit on one page? :/ – Kevin Jun 17 '18 at 9:38
  • @kevindp - It's not a matter of a bug, i.e., of software not doing properly what it's supposed to do. Instead, it's a matter of incorrect coding. – Mico Jun 17 '18 at 9:47
  • 1
    @Mico Well one could claim that the vub package is buggy ;-). – Ulrike Fischer Jun 17 '18 at 9:49
  • @UlrikeFischer - You're right. :-) – Mico Jun 17 '18 at 9:50
  • Indeed, since i did not write that package i find it “buggy”. – Kevin Jun 17 '18 at 10:17

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.