名称中的超链接,作者日期中有多个引用 biblatex-chicago

名称中的超链接,作者日期中有多个引用 biblatex-chicago

我正在使用 biblatex 和 chicago-authordate 选项。我不仅想在年份上添加超链接,还想在作者姓名上添加超链接。超链接名称与 biblatex 作者年份 (biblatex 1.4b)几乎可以工作,但是有些括号坏了。

最小损坏示例:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[authordate, backend=biber]{biblatex-chicago}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{levi-strauss1981,
    Address = {New York},
    Author = {Levi-Strauss, Claude},
    Publisher = {Harper \& Row},
    Title = {The Naked Man: Mythologiques, Vol. 4},
    Year = {1981}}
@book{levi-strauss1968,
    Address = {New York},
    Author = {Levi-Strauss, Claude},
    Publisher = {Harper \& Row},
    Title = {The Raw and the Cooked: Mythologiques, Vol. 1},
    Year = {1968}}
@book{nimuendaju1952,
    Address = {Berkeley \& Los Angeles},
    Author = {Nimuendaju, Curt},
    Publisher = {University of California Press},
    Title = {The Tukuna},
    Year = {1952}}
\end{filecontents}
\addbibresource{\jobname.bib}

\ExecuteBibliographyOptions{maxcitenames=1}

\DeclareFieldFormat{citehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{#1}}

\DeclareFieldFormat{textcitehyperref}{%
  \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
  \bibhyperref{%
    #1%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}}}

\savebibmacro{cite}
\savebibmacro{textcite}

\renewbibmacro*{cite}{%
  \printtext[citehyperref]{%
    \restorebibmacro{cite}%
    \usebibmacro{cite}}}

\renewbibmacro*{textcite}{%
  \ifboolexpr{
    ( not test {\iffieldundef{prenote}} and
      test {\ifnumequal{\value{citecount}}{1}} )
    or
    ( not test {\iffieldundef{postnote}} and
      test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
  }
    {\DeclareFieldAlias{textcitehyperref}{noformat}}
    {}%
  \printtext[textcitehyperref]{%
    \restorebibmacro{textcite}%
    \usebibmacro{textcite}}}

\addbibresource{test.bib}

\usepackage{hyperref}

\begin{document}

The work by  \textcite{levi-strauss1981}  \\

The works by \textcite{levi-strauss1981,levi-strauss1968} \emph{$<$= incorrect brackets} \\

The works by \textcite{levi-strauss1981,nimuendaju1952} 

\printbibliography
\end{document}

给出输出: 损坏的示例屏幕截图

显然,第二行应该用Levi-Strauss (1981, 1968)代替Levi-Strauss (1981), 1968

如何修复此问题?

相关内容