作为一名对乳胶了解越来越多的生物医学科学家,我很高兴看到 biblatex 支持 Pubmed ID(PMID)的排版,如 biblatex 手册第 141 页所述。
但是,如第 141 页所述,Pubmed 条目不是链接到电子印刷本,但主要链接到论文摘要,以及主要通过 doi 链接到论文全文。
有一个单独的数据库叫做 Pubmed Central,其中包含免费全文链接,这需要一个称为 PMCID 的单独编号。
例如,http://www.ncbi.nlm.nih.gov/pubmed/20708976是 Pubmed 摘要的链接。此处的相应名称为 PMID:20708976。与此摘要关联的是 Pubmed Central 中的免费全文链接http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2943379/这确实是一份电子版,其相应名称为 PMCID:PMC2943379
我如何指示 biblatex 以与 biblatex 手册中大纲相同的方式打印我的论文的 PMID 或 PMID 和 PMCID,也许与 DOI 和/或 URL 一起打印?这是否可能反映在下一版 biblatex 手册中?
(对于那些具有数学头脑的人来说,思考这个问题的一种方式是将 Pubmed 视为 MathSciNet,将 Pubmed Central 视为 arxiv。MR 编号并不意味着它是电子印刷本,PMID 也不意味着它是电子印刷本——这就是 biblatex 手册让我感到困惑的地方)。
答案1
不幸的是biblatex
,您不能为同一个条目使用两种电子打印类型,要做到这一点需要使用一些技巧。
但仅使用 PMCID 是小菜一碟。将以下几行添加到您的序言中
\DeclareFieldFormat{eprint:pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:PMCID}{eprint:pmcid}
\DeclareFieldAlias{eprint:pmc}{eprint:pmcid}
这将告诉biblatex
如何处理eprinttype = {pmcid}
s。
示例条目如下所示
@article{ContEp,
author = {Mark G. Frei and Hitten P. Zaveri and Susan Arthurs and Gregory K. Bergey and Christophe Jouny and Klaus Lehnertz and Jean Gotman and Ivan Osorio and Theoden I. Netoff and Walter J. Freeman and John Jefferys and Gregory Worrell and Michel Le Van Quyen and Steven J. Schiff and Florian Mormannn},
title = {Controversies in epilepsy},
subtitle = {Debates held during the Fourth International Workshop on Seizure Prediction},
journaltitle = {Epilepsy \& Behavior},
volume = {19},
number = {1},
pages = {4-16},
date = {2010-09},
doi = {10.1016/j.yebeh.2010.06.009},
eprint = {PMC2943379},
eprinttype = {pmcid},
}
请注意,显示 DOI 和 URL 也完全没有问题。
\documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{ContEp,
author = {Mark G. Frei and Hitten P. Zaveri and Susan Arthurs and Gregory K. Bergey and Christophe Jouny and Klaus Lehnertz and Jean Gotman and Ivan Osorio and Theoden I. Netoff and Walter J. Freeman and John Jefferys and Gregory Worrell and Michel Le Van Quyen and Steven J. Schiff and Florian Mormannn},
title = {Controversies in epilepsy},
subtitle = {Debates held during the Fourth International Workshop on Seizure Prediction},
journaltitle = {Epilepsy \& Behavior},
volume = {19},
number = {1},
pages = {4-16},
date = {2010-09},
doi = {10.1016/j.yebeh.2010.06.009},
%eprint = {20708976},
%eprinttype = {pubmed},
eprint = {PMC2943379},
eprinttype = {pmcid},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\DeclareFieldFormat{eprint:pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:PMC}{eprint:pmcid}
\DeclareFieldAlias{eprint:PMCID}{eprint:pmcid}
\DeclareFieldAlias{eprint:pmc}{eprint:pmcid}
\begin{document}
\cite{ContEp}
\printbibliography
\end{document}
您还可以设置字段pmid
,这样pmcid
它们就不会占用eprint
插槽并且可以并排使用。
我们需要一个数据模型(这里我们使用biblatex-dm.cfg
;文件应该放在 LaTeX 可以找到的地方;在 MWE 中,文件是通过环境自动创建的filecontents
;有关数据模型文件的更多信息,请参见第 151 页biblatex
文档§4.5.3数据模型规范)。您还可以创建专用的数据模型文件 ( .dbx
) 并加载该文件,请参阅数据模型宏不能在序言中使用,DOI、MR、Zbl 和 arxiv 的 BibTeX 字段?,如何使用 BibLaTeX/Biber 创建全新的数据类型?用于文件的解释和示例.dbx
。
\DeclareDatamodelFields[type=field,datatype=verbatim]{pmid}
\DeclareDatamodelEntryfields{pmid}
\DeclareDatamodelFields[type=field,datatype=verbatim]{pmcid}
\DeclareDatamodelEntryfields{pmcid}
现在我们有了字段pmid
并pmcid
可供使用。
我们需要声明它们的格式来打印这些字段(我们只需按照上面的方法操作即可)。
\DeclareFieldFormat{eprint:pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:PMC}{eprint:pmcid}
\DeclareFieldAlias{eprint:PMCID}{eprint:pmcid}
\DeclareFieldAlias{eprint:pmc}{eprint:pmcid}
\DeclareFieldAlias{pmcid}{eprint:pmcid}
\DeclareFieldAlias{pmid}{eprint:pubmed}
此外,我们需要打印字段,这是通过重新定义doi+eprint+url
宏来实现的。
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\printfield{pmcid}%
\newunit\newblock
\printfield{pmid}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
请注意,现在示例条目如下所示
@article{ContEp,
author = {Mark G. Frei and Hitten P. Zaveri and Susan Arthurs and Gregory K. Bergey and Christophe Jouny and Klaus Lehnertz and Jean Gotman and Ivan Osorio and Theoden I. Netoff and Walter J. Freeman and John Jefferys and Gregory Worrell and Michel Le Van Quyen and Steven J. Schiff and Florian Mormannn},
title = {Controversies in epilepsy},
subtitle = {Debates held during the Fourth International Workshop on Seizure Prediction},
journaltitle = {Epilepsy \& Behavior},
volume = {19},
number = {1},
pages = {4-16},
date = {2010-09},
doi = {10.1016/j.yebeh.2010.06.009},
pmcid = {PMC2943379},
pmid = {20708976},
}
数学家协会
\documentclass{article}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{ContEp,
author = {Mark G. Frei and Hitten P. Zaveri and Susan Arthurs and Gregory K. Bergey and Christophe Jouny and Klaus Lehnertz and Jean Gotman and Ivan Osorio and Theoden I. Netoff and Walter J. Freeman and John Jefferys and Gregory Worrell and Michel Le Van Quyen and Steven J. Schiff and Florian Mormannn},
title = {Controversies in epilepsy},
subtitle = {Debates held during the Fourth International Workshop on Seizure Prediction},
journaltitle = {Epilepsy \& Behavior},
volume = {19},
number = {1},
pages = {4-16},
date = {2010-09},
doi = {10.1016/j.yebeh.2010.06.009},
pmcid = {PMC2943379},
pmid = {20708976},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{filecontents*}{biblatex-dm.cfg}
\DeclareDatamodelFields[type=field,datatype=verbatim]{pmid}
\DeclareDatamodelEntryfields{pmid}
\DeclareDatamodelFields[type=field,datatype=verbatim]{pmcid}
\DeclareDatamodelEntryfields{pmcid}
\end{filecontents*}
\DeclareFieldFormat{eprint:pmcid}{%
PMCID\addcolon\space
\ifhyperref
{\href{http://www.ncbi.nlm.nih.gov/pmc/articles/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
\DeclareFieldAlias{eprint:PMC}{eprint:pmcid}
\DeclareFieldAlias{eprint:PMCID}{eprint:pmcid}
\DeclareFieldAlias{eprint:pmc}{eprint:pmcid}
\DeclareFieldAlias{pmcid}{eprint:pmcid}
\DeclareFieldAlias{pmid}{eprint:pubmed}
\renewbibmacro*{doi+eprint+url}{%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\newunit\newblock
\printfield{pmcid}%
\newunit\newblock
\printfield{pmid}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\begin{document}
\cite{ContEp}
\printbibliography
\end{document}