![BibLaTeX エントリ セットを別の参照として引用する](https://rvso.com/image/328803/BibLaTeX%20%E3%82%A8%E3%83%B3%E3%83%88%E3%83%AA%20%E3%82%BB%E3%83%83%E3%83%88%E3%82%92%E5%88%A5%E3%81%AE%E5%8F%82%E7%85%A7%E3%81%A8%E3%81%97%E3%81%A6%E5%BC%95%E7%94%A8%E3%81%99%E3%82%8B.png)
BibLaTeXでは、エントリーセットこれは一連の参照から構成され、例えば
@set{set1,
entryset = {member1, member2}
}
ただし、 を使用してこれらを引用すると\cite{set1}
、最終的な参考文献リストではすべての参照が 1 つの項目として表示されます。セットの各メンバーを個別の項目として表示するオプションはありますか? 基本的には、 と同じ効果を実現したいのです\cite{member1,member2}
が、個々のメンバーではなくセット名を引用します。
答え1
コメントから、エントリセットは関連する概念ではなく、いくつかの参照をリストするための省略形を探しているだけであることがわかります。これには単純なLaTeXマクロで十分です。次のように定義するだけです。
\newcommand{\myreflist}{key1,key2,...}
そして、\cite{\myreflist}
これらのエントリを引用する場合は、 などを使用することができます。
引用の並べ替えなどの機能がまだ機能していることを示す例を次に示します。
\documentclass{article}
\usepackage[sortcites=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\newcommand{\myreflist}{westfahl:space,glashow,baez/article}
\begin{document}
Here some citations \cite{\myreflist}.
\printbibliography
\end{document}
答え2
あなたはusebib
パッケージエグレッグこの目的のためです。パッケージのドキュメントには、必要な説明がほぼすべて記載されています。具体的には、次の手順を順番にプリアンブルに追加する必要があります。
- include
\usepackage{usebib}
(ロード後hyperref
) entryset
;を使用してキーを有効にします\newbibfield{entryset}
。\bibinput{filename}
拡張子なしでbib ファイルを指定します.bib
。entryset
その後、を使用してキーの値にアクセスできます\usebibentry{cite_key}{entryset}
。
全体として、 で必要な結果が得られます\cite{\usebibentry{set1}{entryset}
。もちろん、必要に応じて、これを短縮する単純な新しいコマンドを定義することもできます。
\newcommand{\citeset}[1]{\cite{\usebibentry{#1}{entryset}}}
を使用するだけです\citeset{set1}
。以下は最小限の動作例です。
テスト.bib
@misc{foo1,
author = {Foo, F. and Bar, B.},
year = {2021},
title = {Foo 1},
}
@misc{foo2,
author = {Foo, F. and Bar, B.},
year = {2021},
title = {Foo 2},
}
@set{foo,
entryset = {foo1, foo2}
}
テスト.tex
\documentclass{article}
\usepackage{biblatex}
\addbibresource{test.bib}
\usepackage{usebib}
\newbibfield{entryset}
\bibinput{test}
\begin{document}
This is the entryset key: \usebibentry{foo}{entryset}
Here we cite foo as individual references.\autocite{\usebibentry{foo}{entryset}}
\printbibliography
\end{document}