![如何使用 bibtopic 重置引用計數器](https://rvso.com/image/370309/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20bibtopic%20%E9%87%8D%E7%BD%AE%E5%BC%95%E7%94%A8%E8%A8%88%E6%95%B8%E5%99%A8.png)
一切都在標題中。假設books.bib
檔案中有 n 個引用,我希望第二部分的引用從 1 開始,而不是預設產生的 n+1 處。要重置的計數器的名稱是什麼?
\documentclass[a4paper,12pt]{report}
\usepackage{bibtopic}
\usepackage{filecontents}
\begin{filecontents}{books.bib}
@Book{Knuth1969,
Title = {{The Art of Computer Programming}},
Author = {Donald Knuth},
Year = {1969},
Volume = {2. Seminumerical Algorithms}
}
@Book{Knuth1968,
Title = {{The Art of Computer Programming}},
Author = {Donald Knuth},
Year = {1968},
Volume = {1. Fundamental Algorithms}
}
\end{filecontents}
\begin{filecontents}{articles.bib}
@Article{Doe2018,
Title = {My beautiful paper},
Author = {John Doe},
Journal = {Any Journal},
Year = {2018}
}
\end{filecontents}
\begin{document}
\begin{btSect}[unsrt]{books}
\section{References from books}
\btPrintAll
\end{btSect}
\begin{btSect}[unsrt]{articles}
\section{References from articles}
\btPrintAll
\end{btSect}
\end{document}
答案1
若要重置每個部分的參考文獻編號,您可以使用bibtopic
的選項sectcntreset
。
來自bibtopic
手動的(“2.2 封裝選項”,第 7 頁):
sectcntreset
將每個 bt-Sect 環境的參考書目項目的數位標籤重設為「1」。 (預設為連續編號。)筆記\btPrintCited
:只有在所有 btSect 環境中最多有一個指令時,這才有意義 ;否則,文檔中的引文標籤將不再是唯一的!壞事是你會得到沒有警告在這種情況下,來自 LaTeXmultiply-defined labels
- 所以請小心使用此選項。