我想创建一个包含页眉和页脚的文档。到目前为止,页脚工作正常,但页眉却不行,因为某种原因页眉不见了。有人知道为什么会发生这种情况吗?
%!TEX TS-program = xelatex
\documentclass[12pt]{article}
%opening
\title{Example}
\usepackage[margin = 1.0in]{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath, amsfonts, amssymb}
\usepackage{braket}
\usepackage{fontspec}
\pagestyle{fancy}
\fancyhf{}
\rhead{Not working}
\rfoot{\thepage}
\setmainfont{Times New Roman}
\newcommand{\bd}{\textbf}
\begin{document}
\maketitle
\bibliographystyle{APA}
\bibliography{bibliography.bib}
\end{document}
答案1
\documentclass[12pt]{article}
%opening
\title{Example}
\usepackage[margin = 1.0in]{geometry}
\usepackage{fancyhdr}
\usepackage{amsmath, amsfonts, amssymb}
\usepackage{braket}
%\usepackage{fontspec}
\renewcommand{\headrulewidth}{0pt}
\fancypagestyle{firststyle}
{
\fancyhf{}
\fancyfoot[R]{\footnotesize Page \thepage}
\fancyhead[R]{\footnotesize Not Working}
}
\begin{document}
\maketitle
\thispagestyle{firststyle}
% \bibliographystyle{APA}
% \bibliography{bibliography.bib}
\end{document}