章末の参考文献

章末の参考文献

各章の最後に参考文献を載せたいと思っています(後に本の最後にも載せます)。

この MWE では、これは機能しません。最後に「[1] AB、テスト ジャーナル...」と表示されることを期待していましたが、Bibtex は「プロセスが正常に終了しました」で実行されます。

\documentclass{book}

\usepackage[ngerman]{babel}

\usepackage[sorting=none, backend=bibtex]{biblatex} % load the package

\begin{filecontents}{bibliography_file.bib}
@ARTICLE{myref,
  AUTHOR       = "A B",
  TITLE        = "Test",
  JOURNAL      = "Journal",
  YEAR         = "2019",
  NUMBER       = "1"
}
\end{filecontents}

\addbibresource{bibliography_file.bib} % add a bib-reference file

\begin{document}

\chapter{First Chapter}

Hello. We cite \cite{myref}

\begin{refsection} % refsection environment
Citation section \thesection: \cite{myref} % collect citations
\printbibliography[heading=subbibliography] % print section bibliography
\end{refsection}

\end{document}

答え1

BibTeX で を使用する場合は、refsectionメイン ファイルだけでなく、各 のヘルパー ファイルでも BibTeX を実行する必要がありますrefsection

実際、MWEは警告を発するだろう

Package biblatex Warning: Please (re)run BibTeX on the file(s):
(biblatex)                refsectbibtex
(biblatex)                refsectbibtex1-blx
(biblatex)                and rerun LaTeX afterwards.

最初の実行では、BibTeX だけでrefsectbibtexなく も実行されますrefsectbibtex1-blx(他の refsections についても同様です)。

通常のコンパイル順序

latex <file>
bibtex <file>
latex <file>
latex <file>

したがって

latex <file>
bibtex <file>
bibtex <file>1-blx
...
bibtex <file>n-blx
latex <file>
latex <file>

ここで、 snの数ですrefsection


BibTeXの代わりにBiberを使用する場合、追加のBiber実行は不要で、任意の数のrefsectionsを使用してもコンパイルできます。

latex <file>
biber <file>
latex <file>
latex <file>

backend=bibtex,に変更してbackend=biber,、BibTeXの代わりにBiberを実行するだけです(Biblatex と Biber: 未定義の引用を避けるためのエディターの設定エディターでお手伝いします。

biblatex一部の高度な機能は Biber でのみ利用できるため、この問題を解決するには Biber に切り替えることをお勧めします。

関連情報