
我想要不同的章節,每個章節都有自己的參考清單。我部分地意識到了這一點,但我沒有正確理解第二章的編號。我在第一章中使用的參考文獻在第二章中保留相同的編號。我幾乎盲目地看著這個問題,所以我真的希望有人能幫助我。
\documentclass[paper=A4,
twoside=true,
11pt,
headings=normal
]{scrreprt}
\usepackage[
backend= bibtex,
bibencoding=utf8,
style=nature,
sorting=none,
defernumbers=true,
refsegment=chapter,
natbib=true,
backref = false
]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
@misc{C03,
author = {Cuthor, C.},
year = {2003},
title = {Charlie},
}
@misc{D04,
author = {Duthor, C.},
year = {2003},
title = {Delta},
}
@misc{E05,
author = {Euthor, C.},
year = {2003},
title = {Ecko},
}
@misc{F06,
author = {Futhor, C.},
year = {2003},
title = {Foxtrot},
}
\end{filecontents}
\addglobalbib{\jobname.bib}
\begin{document}
\chapter{intro}
test \cite{A01} test \cite{B02} test \cite{C03} test \cite{D04}.
\printbibliography[segment=\therefsegment,resetnumbers=true,heading=subbibliography]
\chapter{chap2}
test \cite{E05} test \cite{B02} test \cite{A01} test \cite{F06}
\printbibliography[segment=\therefsegment,resetnumbers=true,heading=subbibliography]
\end{document}
答案1
為了使每個章節都有獨立的編號,您需要使用 arefsection
而不是 a refsegment
(參見手冊biblatex
,第 3.6.6 節):
refsection
a和環境之間的區別refsegment
在於,前者創建環境本地的標籤,而後者為過濾器segment
提供目標\printbibliography
而不影響標籤。它們在整個文檔中都是唯一的。
因此,只需在範例中更改refsegment=chapter
為即可實現所需的輸出。refsection=chapter
請注意,當使用 BibTeX 作為 的後端時biblatex
,這種方法會建立多個輔助文件,每個文件對應一個refsection
,需要單獨處理。因此,如果您的文件被稱為document.tex
,而不是bibtex document
您需要執行bibtex document1-blx
, bibtex document2-blx
, ... (日誌檔案包含您需要執行哪些命令的提示)。使用替代後端比伯,這是沒有必要的。
答案2
您可能想看看章節參考書目
您必須建立一個主文件,其中包含\include{}
其他 .tex 文件,然後在每個包含的文件中放置參考書目:
\documentclass[
paper=A4,
twoside=true,
11pt,
headings=normal
]{scrreprt}
\usepackage{chapterbib}
\begin{document}
\include{chapter_one}
\end{document}
然後在chapter_one.tex中:
% Content of document
\bibliographystyle{style}
\bibliography{Mybibliography}