![如何从我的页眉中删除“参考文献”?](https://linux22.com/image/317238/%E5%A6%82%E4%BD%95%E4%BB%8E%E6%88%91%E7%9A%84%E9%A1%B5%E7%9C%89%E4%B8%AD%E5%88%A0%E9%99%A4%E2%80%9C%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E2%80%9D%EF%BC%9F.png)
我正在使用 fancyhdr 为正在起草的文章创建一个简短的标题。我还需要在提交给期刊时将表格和图表打印在参考书目之后。最初,标题按照我的要求打印在页面的右上部分。但是,在我使用命令打印参考书目后,标题发生了变化,在页面的左上部分包含“参考文献”,以及我真正想要的页眉。在参考书目之后,后续页面的标题中仍包含“参考文献”。如何从标题中删除“参考文献”?(我不希望“参考文献”出现在任何页面的标题中)。
梅威瑟:
\documentclass[twocolumn]{article}
\usepackage[style=authoryear,maxcitenames = 2,mincitenames = 1,maxbibnames = 99,minbibnames = 1,dashed = false,firstinits=true,backend=biber]{biblatex}
% !BIB TS-program = biber
%^ line above is necessary to tell TeXShop to use Biblatex rathern than traditional BibTex.
\usepackage[utf8]{inputenc} % utf8 support
\usepackage[T1]{fontenc} % code for pdf file % w/out these two lines, I get the warning, "WARN - The entry '_______' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
\usepackage{fancyhdr}
\usepackage{filecontents}
\begin{filecontents}{Test.bib}
@unpublished{usgs_gmted_data,
Author = {{United States Geological Survey}},
Title = {USGS Global Multi-resolution Terrain Elevation Data (GMTED) product},
Url = {http://topotools.cr.usgs.gov/gmted_viewer/},
urldate = {2013-09-01},
urlmonth = {September},
Year = {2010}}
\end{filecontents}
\addbibresource{Test.bib}
\renewcommand\headrulewidth{0pt} % No line under running header
\pagestyle{fancy}
\rhead[R]{my running header}
\begin{document}
abc
\newpage
\nocite{*}
\newpage
abc
\printbibliography
\newpage
abc
\end{document}
答案1
在您的设置下,参考书目将打印为\section
,这自然会使用 更新标题内容\markboth
。您可以设置\markboth
为暂时吞噬其参数,因此不会影响标题:
{\renewcommand{\markboth}[2]{}% Remove header adjustment
\printbibliography}
这是您的最小示例:
\documentclass[twocolumn]{article}
\usepackage[style=authoryear,maxcitenames = 2,mincitenames = 1,maxbibnames = 99,minbibnames = 1,dashed = false,firstinits=true,backend=biber]{biblatex}
% !BIB TS-program = biber
%^ line above is necessary to tell TeXShop to use Biblatex rathern than traditional BibTex.
\usepackage[utf8]{inputenc} % utf8 support
\usepackage[T1]{fontenc} % code for pdf file % w/out these two lines, I get the warning, "WARN - The entry '_______' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.
\usepackage{fancyhdr}
\usepackage{filecontents}
\begin{filecontents}{Test.bib}
@unpublished{usgs_gmted_data,
Author = {{United States Geological Survey}},
Title = {USGS Global Multi-resolution Terrain Elevation Data (GMTED) product},
Url = {http://topotools.cr.usgs.gov/gmted_viewer/},
urldate = {2013-09-01},
urlmonth = {September},
Year = {2010}}
\end{filecontents}
\addbibresource{Test.bib}
\renewcommand\headrulewidth{0pt} % No line under running header
\pagestyle{fancy}
\rhead[R]{my running header}
\begin{document}
abc
\newpage
\nocite{*}
\newpage
abc
{\renewcommand{\markboth}[2]{}% Remove header adjustment
\printbibliography}
\newpage
abc
\end{document}
答案2
解决此问题的一个简单方法是将整个文档或仅感兴趣的页面的标题定义为空标题。以下是我如何做到这一点的 MWE:
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RE,RO]{}
\fancyhead[LE,LO]{}
我只是将这些行放在序言中并成功删除了参考标题。