这是我第一次在 stackexchange 上提问,希望我的 MWE 对你有帮助:我正在做一项作业,其中我想包含一个标题,指定每个页面的当前部分。然而,在参考书目中,标题显示了以前的部分并另外插入参考大写。我该如何将其更改为仅显示“参考”?
\documentclass[a4paper, 12pt]{article}
\usepackage[english]{babel}
\usepackage[pagestyles]{titlesec}
\usepackage{blindtext}
\usepackage[backend=biber,
style=authoryear-icomp
]{biblatex}
\addbibresource{Test.bib}
\newpagestyle{headers}{
\headrule
\sethead{\thesection. \sectiontitle}{}{\thepage}
\footrule
\setfoot{Author}{}{Institution}
}
\pagestyle{headers}
\begin{document}
\section{Section1}
\Blindtext
\cite{Chandra2014}
\clearpage
\printbibliography
\end{document}
答案1
scrlayer-scrpage
可以替代使用titleps
。
\documentclass[a4paper, 12pt,headsepline,footsepline]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[backend=biber,
style=authoryear-icomp
]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage[automark,markcase=noupper]{scrlayer-scrpage}
\renewcommand{\sectionmarkformat}{\thesection.~}
\ifoot{Carl Capybara}
\ofoot{School of Duck Dancing}
\setlength{\headheight}{14.5pt}
\begin{document}
\section{Wombat}
\Blindtext
\cite{aristotle:physics}
\clearpage
\printbibliography
\end{document}
答案2
这是由于\defbibheading
使用\markboth
与交互而造成的titleps
。因此我重新定义了此命令(改编自@egreg的回答):
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[pagestyles]{titlesec}
\usepackage{blindtext}
\usepackage[backend=biber,
style=authoryear-icomp
]{biblatex}
\addbibresource{nonsense.bib}
\newpagestyle{headers}{
\headrule
\sethead{\ifthesection{\thesection. }{}\sectiontitle}{}{\thepage}
\footrule
\setfoot{Author}{}{Institution}
}
\pagestyle{headers}
\defbibheading{bibliography}[\refname]{\section*{#1}\sectionmark{\refname}}
\begin{document}
\section{Section1}
\Blindtext
\cite{nonsense}
\nocite{*}
\clearpage
\printbibliography
\end{document}