2

Could anyone help me make my title page for a report centred both vertically and horizontally, i.e. directly in the middle of its own page.

My code looks like this:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage{hyperref}


\title{RAF Application}
\author{Edward Rolls, Eli Bingham, Laurence Hutton-Smith}
\begin{document}
\begin{titlepage} 

\maketitle

% abstract
\begin{abstract}
\end{abstract}

\end{titlepage}
\tableofcontents
\newpage

\section{Introduction}

Where at the end of the code the main content begins, any help would be greatly appreciated, this really shouldn't be that hard but for some reason I can't work it out!

3

One way is to redefine the \@maketitle command:

\makeatletter
\renewcommand{\@maketitle}{%
\newpage
\null
\vfil
\begingroup
\let\footnote\thanks
\centering
{\LARGE\@title}\vskip1.5em
{\large\@author}\vskip1em
{\large\@date}
\endgroup
\vfil
}
\makeatother
  • Thank you, this works great! Added '\vskip1em' to {\large\@date} to centre that, but otherwise great! Many thanks! – Freeman Aug 9 '13 at 13:35
  • 1
    You're welcome. The alignement of the date is what came to my mind when i left the library today. A simple \par after the "date"-group adresses this too. – Ruben Aug 9 '13 at 15:22
3

You said report, but using article class. It is bit confusing as to why don't you use report class for typesetting a report.

For article class you can pass the titlepage option to make the title centered. You need not put \maketitle inside the titlepage environment.

\documentclass[a4paper,10pt,titlepage]{article}
\usepackage[utf8]{inputenc}
%%\usepackage{fullpage}%% obsolete don't use. Use geometry package instead.
\usepackage{hyperref}
\usepackage[margin=1in,showframe]{geometry}  %% showframe is just tfor demo, remove in your file  
%
\title{RAF Application}
\author{Edward Rolls, Eli Bingham, Laurence Hutton-Smith}
\begin{document}
\maketitle
% abstract
\begin{abstract}
\end{abstract}

\tableofcontents
\newpage

\section{Introduction}
\end{document}

enter image description here

  • This is good, except all the lines around the edges seem to spoil the appearance, thank you very much for your time though! – Freeman Aug 9 '13 at 13:35
  • @Freeman Those lines are there just to show that everything is centered. Remove showframe from geometry and they vanish. I feel that it is better to have abstract in the second page though (like in my code). – user11232 Aug 9 '13 at 13:41
1

I am guessing there are a million ways to do it. I would probably patch the \@maketitle macro to get the centering.

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}{\newpage}{\newpage\vspace*{\fill}}{}{}
\appto{\@maketitle}{\vspace{\fill}}
\preto{\abstract}{\vspace{-\fill}}
\appto{\endabstract}{\vspace{\fill}}
\makeatother

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.