tex%20%E3%83%98%E3%83%AB%E3%83%97.png)
に関して2つの質問がありますbiblatex
。
私は MathSciNet から参考文献のエントリを取得しましたが、これにはいくつかのフィールドがあります。たとえば、次のようなフィールドがあります。
@article {Gratzer2013, AUTHOR = {Gr\"{a}tzer, G.}, TITLE = {The order of principal congruences of a bounded lattice}, JOURNAL = {Algebra Universalis}, FJOURNAL = {Algebra Universalis}, VOLUME = {70}, YEAR = {2013}, NUMBER = {1}, PAGES = {95--105}, ISSN = {0002-5240}, MRCLASS = {06B10 (06A06)}, MRNUMBER = {3073941}, MRREVIEWER = {S. Parameshwara Bhatta}, DOI = {10.1007/s00012-013-0242-3}, URL = {https://doi.org/10.1007/s00012-013-0242-3}, }
次のコマンドを使用する場合:
{ %%%% biblatex usage \usepackage[style=numeric, backend=biber, backref, bibencoding=utf8, sorting=nyt]{biblatex} \addbibresource{ref.bib} }
そして、biber でコンパイルすると、「MRNUMBER」や「MRCLASS」や「MRREVIEWER」からデータが取得されません。
私の質問は、参考文献にこれらのデータやその他の関連データを取得するにはどうすればいいかということです。これを行う標準クラスはありますか?
私の古い .bib ファイルは手動でコンパイルされており、現在 MathSciNet 機能を使用して取得している情報は含まれていません。これらの情報を複数のファイルにわたる数百の参考文献エントリに自動的に追加することは可能ですか
.bib
?
答え1
amsrefs から biblatex への切り替えすでに参考文献でショーを作成する方法を示しているmrnumber
ので、ここでも示しmrclass
ますmrreviewer
。
考え方は同じです。まず、.dbx
新しいフィールドを含む新しいデータモデル ファイル ( ) を定義し、それを オプションでロードします。次に、それらのフィールドの形式が必要になり、最後に、標準マクロ ( ) の 1 つで呼び出されるdatamodel
bibmacro ( ) でフィールドを印刷する必要があります。mrinfo
doi+eprint+url
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents*}{mrnumber.dbx}
\DeclareDatamodelFields[type=field,datatype=literal]{mrnumber,mrclass}
\DeclareDatamodelFields[type=list, datatype=name]{mrreviewer}
\DeclareDatamodelEntryfields{mrnumber,mrclass,mrreviewer}
\end{filecontents*}
\usepackage[style=numeric, backend=biber, sorting=nyt, datamodel=mrnumber]{biblatex}
\usepackage{hyperref}
\DeclareFieldFormat{mrnumber}{%
\ifhyperref
{\href{http://www.ams.org/mathscinet-getitem?mr=1#1}{MR#1}}
{MR#1}}
\DeclareFieldFormat{mrclass}{#1}
\DeclareNameAlias{bymrreviewer}{byeditor}
\newbibmacro*{mrinfo}{%
\printfield{mrnumber}%
\iffieldundef{mrclass}
{\setunit*{\addcomma\space}}
{\setunit*{\addspace}}%
\printfield{mrclass}%
\setunit*{\addcomma\space}%
\ifnameundef{mrreviewer}
{}
{\bibstring{byreviewer}%
\setunit{\addspace}%
\printnames[bymrreviewer]{mrreviewer}}}
\newtoggle{bbx:mrinfo}
\DeclareBibliographyOption[boolean]{mrinfo}[true]{\settoggle{bbx:mrinfo}{#1}}
\ExecuteBibliographyOptions{mrinfo}
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\iftoggle{bbx:mrinfo}
{\usebibmacro{mrinfo}}
{}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\begin{filecontents*}{\jobname.bib}
@article{gratzer,
author = {Grätzer, G.},
title = {The order of principal congruences of a bounded lattice},
journal = {Algebra Universalis},
volume = {70},
year = {2013},
number = {1},
pages = {95--105},
mrclass = {06B10 (06A06)},
mrnumber = {3073941},
mrreviewer = {S. Parameshwara Bhatta},
doi = {10.1007/s00012-013-0242-3},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{gratzer,sigfridsson}
\printbibliography
\end{document}
biblatex
2番目の問題については、全く関係がないので、新しい質問をすることをお勧めします。https://mathscinet.ams.org/mrlookup入力内容を入力して結果を取得します。フィールドが正確で.bib
あれば(そしてMathSciNetの情報と一致していれば)、正しい入力が得られるはずです。Pythonツールauthor
title
https://pypi.org/project/bibupdate/まさにそうするようです。