我试图在同一章中添加 2 个参考书目,每个书目都跨越某些子书目。但是使用报告documentclass 中的每个参考书目都显示为其自己的一章。
heading=bibnumbered
那么,如何heading=subbibnumbered
使用报告文档类别?
平均能量损失:
\begin{filecontents*}{references.bib}
@book{E1, title = {Spanish Source 1}, author = {Placeholder}, keywords = {es}}
@online{E2, title = {Spanish Source 2}, author = {Placeholder}, keywords = {es}}
@book{G1, title = {German Source 1}, author = {Placeholder}, keywords = {de}}
@online{G2, title = {German Source 2}, author = {Placeholder}, keywords = {de}}
\end{filecontents*}
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[style=alphabetic]{biblatex}
\addbibresource{references.bib}
\begin{document}
\tableofcontents
\chapter{Main}
\section{Introduction}
Lorem ipsum
\nocite{*}
\chapter{Bibliography}
\printbibheading[title={Spanish Sources}, heading=bibnumbered]
\printbibliography[heading=subbibnumbered, type=book, keyword={es}, title={Books}]
\printbibliography[heading=subbibnumbered, nottype=legislation, nottype=book, keyword={es}, title={Articles}]
\printbibheading[title={German Sources}, heading=bibnumbered]
\printbibliography[heading=subbibnumbered, type=book, keyword={de}, title={Books}]
\printbibliography[heading=subbibnumbered, nottype=legislation, nottype=book, keyword={de}, title={Articles}]
\end{document}
答案1
定义一个新的 bibheading 来创建一个小节。
\defbibheading{subsubbibnumbered}[\refname]{%
\subsection{#1}}
并使用heading=subsubbibnumbered,
heading=subbibnumbered
(当您需要一个部分时使用。)
\begin{filecontents*}{references.bib}
@book{E1, title = {Spanish Source 1}, author = {Placeholder}, keywords = {es}}
@online{E2, title = {Spanish Source 2}, author = {Placeholder}, keywords = {es}}
@book{G1, title = {German Source 1}, author = {Placeholder}, keywords = {de}}
@online{G2, title = {German Source 2}, author = {Placeholder}, keywords = {de}}
\end{filecontents*}
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[style=alphabetic]{biblatex}
\addbibresource{references.bib}
\defbibheading{subsubbibnumbered}[\refname]{% added <<<<<<<<<<<<<<<<
\subsection{#1}}
\begin{document}
\tableofcontents
\chapter{Main}
\section{Introduction}
Lorem ipsum
\nocite{*}
\chapter{Bibliography}
\printbibheading[title={Spanish Sources}, heading=subbibnumbered]% section level <<<<<<<<<<<<<
\printbibliography[heading=subsubbibnumbered, type=book, keyword={es}, title={Books}]% subsection level <<<<<<<<<<<<<
\printbibliography[heading=subsubbibnumbered, nottype=legislation, nottype=book, keyword={es}, title={Articles}]
\printbibheading[title={German Sources}, heading=subbibnumbered]
\printbibliography[heading=subsubbibnumbered, type=book, keyword={de}, title={Books}]
\printbibliography[heading=subsubbibnumbered, nottype=legislation, nottype=book, keyword={de}, title={Articles}]
\end{document}