在 中scrreprt
,scrlayer-scrpage
我使用 设定了页眉,因此偶数页的外页眉显示“章节编号”,奇数页的外页眉显示“章节标题”。我希望此页眉在参考书目中也以完全相同的方式继续显示(见图)。我认为如果 Latex 将参考书目视为当前章节内的一个部分而不是单独的章节,那么这将可行。我该如何实现这一点?
梅威瑟:
\documentclass[A5paper, twoside, openright, headsepline, chapterprefix=true]{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%%%---header/footer
\usepackage[manualmark]{scrlayer-scrpage}
\automark{chapter}
%%--"Chapter #" in lehead (only for numbered chapters), chapter name in rohead
\renewcommand*\chaptermark[1]{%
\markboth{\ifnumbered{chapter}{\chaptermarkformat}{}}{#1}%
}
\AfterTOCHead[toc]{\markboth{}{\contentsname}}
\ofoot[\pagemark]{\pagemark}
%%%%---bibliography
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
%%%---blindtext
\usepackage{lipsum}
\begin{document}
\chapter{Title of a chapter}
\lipsum[1-5]
citing \cite{angenendt, doody, matuz:doody, gillies, herrmann, kastenholz, murray, reese, sarfraz}
\section{Title of a section}
\lipsum[6-10]
citing \cite{aksin, sigridsson, spiegelberg, springer, weinberg, yoon, augustine, cicero, coleridge, companion}
\printbibliography
\end{document}
答案1
我不确定我是否理解了您的问题。如果参考书目应该是使用文档类scrreprt
和包的部分,您可以向类选项biblatex
添加选项。bibliography=leveldown
例子:
\documentclass[
a5paper,% <- corrected
DIV=14,% <- added
twoside, openright, headsepline, chapterprefix=true,
bibliography=leveldown% <- added
]{scrreprt}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}% <- added to avoid a biblatex warning
%%%---header/footer
\usepackage[manualmark]{scrlayer-scrpage}
%%--"Chapter #" in lehead (only for numbered chapters), chapter name in rohead
\renewcommand*\chaptermark[1]{%
\markboth{\ifnumbered{chapter}{\chaptermarkformat}{}}{#1}%
}
\AfterTOCHead[toc]{\markboth{}{\contentsname}}
\ofoot[\pagemark]{\pagemark}
%%%%---bibliography
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
%%%---blindtext
\usepackage{lipsum}
\begin{document}
\chapter{Title of a chapter}
\lipsum[1-5]
citing \cite{angenendt, doody, matuz:doody, gillies, herrmann, kastenholz, murray, reese, sarfraz}
\section{Title of a section}
\lipsum[6-10]
citing \cite{aksin, spiegelberg, springer, weinberg, yoon, augustine, cicero, coleridge, companion}
\clearpage
\printbibliography
\end{document}
结果: