Text FormattingClear Page in the beginning of the document

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Diogo Remoaldo
Posts: 26
Joined: Mon Apr 06, 2015 8:24 pm

Clear Page in the beginning of the document

Post by Diogo Remoaldo »

Hi I am using the following code and at the begging I get a blank page as my first page what am I doing wrong?

Best regards,

Diogo Remoaldo

Code: Select all

\documentclass[openleft,a4paper,12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{epstopdf} 
\usepackage{float}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{url}
\usepackage[all]{hypcap}
\usepackage{caption}
\usepackage[paper=a4paper,top=2cm,bottom=2cm,right=2.5cm,left=2.5cm,twoside ,bindingoffset=1cm,marginparwidth=0in,marginparsep=0in]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{indentfirst}
\usepackage[export]{adjustbox}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{multirow}
\captionsetup[table]{position=above}
\usepackage{siunitx}
\newcolumntype{C}{>{\centering\arraybackslash}m}
\sisetup{per-mode=symbol}
\usepackage{hhline}
\captionsetup[table]{position=above}
\setcounter{secnumdepth}{4}
\DeclareSIUnit{\year}{ano}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\usepackage{eurosym}
\usepackage{makeidx}
\usepackage{subcaption}
\usepackage{afterpage}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{placeins}
\usepackage{appendix}


\addto\captionsportuguese{%
  \renewcommand\appendixname{Anexo}
  \renewcommand\appendixpagename{Anexos}
}
\setlength{\belowcaptionskip}{-2pt}

\setlist{itemsep=2pt}

\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}

\setlength{\floatsep}{5pt plus 1.0pt minus 2.0pt}
\setlength{\intextsep}{5pt plus 1.0pt minus 2.0pt}

\setlength{\parindent}{1.5em}
\setlength{\parskip}{0.5em}
%\renewcommand{\baselinestretch}{2.0}

\usepackage{fancyhdr}
\usepackage{lastpage}

\fancypagestyle{style1}{
\fancyhead{}
\fancyhead[LO,LE]{\nouppercase{\leftmark}}
\renewcommand{\headrulewidth}{0.4pt}
\fancyfoot{}

\fancyfoot[RO,LE]{\thepage}}

\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyfoot[RO,LE]{\thepage} %of \pageref{LastPage}}%
  \renewcommand{\headrulewidth}{0pt}}% Line at the header invisible
  %\renewcommand{\footrulewidth}{0.4pt}% Line at the footer visible


%\fancypagestyle{style2}{
%\fancyhead{}
%\renewcommand{\headrulewidth}{0pt}
%\fancyfoot{}

%\fancyfoot[RO,LE]{\thepage}}

%\fancypagestyle{style3}{
%\fancyhead{}
%\renewcommand{\headrulewidth}{0pt}
%\fancyfoot{}

%\renewcommand{\footrulewidth}{0pt}}


\pdfinclusioncopyfonts=1
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}
    
   

\newgeometry{top=2cm,bottom=2cm,right=2.5cm,left=2.5cm,bindingoffset=0cm,marginparwidth=0in,marginparsep=0in}
\title{Dissertação}
\author{Diogo Filipe Pereira Remoaldo}


\begin{document}
\begin{titlepage}
\pagestyle{empty}
\centering
\includegraphics[width=.7\linewidth]{logo_feup}

\vspace*{0.5cm}
\large{Departamento de Engenharia Mecânica}

\vspace*{5cm}

\huge{Dissertação}

\vspace*{1cm} \Large{Diogo Filipe Pereira Remoaldo}

%  
\vspace*{12cm} \normalsize{Porto, Julho de 2015}

\end{titlepage}
\pagebreak
\blankpage

%SUBCAPA

\begin{center}
\thispagestyle{empty}
\vspace*{1.5cm}
 \LARGE{\bf{Dissertação}}\\
\vspace{0.5cm}  \Large{Diogo Filipe Pereira Remoaldo}

\vspace{7cm}  \normalsize{Tese de Mestrado submetida na:}\\
\vspace{0.5cm}\large{Faculdade de Engenharia da Universidade do Porto\\ Mestrado Integrado em Engenharia Mecânica}

\vspace{2cm} \normalsize{Orientador:}
\\ \vspace{0.5cm} \large {Armando Carlos Figueiredo de Oliveira} 

\vspace{2cm} \normalsize{Co-orientador:}
\\ \vspace{0.5cm} \large {Ana Isabel Palmero Marrero}

\vspace{3cm} \normalsize{Departamento de Engenharia Mecânica\\Faculdade de Engenharia da Universidade do Porto}
\thispagestyle{empty}\clearpage\pagebreak\thispagestyle{empty}\pagebreak
\end{center}

\thispagestyle{empty}\clearpage\pagebreak\thispagestyle{empty}\pagebreak
\pagebreak
\blankpage

\clearpage
\restoregeometry

\setcounter{page}{1}
\newgeometry{top=2.5cm,bottom=2.5cm,right=2.5cm,left=2.5cm,twoside,bindingoffset=0.5cm,marginparwidth=0in,marginparsep=0in}


\renewcommand{\thepage}{\roman{page}}
\pagestyle{plain}
\begin{flushright}
	\vspace*{\fill}
	"Problems cannot be solved at the same level of awareness that created them"
	
	\vspace{0.6cm}
	Albert Einstein
\end{flushright}

\newpage
\end{document}
Last edited by Stefan Kottwitz on Mon Aug 24, 2015 8:48 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Clear Page in the beginning of the document

Post by Johannes_B »

You are setting all spaces on the titlepage by hand, making it to big to fit in one page.
\vfill \normalsize{Porto, Julho de 2015}
Notice the \vfill not to use a fixed space, but flush the location and date to the very bottom.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Diogo Remoaldo
Posts: 26
Joined: Mon Apr 06, 2015 8:24 pm

Re: Clear Page in the beginning of the document

Post by Diogo Remoaldo »

Yes but the first page is completly blank, how can I change it?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: Clear Page in the beginning of the document

Post by Stefan Kottwitz »

Hi Diogo,

did you try what Johannes said?

Generally, when something doesn't fit on the page, it goes to the next page. If this would apply what Johannes, said, that your title page is too big, it's clear: it goes to the next page. This would explain the empty page.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Clear Page in the beginning of the document

Post by Johannes_B »

I got the blank page myself in my tests and was able to remove it by \vfill. I bet the picture is just a bit too spacy.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply