XeLaTex 不会破坏 DOI 链接

XeLaTex 不会破坏 DOI 链接

我目前正在写一些论文,我刚刚发现一些 DOI 链接没有被破坏。

我已经breaklinks=true进入了hyperref,但是它仍然不起作用......

看起来像这样: 在此处输入图片描述

这是一个最简单的例子:

\RequirePackage{filecontents}

\begin{filecontents}{bib.bib}
@ARTICLE{fspresult_fitting, 
    author={Riss D. and Hamzavi J.S. and Selberherr A. and Kaider A. and Blineder M. and Starlinger V. and Gstoettner W. and Arnoldner C.}, 
    journal={Otology \& Neurotology}, 
    title={Envelope versus fine structure speech coding strategy: a crossover study}, 
    year={2011}, 
    volume={32}, 
    number={7}, 
    pages={1094-1101}, 
    doi={10.1097/MAO.0b013e31822a97f4}, 
    month={September},
}

\end{filecontents}


\documentclass[12pt, a4paper, bibliography=totoc, listof=totoc, numbers=noendperiod, abstracton, parskip=half, headsepline
%, plainheadsepline
]{scrreprt}
\usepackage[hmargin=2cm, vmargin=3cm]{geometry}
% for back reference in bibliography
\usepackage[hidelinks,breaklinks=true]{hyperref}

% for biblatex with biber
\usepackage[backend=biber,sorting=none, maxnames=5]{biblatex}


\addbibresource{bib.bib}

\begin{document}
cite test \cite{fspresult_fitting}.

%%% bibliography
\printbibliography
\end{document}

答案1

您可以定义一个允许 DOI 中断的命令:

\documentclass[12pt, a4paper, bibliography=totoc, listof=totoc, numbers=noendperiod, abstracton, parskip=half, headsepline
%, plainheadsepline
]{scrreprt}
\usepackage[hmargin=2cm, vmargin=3cm]{geometry}
% for back reference in bibliography
\usepackage[hidelinks,breaklinks=true]{hyperref}

% for biblatex with biber
\usepackage[backend=biber,sorting=none, maxnames=5]{biblatex}

\usepackage{expl3}
\ExplSyntaxOn
\newcommand \breakDOI[1]
 {
  \tl_map_inline:nn { #1 } { \href{http://dx.doi.org/#1}{##1} \penalty0 \scan_stop: }
 }
\ExplSyntaxOff

\DeclareFieldFormat{doi}{%
  \mkbibacro{DOI}\addcolon\space
  {\breakDOI{#1}}}

\addbibresource{bib.bib}



\begin{document}
cite test \cite{fspresult_fitting}.

%%% bibliography
\printbibliography
\end{document}

在此处输入图片描述

相关内容