The \maketitle command prints the title block at the top of a LaTeX document. It does not store any text itself. It reads the title, author, and date that you set earlier with \title, \author, and \date, so those commands must come before it.
Short answer
\maketitle prints a title block built from the \title, \author, and \date values. Set those three in the preamble, and call \maketitle after \begin{document}.
A minimal example
\documentclass{article}
\title{Notes on Heat Flow}
\author{A. Writer}
\begin{document}
\maketitle
\section{Introduction}
Text goes here.
\end{document}
Because no \date is given, the block shows the date the document was compiled.
Set the title, author, and date
- Title.
\title{...}sets the title. To break it over two lines, use\\inside the braces. - Author.
\author{...}sets the author. Use\andbetween names to place two authors side by side. See how to write an author name in LaTeX for more author options. Use\\to start a new line in the author block. - Footnote on an author.
\thanks{...}inside\authoradds a footnote marker and note after the name. - Date.
\date{...}sets the date. Without a\dateline, LaTeX uses\today, which is the compile date. To remove the date, write\date{}.
\title{Notes on Heat Flow \\ Part One}
\author{A. Writer \thanks{Funding from the example grant.} \and B. Reader}
\date{January 2027}
Where the title block appears
The layout depends on the document class:
- In
article, the title block sits at the top of the first page, and the text follows on the same page. - In
reportandbook, the title block is printed on its own title page.
Make a custom title page
If the default block does not suit your document, build a title page yourself with the titlepage environment. For thesis title pages, see how to write a thesis in LaTeX. This example prints a large title and the author, then the date at the bottom:
\begin{titlepage}
\centering
{\LARGE\bfseries Notes on Heat Flow\par}
\vspace{1cm}
{\large A. Writer\par}
\vfill
{\today\par}
\end{titlepage}
The titling package provides \thetitle, \theauthor, and \thedate. These hold the values you set, so you can reuse them in a custom layout.
Troubleshooting
- The title block is empty. Check that
\title,\author, and\datecome before\begin{document}, and that\maketitlecomes after it. - The date changes every compile. That is the default
\todaybehavior. Set a fixed date with\date{...}. - The author names run together. Use
\andbetween names, or\\to break the line. - Your fields are ignored. Some class files and templates redefine
\maketitle. In one reported case, a class that redefined it skipped the custom text. Check the template’s documentation for its title commands.
For title pages in longer documents, see chapters in LaTeX, which covers the report and book classes.