0

Solution below!

i'm working on my master's thesis, and have this problem with an empty page at the start of the document. I'm using TexMaker and use a "headdocument" where i put the preamble with include files. The include file then consist of the chapter with subchections. I need to make sure that my chapters start on an odd page, so my include file always starts with: \clearpage{\pagestyle{empty}\cleardoublepage}. To make a titlepage i'm also using an include file include{Titelblad/Titelblad} , wich has the \begin{titlepage} command. When i need to hand in a temporary version to my promotor i uncomment this include so that the thesis has a somewhat nice front page. When i do this i have an extra empty page in front of this frontpage. However when i need to hand in the final version, i need to remove this titlepage and start with the foreword (voorwoord in my document). This is because my university makes a cover by itself.

When i put this includefile for the titlepage in comment and want to start directly with foreword, i have 2 empty pages before my foreword starts.

I did try the solution that is given here with using the package atbegshi. This does solve the problem when i use the includefile for the titlepage. But it does not solve the problem with the foreword. With the foreword it removes 1 page, but still leaves one page. I also tried the newclude package, and use \include*{} but that didn't help either.

This is how my preamble looks

\documentclass[a4paper,twoside,openright]{report}
%-------------------------------------------
%PACKAGES
%-------------------------------------------

\usepackage[english,dutch]{babel}
\usepackage{graphicx}
\usepackage{full page}
\usepackage{upgreek}
\usepackage[utf8]{inputenc}
\usepackage{cite}
\usepackage{color} 
\usepackage{pdflscape}
\usepackage[]{pdfpages}
\usepackage{enumitem}
\usepackage{newclude}

%\usepackage{atbegshi}% http://ctan.org/pkg/atbegshi
%\AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}
%This is in comment because this gives the right results for one problem


%-------------------------------------------
% COMMANDS
%-------------------------------------------
%\setlength{\parskip}{1em}

%-------------------------------------------
%NEW COMMANDS
%-------------------------------------------

%-------------------------------------------
%DOCUMENT
%-------------------------------------------
\begin{document}
\begin{flushleft}
%-------------------------------------------
%INCLUDE 
%-------------------------------------------
%\include{Titelblad/Titelblad}
%This is in comment because i don't want a title page when i hand in my paper
\include{Varia/WoordVooraf}

\clearpage{\pagestyle{empty}\cleardoublepage}
\tableofcontents
\addtocontents{toc}{\protect\thispagestyle{empty}}
\thispagestyle{empty}

\clearpage{\pagestyle{empty}\cleardoublepage}
\listoftables
\addcontentsline{toc}{chapter}{\protect\numberline{}\listtablename}
\thispagestyle{empty}

\clearpage{\pagestyle{empty}\cleardoublepage}
\listoffigures
\addcontentsline{toc}{chapter}{\protect\numberline{}\listfigurename}
\thispagestyle{empty}

\clearpage{\pagestyle{empty}\cleardoublepage}
\include{Varia/VerklarendeWoordenlijst}
\thispagestyle{empty}

%The paper is in dutch, so the names are in dutch
\include{Abstract/AbstractNL}
\include{Abstract/AbstractEN}
\include{Onderzoeksvraag/Onderzoeksvraag}
\include{Verschillen/Verschillen}
\include{DC-grid/DC-grid}
\include{Beveiliging/Beveiliging}
\include{Industrie/Industrie}
\include{Conclussie/Conclussie}

\bibliographystyle{ieeetran}

\end{flushleft}
\end{document}

This is how an includefile looks:

\clearpage{\pagestyle{empty}\cleardoublepage}

\chapter{Inleiding}
\thispagestyle{empty}

\section{Situering}
Here i write about my thesis and try to be smart.
\section{Probleemstelling}
Here i write more about my thesis and try to look smarter.

I did my best to give as much information as possible, but if more is needed feel free to ask!

Also alot of thanks in advance! (:

Solution While working i wanted to know how my thesis would ook like fully justified. So i removed the flushleft. I found out that one of my chapters (the foreword) went missing as soon as i removed the flushleft. I suddenly found the solution because of a problem Godina.

When using flushleft it apparently makes a new page in front of your document as GodinA mentioned in his/her problem (Godina). A solution proposed was by using \clearpage{\pagestyle{empty}\cleardoublepage} but it's hackish.

I don't have alot of knowledge of LateX and have no idea how to resolve the problem if you realy want to use flushleft. But this might help others to understand the problem and maybe propose a better solution for it? Cheers

5
  • Why don't you just physically remove the unwanted title page from the output? If you have to hand in a PDF version, just use a PDF viewer (like Preview on Mac, Evince on Linux, or one of the many freebies for Windows) to remove the unwanted pages and save a new version.
    – Thruston
    Commented Mar 9, 2016 at 17:54
  • @Thruston that could work yes, and i took it into considiration as a last resort. But because LaTex inputs that page, it gets counted and so the page numbering is off... :/ Commented Mar 9, 2016 at 18:43
  • 1
    With the openright option, chapters always start at an odd numbered page; the \clearpage{\pagestyle{empty}\cleardoublepage} code is a bit hackish; remove it and do \usepackage{emptypage}, instead. The title page should not be input with \include, but with \input.
    – egreg
    Commented Mar 9, 2016 at 18:46
  • @egreg your suggestion did not solve the problem. I tried removing the hackish \clearpage{\pagestyle{empty}\cleardoublepage} and adding the \usepackage{emptypage} in the preamble. Also using the include, but the problem presists, and still messing up the numbering. I know of one solution, by is adding \setcounter{page}{1}, and then removing the page with a PDF viewer like Thruston suggested. But i want to know if there is a "clean" and les finicky sollution. Commented Mar 10, 2016 at 11:56
  • Please do not edit your solution into your question, but post it as an answer. Commented May 25, 2016 at 17:09

1 Answer 1

0

While working i wanted to know how my thesis would ook like fully justified. So i removed the flushleft. I found out that one of my chapters (the foreword) went missing as soon as i removed the flushleft. I suddenly found the solution because of a problem Godina.

When using flushleft it apparently makes a new page in front of your document as GodinA mentioned in his/her problem (Godina). A solution proposed was by using \clearpage{\pagestyle{empty}\cleardoublepage} but it's hackish.

I don't have alot of knowledge of LateX and have no idea how to resolve the problem if you realy want to use flushleft. But this might help others to understand the problem and maybe propose a better solution for it? Cheers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .