注釈付き参考文献の新しいフィールドに基づいて入力後にテキストを追加する

注釈付き参考文献の新しいフィールドに基づいて入力後にテキストを追加する

追加

\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。その後、 で実際のエントリと注釈の間の距離を制御できます。参考文献エントリの末尾に何かを追加する非常に簡単な方法は、すべての優れた参考文献スタイルで使用する必要がある\bibparsepbibmacro を再定義することです。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}

注釈付き参考文献エントリ。

関連情報