
我對 Biblatex 使用authoryear 風格。對於具有 DOI 的文章,biblatex+biber 會自動在參考書目中產生以下內容:
DOI:10.1162/qjec.2008.123.1.49
其中包含一個超引用連結: https://doi.org/10.1162/qjec.2008.123.1.49
我想知道如何更改樣式,以便 DOI 也能顯示完整鏈接,即顯示:
並且仍然連結到相同的 URLhttps://doi.org/10.1162/qjec.2008.123.1.49
謝謝你!
微量元素:
\documentclass{article}
\usepackage{hyperref}
\usepackage[%url=false,eprint=false,
style=authoryear, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{GabaixLandier_2008,
author = {Gabaix, Xavier and Landier, Augustin},
doi = {10.1162/qjec.2008.123.1.49},
journal = {The Quarterly Journal of Economics},
number = {1},
pages = {49-100},
title = {Why has CEO Pay Increased So Much?},
volume = {123},
year = {2008},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\section{Introduction}
Dummytext~\autocite{GabaixLandier_2008}.
\printbibliography
\end{document}
答案1
加載後將以下內容添加到您的序言中biblatex
:
\DeclareFieldFormat{doi}{%
\mkbibacro{DOI}\addcolon\space
\ifhyperref
{\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}}
{\nolinkurl{https://doi.org/#1}}}
答案2
使用
\DeclareFieldFormat{doi}{\mkbibacro{DOI}\addcolon\space\url{https://doi.org/#1}}