我需要一个非常精简的参考文献部分,所以我使用此代码@moewe。然而,出于某种原因,它突然忽略了该doi=false
标志。
新风:
\documentclass[]{article}
\usepackage[utf8]{inputenc} %Allows UTF8 input.
\begin{filecontents}{MWE.bib}
@article{VESTA,
author = "Momma, Koichi and Izumi, Fujio",
title = "{{\it VESTA3} for three-dimensional visualization of crystal, volumetric and morphology data}",
journal = "J. App. Cryst.",
year = "2011",
volume = "44",
number = "6",
pages = "1272--1276",
doi = {10.1107/S0021889811038970}
}
\end{filecontents}
\usepackage[backend=biber,style=chem-acs,doi=false,articletitle=false,pageranges=true,biblabel=parens,autocite=superscript,url=false,isbn=false]{biblatex}
\AtEveryBibitem{%
\clearfield{pages}%
}
\addbibresource{MWE.bib}
\defbibenvironment{bibliography}
{\noindent}
{\unspace}
{\printtext[bold]{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
\addspace}
\renewbibmacro*{finentry}{\finentry\quad}
\begin{document}
This is a test text.\cite{VESTA}
\printbibliography
\end{document}
答案1
这是因为通常会抑制 DOI,但如果字段缺失biblatex-acs
,则无论选项如何,都会打印它们。由于在 MWE 中,您可以通过删除字段来始终获得 DOI。doi
pages
pages
\AtEveryBibitem{\clearfield{pages}}
最好的办法可能是摆脱
\AtEveryBibitem{%
\clearfield{pages}%
}
在您的代码中。或者,我们可以强制biblatex-acs
始终遵守以下doi
选项:
\renewbibmacro*{note+pages}{%
\printfield{note}%
\setunit{\bibpagespunct}%
\printfield{pages}%
}