我正在写论文,大学要求我的参考书目页码位于右上角。不幸的是,默认命令\printbibliography
不允许我更改页码位置。我的设置如下:
\documentclass[12pt]{report}
\usepackage[ascii]{inputenc}
\usepackage[backend=bibtex,style=mla]{biblatex}
\usepackage[left=1.5in,right=1in,bottom=1in,top=1in]{geometry}
\usepackage{amsmath, amsthm, amssymb, hyperref, setspace, fnpct, graphicx, fancyhdr, csquotes}
\addbibresource{bibliography/ref}
\pagestyle{fancy}
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\begin{document}
\include{body/title}
\pagenumbering{roman}
\setcounter{page}{2}
\thispagestyle{plain}
\include{body/copyright}
\include{body/dedication}
\include{body/acknowledgements}
\include{body/abstract}
\renewcommand\contentsname{Table of Contents} %Changes name from Contents to Table of Contents
\tableofcontents
\pagebreak
\begin{spacing}{1.92}
\pagenumbering{arabic}
\setcounter{page}{1}
\thispagestyle{fancy}
\include{body/physicalism}
\fancypagestyle{plain}{ %This is to change the \chapter functionality so the page number is in the top right corner.
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\include{body/conceivability}
\include{body/zombies}
\include{body/conclusion}
\end{spacing}
\addcontentsline{toc}{chapter}{Bibliography} %Adds Bibliography to toc
\printbibliography[title=Bibliography]
\end{document}
我希望它位于右上角但我不知道如何实现它。
答案1
以下命令应该可以执行您想要的操作:
\fancypagestyle{plain}{ %This is to change the \chapter functionality so the page number is in the top right corner.
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
但是,您的文件已将该命令放入组中
\begin{spacing}{1.92}
...
\end{spacing}
这会将页面样式的重新定义局部化plain
。所以\printbibliography
没有机会看到它。解决方案是将重新定义移出组(并更广泛地了解组的影响)。
\documentclass[12pt]{report}
\usepackage[backend=bibtex,style=mla]{biblatex}%
\usepackage{fancyhdr, setspace}
\addbibresource{biblatex-examples.bib}
\pagestyle{fancy}
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\begin{document}
\cite{westfahl:space}
\begin{spacing}{1.92}
% uncoment the following line and comment out the other one below to see the difference
%\end{spacing}
\fancypagestyle{plain}{ %This is to change the \chapter functionality so the page number is in the top right corner.
\fancyhf{}
\rhead{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\end{spacing}
\printbibliography[title=Bibliography]
\end{document}