18

How can I vertically center the text on a title page ?


My MWE :

\documentclass[]{article}
\title{Project Title}
\date{2016-31-01}
\author{Author Name}
\begin{document}
\pagenumbering{gobble}
\maketitle
\end{document}
1
  • Sorry to reopen this but is there a way to do this while also centering an abstract below the title?
    – michihupf
    Commented Jan 16, 2022 at 16:20

2 Answers 2

20

You can do that with the titling package:

\documentclass[]{article}
\title{Project Title}
\date{2016-31-01}
\author{Author Name}
\usepackage[showframe]{geometry}

\usepackage{titling}
\renewcommand\maketitlehooka{\null\mbox{}\vfill}
\renewcommand\maketitlehookd{\vfill\null}

\begin{document}

\begin{titlingpage}
\maketitle
\end{titlingpage}

\end{document} 

enter image description here

6
  • Thanks, this worked just fine, although why was the graphicx package used ?
    – stark
    Commented Jan 31, 2016 at 22:59
  • Oh! For nothing. I started with an existing preamble, and didn't notice I had forgotten to remove it. There's also a spurious amsymb. It's removed from the code now.
    – Bernard
    Commented Jan 31, 2016 at 23:02
  • So then I wouldn't need these lines as well right ? \includegraphics[width=4cm]{sendak.jpg} \vfill PUBLISHING HOUSE}
    – stark
    Commented Jan 31, 2016 at 23:04
  • Good gracious! One more forgotten.. You can safely remove it (unless you want some funny effect…)
    – Bernard
    Commented Jan 31, 2016 at 23:09
  • I don't understand the mess in the code I posted. I guessed it's a problem with my clipboard manager. Please see the corrected code, which is very short.
    – Bernard
    Commented Jan 31, 2016 at 23:14
6

I know some time has passed, but there is a simpler solution. You just need to use "titlepage" in the documentclass:

\documentclass[titlepage]{article}

\begin{document} \
\begin{titlepage} \
\title{test} \
\author{testauthor} \
\maketitle \
\end{titlepage} \
\end{document}
2
  • 2
    what are all the \ for?
    – cgnieder
    Commented Jan 16, 2022 at 16:24
  • Doesn't work for me, the title is still at the top of the page. Commented Aug 8, 2023 at 19:37

You must log in to answer this question.

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