0

I am writing a document with standard margins set by the fullpage package. However, I am also trying to use fancyhdr to embed a header. Yet, when I print this, the header runs into the first line of text. How can I go about fixing this?

Here is a MWE:

\documentclass[12pt]{article}

\usepackage{fullpage} %full page typesetting
\usepackage{setspace} %allows for non-singlespacing
\usepackage{graphicx} %graphics capabilities
\usepackage{latexsym} %extra symbols
\usepackage{rotating} %rotation for figures
\usepackage{longtable} %tables that fill more than a single page
\usepackage{hyperref} %hypertext links in the document
\usepackage{natbib} %better bibliographies
\usepackage{authblk} %author and affiliation in opening


%Put name and page number on subsequent pages
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rhead{\emph{Some Header}}
\cfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
%\AtBeginDocument{\thispagestyle{empty}}

\newcommand\e{\emph}
\newcommand\tb{\textbf}
\newcommand\un{\underline}
\newcommand\txt{\texttt}

\usepackage{blindtext}

\begin{document}
\blindtext 
\end{document}
0

1 Answer 1

1

The code from your question results in the following warning:

"Package Fancyhdr Warning: \headheight is too small (0.0pt): Make it at least 14.49998pt."

Following the advice given there, you can use \setlength{\headheight}{14.5pt} to prevent the header from overlapping with the first line of the following text.

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.