
Я использую стиль authoryear для Biblatex. Для статей, имеющих 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}}