1

enter image description here

How can I adjust the header height of only Page 1 on my document? The title seems to be much too low on the page. It is fine for page 2 onwards.

Here is my template:

\documentclass[letterpaper,11pt]{article}
% \documentclass[twocolumn,letterpaper,11pt]{article} for double columns

\usepackage[
backend=biber,
    bibstyle=biblatex-sp-unified,
    citestyle=sp-authoryear-comp,
    style=apa,
natbib]{biblatex} %Imports biblatex package
\usepackage{multicol}
\usepackage{float} % here for H placement parameter
\usepackage{graphicx}
\usepackage{fancyhdr}



% Keywords command
\providecommand{\keywords}[2]
{
  \small    
  \textbf{\textit{Keywords:}} #1
}


\pagestyle{fancy}
\fancyhf{}
\rhead{type right header here}
\lhead{type left header here}
\rfoot{Page \thepage}

\addbibresource{references.bib} %Import the bibliography file

\title{This is the title of my document}
\author{Author XXXX }



\begin{document}
\date{}
\maketitle

\begin{abstract}
1
  • 1
    A better way to phrase this question would be "How can I reduce/remove the space above \maketitle?" Would you agree?
    – Werner
    Nov 28, 2021 at 2:26

1 Answer 1

1

A better way to phrase this question would be "How can I reduce/remove the space above \maketitle?"

You should look at what \@maketitle (in article.cls) does in order to see how to reduce the space above \maketitle:

\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \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}

The first couple of lines are important. \@maketitle inserts a \newpage (to ensure the title is set at the top of a page), then \null (which is nothing, but uses up a regular line of text that has a height of \baselineskip) and finally \vskip 2em (an additional vertical gap) before setting the title. We can negate these insertions by way of the following example:

enter image description here

\documentclass{article}

\usepackage{lipsum,showframe}% Just for this example

\title{Document Title}
\author{An Author}
\date{}

\begin{document}

\begingroup
\let\newpage\relax% Avoid page break
\vspace*{\dimexpr-2em-\baselineskip}% Remove vertical space inserted by \@maketitle
\maketitle
\endgroup

\lipsum[1-10]

\end{document}

We place the entire adjustment inside a scoped group (\begingroup...\endgroup) since it limits the redefinition of \newpage (to \relax, a no-op), restoring it after \endgroup.

7
  • I added that in but it didn't alter the space at the top of the page
    – kandyman
    Nov 28, 2021 at 2:40
  • I somehow manually adjusted it with: \usepackage[ margin=35mm, top=15mm, headheight=14.0pt]{geometry}
    – kandyman
    Nov 28, 2021 at 2:41
  • @kandyman Werner's answer worked for me, moving the title up. If you want it even further up then increase the 2em in Werner's code (to perhaps 4em). Nov 28, 2021 at 18:19
  • I'm not sure what I'm doing wrong, but it doesn't change the title position at all for me. Using 4em didn't do anything either.
    – kandyman
    Nov 28, 2021 at 23:29
  • @kandyman: Then supply a minimal document that replicates the issue so we can find out what the issue is. Can you do that?
    – Werner
    Nov 29, 2021 at 5:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .