使用 biblatex-phys 打印没有页码的 DOI

使用 biblatex-phys 打印没有页码的 DOI

我使用 BibLaTeX 样式phys来编写参考书目。biblatex-phys文档指出:

doi请注意,即使选项为,也会打印未指定页码的期刊文章的 DOI 值false

这正是我想要的行为:仅在需要时打印 DOI。但是,它似乎不起作用:

\documentclass{article}
\usepackage[style=phys]{biblatex}
\addbibresource{test.bib}
\begin{document}
Test. \cite{spaeth_circular_2019,jollans_explosive_2019}

\printbibliography
\end{document}

给出(下面的 bib 文件)

代码示例的结果

第一次引用时,没有 DOI,没有页面。

添加该选项doi=true可得到预期结果(无处不在的 DOI)。

我该如何修复这个问题以获得记录的行为?

文件test.bib

@article{jollans_explosive_2019,
    title = {Explosive, oscillatory, and Leidenfrost boiling at the nanoscale},
    volume = {99},
    url = {https://link.aps.org/doi/10.1103/PhysRevE.99.063110},
    doi = {10.1103/PhysRevE.99.063110},
    pages = {063110},
    number = {6},
    journaltitle = {Physical Review E},
    shortjournal = {Phys. Rev. E},
    author = {Jollans, Thomas and Orrit, Michel},
    urldate = {2019-09-21},
    date = {2019-06-27},
}

@article{spaeth_circular_2019,
    title = {Circular Dichroism Measurement of Single Metal Nanoparticles Using Photothermal Imaging},
    issn = {1530-6984},
    url = {https://doi.org/10.1021/acs.nanolett.9b03853},
    doi = {10.1021/acs.nanolett.9b03853},
    journaltitle = {Nano Letters},
    shortjournal = {Nano Lett.},
    author = {Spaeth, Patrick and Adhikari, Subhasis and Le, Laurent and Jollans, Thomas and Pud, Sergii and Albrecht, Wiebke and Bauer, Thomas and Caldarola, Martín and Kuipers, L. and Orrit, Michel},
    urldate = {2019-12-03},
    date = {2019-12-02},
}

答案1

目前,添加

\renewbibmacro*{note+pages}{%
  \printfield{note}%
  \setunit{\bibpagespunct}%
  \printfield{pages}%
  \iffieldundef{pages}
    {%
      \printfield{doi}%
      \clearfield{doi}%
    }%
    {%
      \iftoggle{bbx:doi}
        {}
        {\clearfield{doi}}%
    }%
}

加载后biblatex。我将在今天晚些时候的发布中修复此问题。

相关内容