我正在编写一个文档,该文档的边距由软件包设置fullpage
。但是,我也尝试使用fancyhdr
它来嵌入页眉。然而,当我打印此文档时,页眉会碰到第一行文本。我该如何修复此问题?
以下是 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}
答案1
您的问题中的代码导致以下警告:
"Package Fancyhdr Warning: \headheight is too small (0.0pt): Make it at least 14.49998pt."
按照那里给出的建议,您可以使用它\setlength{\headheight}{14.5pt}
来防止页眉与后面文本的第一行重叠。