![bibtopic で参照カウンターをリセットする方法](https://rvso.com/image/370309/bibtopic%20%E3%81%A7%E5%8F%82%E7%85%A7%E3%82%AB%E3%82%A6%E3%83%B3%E3%82%BF%E3%83%BC%E3%82%92%E3%83%AA%E3%82%BB%E3%83%83%E3%83%88%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95.png)
すべてはタイトルにあります。ファイル内に n 個の参照があると仮定するとbooks.bib
、2 番目のセクションの参照はデフォルトで生成される n+1 ではなく 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' にリセットします。(デフォルトは連続番号です。)注記: これは、すべてのbtSect環境で最大1つの\btPrintCited
コマンドしか使用しない場合にのみ意味があります。そうでない場合、文書内の引用ラベルは一意ではなくなります。悪い点は、警告なしmultiply-defined labels
この場合、LaTeX からは次のようなエラーが発生します 。このオプションは注意して使用してください。