94

What is the best way to shift the title text 'up' in a LaTeX document compiled with pdftex? When I do this:

\documentclass[12pt,letterpaper, onecolumn]{article}
\setlength{\topmargin}{0in}
\title{Blah Blah Cool}
\date {}

\begin{document}
    \maketitle
    \section{Foo}
    foobar foobar foobar...
\end{document}

There is a quite a bit of space between the very top of the page and the title ("Blah Blah Cool"). How can I decrease/remove this space?

85

The titling package might help.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{titling}

\setlength{\droptitle}{-10em}   % This is your set screw

\author{The Author}
\title{The Title}

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

See the package manual for more details.

  • 4
    I like the "set screw" label! :-) – Mico Sep 26 '11 at 22:41
  • 6
    Why do you use em to set heights? Wouldn't ex make more sense? – Laura Oct 16 '12 at 17:38
60

A simple alternative is to use \vspace{}:

\documentclass[a4paper,11pt]{article}

\title{\vspace{-2.0cm}Stuff}
\author{Me Myself}

\begin{document}
\maketitle

\end{document}
30

Instead of using \author, \title, \date, and \maketitle, you can simply design your own title:

\documentclass[12pt,letterpaper, onecolumn]{article}

\begin{document}

\begingroup  
  \centering
  \LARGE Blah Blah Cool\\[1.5em]
  \large The Author\par
\endgroup

\section{Foo}
    foobar foobar foobar...

\end{document}
  • 11
    Er, I was going to downvote but then saw your rep. Now I have to ask: I was always under the impression that it was bad to typeset stuff like this but you mention it without any warning and it gives me the impression that it's 'standard procedure'. Have I been wrong all this time? – recluze Dec 28 '12 at 13:23
  • 5
    @recluze I am extremely sorry, but I just noticed this comment today (I was on vacation when you wrote it). What exactly do you mean with "typeset stuff like this"? It's well known that the standard \maketitle is very basic; if one wants flexibility (at least in the standard classes) and doesn't want (or doesn't know how) to redefine internal commands like \@maketitle, it's a valid option to design the title page manually (or using a dedicated package, as in Thorsten's answer). – Gonzalo Medina Apr 1 '13 at 14:13
  • 3
    Thanks for the answer. You understood my comment correctly and I do agree with your answer. Just wanted to point out that the "best way" would be redefine \maketitle. I've seen people get carried away with \Large etc. Once they start, they can't stop :) – recluze Apr 1 '13 at 14:57
  • @GonzaloMedina : I just joined this SE community so as to upvote your reply. – Gaurav May 22 '16 at 12:38
12

Lengths like \topmargin influence the general margins of a document (although using packages like geometry is the preferred way to do so). To remove the spacing at the start of a title created with \maketitle (and without using the titlepage option of the article class), one may alter the definition of the internal class command \@maketitle. In the following example, I've included the original definition and deleted two lines that otherwise would produce the vertical space.

EDIT: You may wonder what do \makeatletter and \makeatother do.

\documentclass[12pt,letterpaper,onecolumn]{article}

\makeatletter
\def\@maketitle{%
  \newpage
%  \null% DELETED
%  \vskip 2em% DELETED
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}
\makeatother

\title{Blah Blah Cool}
\date {}

\begin{document}
    \maketitle
    \section{Foo}
    foobar foobar foobar...
\end{document}
0

Without using any external packages we can have a simple title at the top of the page, without a date, as follows.

\documentclass[12pt,a4paper]{article}

% Move title toward top of page
\title{\vspace{-5em}Reference works: encyclopedias and dictionaries} 

% Remove date
\date{\vspace{-5em}} 

\begin{document}

\maketitle
Lorem.

\end{document}

This combines the technique from @jensph's answer with date removal.

You could also throw in \usepackage{a4wide} for thin margins when working with A4 documents.

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.