選択による通知

選択による通知

特定の著者を含み、特定の年に出版された大きな bib ファイルからすべての項目を選択して参考文献を作成したいと考えています。

これまでのところ、nocite コマンドでは、すべてを表す * を使用するか、手動で単一の項目を指定することしか見たことがありませんが、より一般的なルールを使用した例は見たことがありません。

printbibliography はいくつかのルールを採用しているようですが、最初のテストでは、完全なリストから項目を選択するため、項目が順番に番号付けされないことが示されています。

Zotero などの GUI ツールで bib ファイルをインポートし、必要な項目を選択して、再度新しいファイルとしてエクスポートすることもできますが、TeX の領域にとどまり、たとえば異なる年や著者などを自動的に選択できるように拡張できるソリューションが欲しいです。

答え1

以下は、Biblatex と「ソース マップ」を使用して、関心のないエントリを無視するソリューションです。

\begin{filecontents}{\jobname.bib}
@book{one,
  author={Someone Else},
  year={2014},
  title={Uninteresting book},
}
@book{two,
  author={This Author},
  year={1999},
  title={Book that's too early},
}
@book{three,
  author={Author, This},
  year={2014},
  title={An interesting book},
}
@book{four,
  author={This Author},
  year={2014},
  title={Another interesting book},
}
@book{five,
  author={Someone Else and This Author},
  year={2014},
  title={Joint effort},
}
\end{filecontents}
\documentclass{article}

\usepackage{biblatex}
\addbibresource{\jobname.bib}
\DeclareSourcemap{
  \maps{
    \map{
      % Remove those not by chosen author
      \step[fieldsource=author,
            notmatch=\regexp{Author,\s+This|This\s+Author},
            final]
      \step[entrynull]
    }
    \map{
      % Remove those not from chosen year
      \step[fieldsource=year,
            notmatch={2014},
            final]
      \step[entrynull]
    }
  }
}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

著者名に一致する正規表現を記述する必要があります。これはフィールドのみを調べますauthor。フィールドやその他の追加ルールを使用する必要がある場合がありますeditor

答え2

bib2bib は私が探していたものでした。(直感的に言えば、bibtex2html パッケージに含まれています)

関連情報