6

I'm using BibLaTeX with the phys style for my bibliography. The biblatex-phys documentation states:

Note that DOI values are printed for journal articles with no pages given, even if the doi option is false.

This is exactly the behaviour I want: print the DOI only when it's needed. However, it doesn't appear to work:

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

\printbibliography
\end{document}

gives (bib file below)

Result of code sample

No DOI, no pages, on the first reference.

Adding the option doi=true gives the expected result (DOIs everywhere).

How do I fix this to get the documented behaviour?

The file 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},
}
  • Looks like a mess-up on my part: I'll fix. – Joseph Wright Dec 3 '19 at 10:20
7

For the present, add

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

after loading biblatex. I'll fix this later today in the release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.