![缺少标题: (\rhead 未显示)](https://linux22.com/image/429985/%E7%BC%BA%E5%B0%91%E6%A0%87%E9%A2%98%3A%20(%5Crhead%20%E6%9C%AA%E6%98%BE%E7%A4%BA).png)
我想创建一个包含页眉和页脚的文档。到目前为止,页脚工作正常,但页眉却不行,因为某种原因页眉不见了。有人知道为什么会发生这种情况吗?
%!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}