使用以下 MWE 会出现如下所述的问题:bib 章节的标题未显示由 定义的正确文本\defbibheading
。我不知道为什么。感谢您的支持。
\documentclass[12pt]{report}
\usepackage[twoside,paperwidth=15cm,paperheight=21cm,includehead,top=11mm,bottom=19mm,outer=23mm,inner=18mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp,datecirca=true,dateera=secular]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareBibliographyCategory{Introduction}
\DeclareBibliographyCategory{Chapter1}
\DeclareBibliographyCategory{Chapter2}
\defbibheading{BibIntroduction}[Bibliography]{\chapter*{#1}}
\defbibheading{BibChapter1}[Bibliography 1]{\chapter*{#1}}
\defbibheading{BibChapter2}[Bibliography 2]{\chapter*{#1}}
\addtocategory{Introduction}{aksin}
\addtocategory{Introduction}{angenendt}
\addtocategory{Introduction}{baez/article}
\addtocategory{Introduction}{bertram}
\addtocategory{Introduction}{dooky}
\addtocategory{Chapter1}{matuz:doody}
\addtocategory{Chapter1}{gillies}
\addtocategory{Chapter1}{glashow}
\addtocategory{Chapter1}{herrmann}
\addtocategory{Chapter1}{kastenholz}
\addtocategory{Chapter1}{murray}
\addtocategory{Chapter1}{reese}
\addtocategory{Chapter1}{sarfraz}
\addtocategory{Chapter2}{shore}
\addtocategory{Chapter2}{sigfridsson}
\addtocategory{Chapter2}{spiegelberg}
\addtocategory{Chapter2}{springer}
\addtocategory{Chapter2}{weinberg}
\addtocategory{Chapter2}{artistotle:anima}
\addtocategory{Chapter2}{aristotle:physics}
\addtocategory{Chapter2}{aristotle:poetics}
\addtocategory{Chapter2}{aristotle:rhetoric}
\addtocategory{Chapter2}{augustine}
\addtocategory{Chapter2}{averroes/bland}
\usepackage{fancyhdr}
\fancypagestyle{Introduction}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape Introduction}}
\fancypagestyle{Chapter1}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape The first Chapter}}
\fancypagestyle{Chapter2}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape The second Chapter}}
\fancypagestyle{Afterword}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape Afterword}}
\fancypagestyle{bibIntroduction}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape Bibliography}}
\fancypagestyle{bibChapter1}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape Bibliography 1}}
\fancypagestyle{bibChapter2}{\fancyhf{}%
\fancyhead[RO,LE]{\small\rmfamily\thepage}%
\fancyhead[LO,RE]{\small\scshape Bibliography 2}}
\begin{document}
\section*{Introduction}
\pagestyle{Introduction}
\nocite{aksin}
\nocite{angenendt}
\nocite{baez/article}
\nocite{bertram}
\nocite{doody}
\clearpage
\section{Chapter 1}
\pagestyle{Chapter1}
\nocite{matuz:doody}
\nocite{gillies}
\nocite{glashow}
\nocite{herrmann}
\nocite{kastenholz}
\nocite{murray}
\nocite{reese}
\nocite{sarfraz}
\clearpage
\section{Chapter 2}
\pagestyle{Chapter2}
\nocite{shore}
\nocite{sigfridsson}
\nocite{spiegelberg}
\nocite{springer}
\nocite{weinberg}
\nocite{aristotle:anima}
\nocite{aristotle:physics}
\nocite{aristotle:poetics}
\nocite{aristotle:rhetoric}
\nocite{augustine}
\nocite{averroes/bland}
\clearpage
\printbibliography[heading=BibIntroduction,category={Introduction},title={Bibliography}]
\printbibliography[heading=BibChapter1,category={Chapter1},title={Bib: The first Chapter}]
\printbibliography[heading=BibChapter2,category={Chapter2},title={Bib: The second Chapter}]
% Problem in Output:
% page 6 and 8: the heading should be "Bibliography 2" (and not "The second Chapter")
% What needs to be done with defbibheading ?
\clearpage
\section*{Afterword}
\pagestyle{Afterword}
\end{document}
答案1
我自己找到了答案。我只是\clearpage\pagestyle{bibChapterX}
按照以下方式输入:
...
\clearpage
\pagestyle{bibIntroduction}
\defbibheading{BibIntroduction}{\chapter*{#1}}
\printbibliography[heading=BibIntroduction,category={Introduction},title={Bibliography}]
\clearpage
\pagestyle{bibChapter1}
\defbibheading{BibChapter1}{\chapter*{#1}}
\printbibliography[heading=BibChapter1,category={Chapter1},title={Bib: The first Chapter}]
\clearpage
\pagestlye{bibChapter2}
\defbibheading{BibChapter2}{\chapter*{#1}}
\printbibliography[heading=BibChapter2,category={Chapter2},title={Bib: The second Chapter}]
...
此外,我发现使用 biblatex 时,标题与页面样式不同。这让我感到困惑,也让我无法理解该怎么做。
作为一种变体,不是在书的末尾按章节打印整个参考书目,而是在相应章节的末尾按章节打印:
\chapter{This is Chapter X}
....
\clearpage
\pagestyle{bibChapterX}% defined with the help of the fancyhdr package, see above
\defbibheading{BibChapterX}[Bibliography X]{\chapter*{#1}}
\printbibliography[heading=BibChapterX,title={Bib: The chapter X},category={ChapterX}]
\clearpage
\chapter{This is Chapter Y}
...