Removing vertical space inside \maketitle

You could alter the relevant documentclass definition wherein the \maketitle command is defined. But, don't do that. Your document will then compile differently for you than for others.

Try something like this:

\documentclass{article}

\author{Some random fellow\vspace{-2ex}% Toggle commenting out the command
}
\date{A long time ago}
\title{A comprehensive treatise on everything\vspace{-2ex}% to see the effect
}

\begin{document}
    \maketitle
\end{document}

The titling package gives you customisable hooks for re-styling the look of \maketitle.

For example \posttitle is a command to define the ‘closing material’ to the title block. Its default with this package is

\posttitle{\par\end{center}\vskip 0.5em}

So to tighten up the space a bit you might write instead:

\posttitle{\par\end{center}}

Furthermore,

\setlength{\droptitle}{-10pt}

will raise the whole title up by 10pt (say), to give more space for content beneath the title.


vanden says:

You could alter the relevant documentclass definition wherein the \maketitle command is defined. But, don't do that.

I completely agree with the second sentence. However, there's an alternative that gives you a little more control whilst ensuring that your document compiles the same wherever it is sent: copy the relevant section from the article.cls file into the preamble of your article and make the relevant changes there. Three things to note:

  1. There are some @s in the definition, so you will need to enclose the definition with \makeatletter before and \makeatother afterwards.
  2. The definition starts \newcommand\maketitle. As \maketitle will already be a command, you need to change the \newcommand to \renewcommand.
  3. Make sure you get the right one. There are two definitions of \maketitle in article.cls, depending on whether you send the option titlepage to the class or not.

I don't recommend this to a beginner, but to someone wanting to learn a little more about how things work, it's a reasonable way to peek under the bonnet [translation: hood].

Tags:

Spacing

Titles