我有一些引用显示得相当丑陋,包括期刊后的 DOI,例如
J. Doe 和 J. Doe,“伟大的突破”,《自然通讯》13,10.1038/s12345-678-90123-4 (2022)。
我想删除这些10.1038/s12345-678-90123-4
内容,但保留期刊名称作为可点击链接。我尝试设置doi=false
和一些相关选项,但无济于事。如果我从文件doi
中删除该字段references.bib
,那么10.1038...
将消失,但链接也会消失。
梅威瑟:
example.tex
\documentclass{scrartcl}
\usepackage[backend=biber,style=phys,doi=false,eprint=false,url=false]{biblatex}
\addbibresource{references.bib}
\usepackage{hyperref}
\begin{document}
Text~\cite{author1}
\printbibliography
\end{document}
references.bib
@Article{author1,
author = {Jane Doe and John Doe},
date = {2022-01},
journaltitle = {Nature Communications},
title = {Great Breakthrough},
doi = {10.1038/s12345-678-90123-4},
number = {1},
volume = {13},
publisher = {Springer Science and Business Media {LLC}},
}
答案1
biblatex-phys
pages
仅当字段不存在时才显示 DOI 。但如果pages
不存在,它甚至会忽略该doi
选项并始终显示 DOI。
如果你不想这样,你可以使用以下note+pages
宏的重新定义
\renewbibmacro*{note+pages}{%
\printfield{note}%
\setunit{\bibpagespunct}%
\printfield{pages}%
}
根据此定义,DOI 输出仅受doi
选项控制。
\documentclass{scrartcl}
\usepackage[backend=biber,style=phys,doi=false,eprint=false,url=false]{biblatex}
\renewbibmacro*{note+pages}{%
\printfield{note}%
\setunit{\bibpagespunct}%
\printfield{pages}%
}
\begin{filecontents}{\jobname.bib}
@article{author1,
author = {Jane Doe and John Doe},
date = {2022-01},
journaltitle = {Nature Communications},
title = {Great Breakthrough},
doi = {10.1038/s12345-678-90123-4},
number = {1},
volume = {13},
publisher = {Springer Science and Business Media {LLC}},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\usepackage{hyperref}
\begin{document}
Text~\cite{sigfridsson,author1}
\printbibliography
\end{document}