
追加
\DeclareDatamodelFields[type=field,datatype=literal]{cstatement}
\AtEveryBibitem{[\printfield{cstatement}]}
にbiblatex.cfg
はほとんど私が望んでいることです。キーワードを持つすべての bibtex エントリについてcstatement="This is a foo"
、このコードにより、biblatex は、その直前に「This is a foo」という書誌エントリを印刷します。
しかし、私が実は必要なのは、この新しいエントリを、注釈付き参考文献のように、エントリの直後に表示することです。「補遺」エントリもほとんど私が望んでいるのは、1) このカスタムキーワードを使用したい、2) 書式をより細かく制御したい、という理由だけで、完全には実現できません。つまり、cstatement のリテラルテキストを次のように表示したいのです。
\item [bibentry here]\\\ \\[cstatement literal text here]
ここで、\\\ \\
cstatement のテキストと bibentry の間に空白行が入ります。 (cstatement が存在しない限り、改行は入りません。) これは、どの bibtex エントリ タイプ (article、inproceedings など) でも機能します。
アドバイスをいただければ幸いです。
答え1
私はフィールドの前に を発行します\par
。その後、 で実際のエントリと注釈の間の距離を制御できます。参考文献エントリの末尾に何かを追加する非常に簡単な方法は、すべての優れた参考文献スタイルで使用する必要がある\bibparsep
bibmacro を再定義することです。finentry
annotation
この例では、の代わりにフィールドを使用しましたcstatement
が、データ モデル ファイルで フィールドを宣言する場合は、 のすべての言及を と交換するだけで済み annotation
ますcstatement
。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\setlength{\bibparsep}{.5\baselineskip}
\renewbibmacro*{finentry}{%
\setunit{\finentrypunct\par}%
\printfield{annotation}%
\finentry}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
author = {Humphrey Appleby},
title = {On the Importance of the Civil Service},
date = {1980},
annotation = {This is a foo},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{appleby}
\printbibliography
\end{document}