Page Layout ⇒ Vertical Space before Title
Vertical Space before Title
I am using the article document class. When I use \maketitle an extra vertical space is added before the title. I would like to remove it (have the same vertical space as in other pages). Is there a good way to do this, in the preamble? (not \vspace{-3ex} before the title in the document body)
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical Space before Title
Code: Select all
\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{titling}
\usepackage{blindtext}
\setlength{\droptitle}{-4em} % Eliminate the default vertical space
\addtolength{\droptitle}{-4pt} % Only a guess. Use this for adjustment
\title{The Title}
\author{The Author}
\begin{document}
\maketitle
\blinddocument
\end{document}
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Vertical Space before Title
btw. How do you know that -4em is the default length? do you have a link to some source?
I looked at the package manual but didn't see that definition.
Isn't there a 'defaultskip' parameter or something?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Vertical Space before Title
The definition of the \maketitle command can be found by looking into the class file itself, that is to say »article.cls« in this case. If you want to find out its location in the TeX installation tree, check out on the command line.
Code: Select all
kpsewhich article.cls
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10