[Tex/LaTex] Title page oddly centered

coversformattinghorizontal alignmenttitles

I have to insert the cover page of my thesis as a title page, so it will also move from the center of the page to openright, I guess.

The titlepage code is this:

\begin{titlepage}
\begin{center}
{{\Large{\textsc{Alma Mater Studiorum $\cdot$ Universit\`a di
Bologna}}}} \rule[0.1cm]{15.8cm}{0.1mm}
\rule[0.5cm]{15.8cm}{0.6mm}
{\bf FACULTY OF ENGINEERING \\ Master degree in Electrical Engineering\\
\small{Curriculum:\\ Electronic systems for information processing}}
\end{center}
% [... more stuff]
\end{titlepage}

When this is used as cover it works well, but if I \include it in the thesis it comes out oddly centered:

enter image description here

The preamble of the document, packages excluded, looks like this:

\documentclass[12pt, a4paper, titlepage, twoside, openright]{book}
\usepackage{graphicx}   %Figures management
\linespread{1.2}

Can I get it centered without having to include it as a pdf page?

Even better, can I reuse the code for the cover and the title page, and just changing settings externally?

Best Answer

You can use geometry:

\documentclass[12pt, a4paper, titlepage, twoside, openright]{book}
\usepackage[pass]{geometry}
\usepackage{graphicx}   %Figures management
\linespread{1.2}

\begin{document}
\newgeometry{margin=2cm}
\begin{titlepage}
\linespread{1}
\centering

{\Large\scshape Alma Mater Studiorum $\cdot$ Universit\`a di Bologna}

\rule[0.1cm]{15.8cm}{0.1mm}
\rule[0.5cm]{15.8cm}{0.6mm}

{\bfseries FACULTY OF ENGINEERING \\ Master degree in Electrical Engineering

\small Curriculum:\\ Electronic systems for information processing\par}

\vspace{15mm}

{\LARGE\bfseries Power consumption analysis\\
 for self diagnosis of\\
 Wireless Sensor Nodes\par}

\vspace{19mm}

{\large\bfseries Master thesis in Electronic Calculators M\par}

\vspace{40mm}

\begin{minipage}[t]{0.50\textwidth}
\bfseries Supervisors:\\
\large Prof. Tullio Salmon Cinotti \\ Dr. Syed Aly Aamer
\end{minipage}%
\hfill
\begin{minipage}[t]{0.47\textwidth}\raggedleft
\bfseries Author:\\
\large Claudio Bacchiani
\end{minipage}

\vfill

{\large\bfseries Session 1\\ Year 2011-2012}
\end{titlepage}
\restoregeometry

The rest of the document

\end{document}

The pass option won't change the default parameters of the class, but will allow to use \newgeometry.

Notice the simplifications in the input: \large and \bfseries are declarations, so they don't have arguments. Beware that \bf is obsolete.

A style remark: in Italian the given name goes always before the family name. Whoever says the contrary is simply a bureaucrat.


You might consider using the package frontespizio:

\documentclass[a4paper]{book}

\usepackage{frontespizio}

\begin{document}

\begin{frontespizio}

\Istituzione{ALMA MATER STUDIORUM $\cdot$ UNIVERSIT\`A DI BOLOGNA}
\Divisione{Faculty of Engineering}
\Scuola{Master degree in Electrical Engineering\\
  Curriculum:\\
  Electronic systems for information processing}
\Titolo{Power consumption analysis \\
  for self diagnosis of \\
  Wireless Sensor Nodes}
\Sottotitolo{Master thesis in Electronic Calculators M}

\Candidato{Claudio Bacchiani}
\Relatore{Prof. Tullio Salmon Cinotti}
\Relatore{Dr. Syed Aly Aamer}

\NCandidato{Author}
\NRelatore{Advisor}{Advisors}
\Piede{Session 1 \\ Year 2011--2012}

\Margini{2.5cm}{1cm}{2.5cm}{2cm}


\end{frontespizio}