0

What is the space size before a title in the Article class?

I want to use \droptitle from titling to place the title immediately after the top margin and I need the value to drop. By immediately I mean the same vertical position as one would get by beginning the document with plain text.

Number47
  • 135
  • It would be helpful if you provided a specific example of how you intend to use \droptitle. – Mico Jun 07 '22 at 11:16

1 Answers1

1

(code adapted from this answer to the query how does '\maketitle' work?)

I will being by assuming that you do not specify the option titlepage while using the article document class. (Do let me know if this assumption is invalid.) To get rid of the vertical space that's otherwise inserted by default before \maketitle, just run the following code in the preamble:

\usepackage{etoolbox}
\makeatletter 
\patchcmd{\@maketitle}{\null}{}{}{} 
\makeatother

A full MWE (minimum working example) and its output -- the framelines are inserted because the optional showframe package is loaded:

enter image description here

\documentclass{article}
\usepackage{showframe} % draw frame lines around text block
\usepackage{etoolbox}
\makeatletter 
\patchcmd{\@maketitle}{\null}{}{}{} 
\makeatother

\begin{document} \title{Hello World} \author{Somebody} \maketitle \end{document}

Mico
  • 506,678