17

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
    Jan 16 at 16:20

2 Answers 2

19

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
    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
    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
    Jan 31, 2016 at 23:04
  • Good gracious! One more forgotten.. You can safely remove it (unless you want some funny effect…)
    – Bernard
    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
    Jan 31, 2016 at 23:14
5

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}
1
  • what are all the \ for?
    – cgnieder
    Jan 16 at 16:24

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.