我正在运行以下参考书目设置:
\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex}
\addbibresource{Chap1.bib}
Chap1.bib 包含书中所有参考文献。但是,我目前只能在论文末尾打印一份参考书目,我想为每一章制作单独的参考书目,以取代末尾的一份参考书目。
我对 LaTex 还比较陌生,虽然尝试了几天,但还是无法调整代码。如能得到帮助,我将不胜感激 :)
\documentclass[
11pt,
english,
onehalfspacing,
nolistspacing,
liststotoc,
toctotoc,
headsepline]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc} characters
\usepackage[T1]{fontenc}
\usepackage{awesomebox}
\usepackage{lmodern}
\usepackage{framed}
\definecolor{shadecolor}{named}{Snow2}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[
hyperref=auto,
mincrossrefs=999,
backend=biber,
sorting = none,
style=numeric-comp,
firstinits=true,
clearlang=true,
refsegment=chapter,
defernumbers=true
]{biblatex}
\addbibresource{Chap1.bib}
\geometry{
paper=a4paper,
inner=2.5cm,
outer=3.8cm,
bindingoffset=.5cm,
top=1.5cm,
bottom=1.5cm,
showframe,}
\begin{document}
\frontmatter
\pagestyle{plain}
\begin{titlepage}
\begin{center}
\end{center}
\end{titlepage}
\pagestyle{thesis}
\include{Chapters/Chapter1}
\printbibliography[heading=bibintoc]
\end{document}
MastersDoctoralThesis.cls 文件未发生更改,是从以下网址下载的http://latextemplates.com/template/masters-doctoral-thesis
引文示例 \cite{}
,\citep{}
使用.bib
文件(Chap1.bib
):
@article{giguere2019increased,
title={Increased vulnerability of nigral dopamine neurons after expansion of their axonal arborization size through D2 dopamine receptor conditional knockout},
author={Gigu{\`e}re, Nicolas and Delignat-Lavaud, Beno{\^\i}t and Herborg, Freja and Voisin, Aurore and Li, Yuan and Jacquemet, Vincent and Anand-Srivastava, Madhu and Gether, Ulrik and Giros, Bruno and Trudeau, Louis-{\'E}ric},
journal={PLoS genetics},
volume={15},
number={8},
pages={e1008352},
year={2019},
publisher={Public Library of Science}
}
Chapter1.tex
:
\chapter{Parkinson's Disease}
\label{Chapter1}
\newcommand{\keyword}[1]{\textbf{#1}}
\newcommand{\tabhead}[1]{\textbf{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{\bfseries#1}}
\newcommand{\option}[1]{\texttt{\itshape#1}}
\section{thank}
you for your patience \citep{giguere2019increased}.
答案1
您可以使用以下策略创建每章书目。
使用选项refsection=chapter,
(not refsegment=chapter,
),您将获得refsection
每个 的单独\chapter
。然后您只需要\printbibliography[heading=subbibintoc]
在每章末尾调用即可。
以下简明示例展示了其工作原理。两个虚构章节直接显示在文档主体中,但您当然可以将它们外部化为.tex
自己的文档。
\documentclass[english]{MastersDoctoralThesis}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{framed}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=numeric-comp,
sorting=none,
defernumbers=true,
giveninits=true,
refsection=chapter,
]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
% Chapters/Chapter1.tex
\chapter{Parkinson's Disease}\label{chap:parkinson}
\section{Lorem}
Ipsum dolor \autocite{sigfridsson}.
\printbibliography[heading=subbibintoc]
% Chapters/Chapter2.tex
\chapter{Other Disease}\label{chap:other}
\section{Dolor}
Sit amet \autocite{worman}.
\printbibliography[heading=subbibintoc]
\end{document}
正如评论中提到的,最初发布的 MWE 中有一些与参考书目无关的错误(\definecolor{shadecolor}{named}{Snow2}
,注释花括号)。即使这些错误与参考书目无关,它们仍然会阻止参考书目正确显示。