bibtopic で参照カウンターをリセットする方法

bibtopic で参照カウンターをリセットする方法

すべてはタイトルにあります。ファイル内に 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 からは次のようなエラーが発生します 。このオプションは注意して使用してください。

関連情報