1型

1型

我有作者年份格式的参考书目,但对一些常引用的作品使用简写(通过 shorthand参考书目字段)。因此,在我的文档中(参见下面的 MWE),参考文献看起来像 Fraser (1987)(正常参考文献)或像 OL(简写)。因此,我在参考书目前有一个简写列表。这在我的领域中都很常见。

现在,我的问题是速记参考的超链接没有指向速记列表,但是

  • 如果我保留默认设置,并在简写列表和参考书目中都包含使用简写的作品,则指向完整的参考书目 (MWE 1)。这没有意义:在默认的作者年份样式中,参考文献的简写甚至不会出现在该参考文献的条目中,因此点击 OL 的读者将进入一个很长的参考书目页面,并且必须猜测要查看哪个参考文献;
  • 或者如果我从完整参考书目中删除带有简写的作品,以将它们仅保留在简写列表中,它们就会被破坏(MWE 2)。

有没有办法让简写超链接指向简写列表(顺便说一下,这可能是合理的默认值)?

1型

\documentclass[11pt]{book}
\usepackage[backend=biber,style=authoryear,autolang=other]{biblatex}
\usepackage[pdftex,colorlinks=true,linkcolor=blue,citecolor=red,urlcolor=magenta,pdfview={XYZ 0 null null}]{hyperref} 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{filecontents}
\begin{filecontents}{bibwithshort.bib}
@book{lagrange_uvres_1867,
  author = {Lagrange, Joseph-Louis},
  editor =       {Serret, Joseph-Alfred},
  title = {Œuvres},
  publisher = {Gauthier-Villars},
  location =     {Paris},
  date = {1867/1892},
  volumes = {14},
  shorthand =    {OL}
}
@article{fraser_joseph_1987,
  title = {Joseph Louis Lagrange's Algebraic Vision of the Calculus},
  volume = {14},
  journaltitle = {Historia Mathematica},
  year = {1987},
  pages = {38--53},
  author = {Fraser, Craig G.},
}
\end{filecontents}
\addbibresource{bibwithshort.bib}


\begin{document}

\textcite{fraser_joseph_1987} mentions that in \textcite[vol. VII, p. …]{lagrange_uvres_1867}…

  %% Shorthands
  \printbiblist{shorthand}

  %% Bibliography
  \printbibliography

\end{document}

微波辐射计

\documentclass[11pt]{book}
\usepackage[backend=biber,style=authoryear,autolang=other]{biblatex}
\usepackage[pdftex,colorlinks=true,linkcolor=blue,citecolor=red,urlcolor=magenta,pdfview={XYZ 0 null null}]{hyperref} 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{filecontents}
\begin{filecontents}{bibwithshort.bib}
@book{lagrange_uvres_1867,
  author = {Lagrange, Joseph-Louis},
  editor =       {Serret, Joseph-Alfred},
  title = {Œuvres},
  publisher = {Gauthier-Villars},
  location =     {Paris},
  date = {1867/1892},
  volumes = {14},
  shorthand =    {OL}
}
@article{fraser_joseph_1987,
  title = {Joseph Louis Lagrange's Algebraic Vision of the Calculus},
  volume = {14},
  journaltitle = {Historia Mathematica},
  year = {1987},
  pages = {38--53},
  author = {Fraser, Craig G.},
}
\end{filecontents}
\addbibresource{bibwithshort.bib}


\begin{document}

\textcite{fraser_joseph_1987} mentions that in \textcite[vol. VII, p. …]{lagrange_uvres_1867}…

  %% Shorthands
  \printbiblist{shorthand}

  %% Bibliography
  \defbibcheck{noshorthand}{%
     \iffieldundef{shorthand}{}{\skipentry}%
  }
  \printbibliography[check=noshorthand]

\end{document}

答案1

此解决方案与格式挂钩shorthandwidth,以创建指向速记列表中条目的链接。然后,bibhyperref用于将引文链接到参考书目的格式会略作修改,以链接到速记目标(如果速记字段可用)。

如果您决定从参考书目中排除已在简写列表中列出的条目,这也有效。

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,style=authoryear,autolang=other]{biblatex}

\usepackage[colorlinks=true,linkcolor=blue,citecolor=red,urlcolor=magenta]{hyperref} 

\DeclareFieldFormat{shorthandwidth}{%
  \bibhypertarget{shorthand:\thefield{entrykey}}
    {#1}}

\DeclareFieldFormat{bibhyperref}{%
  \iffieldundef{shorthand}
    {\bibhyperref{#1}}
    {\bibhyperlink{shorthand:\thefield{entrykey}}{#1}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{lagrange_uvres_1867,
  author    = {Lagrange, Joseph-Louis},
  editor    = {Serret, Joseph-Alfred},
  title     = {Œuvres},
  publisher = {Gauthier-Villars},
  location  = {Paris},
  date      = {1867/1892},
  volumes   = {14},
  shorthand = {OL}
}
@article{fraser_joseph_1987,
  title        = {Joseph Louis Lagrange's Algebraic Vision of the Calculus},
  volume       = {14},
  journaltitle = {Historia Mathematica},
  year         = {1987},
  pages        = {38--53},
  author       = {Fraser, Craig G.},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\textcite{fraser_joseph_1987} mentions that in \textcite[vol. VII, p. …]{lagrange_uvres_1867}…

  \printbiblist{shorthand}
  \printbibliography
\end{document}

相关内容