Biblatex : have hyperref links point to the shorthand list

I have an authoryear-style bibliography, but use shorthands for some commonly cited works (via shorthand bibliography fields). So in my documents (see MWE below), references look like Fraser (1987) (normal ref) or like OL (shorthand). Accordingly, I have a list of shorthands before my bibliography. This is all fairly usual in my field.

Now, my problem is that the hyperlinks of the shorthand references do not point to the shorthand list, but

• either point to the full bibliography, if I keep the defaults and include the works with shorthands both in the shorthand list and in the bibliography (MWE 1). This doesn't make sense: in a default authoryear style, the shorthand for a reference does not even appear in the entry for that reference, so a reader clicking on OL will land on a long bibliography page and will have to guess which reference is intended;
• or are just broken if I suppress the works with shorthands from the full bibliography to keep them only in the shorthand list (MWE 2).

Is there a way to get the hyperlinks of the shorthands to point to the shorthand list (which btw would probably be a sane default)?

MWE1

\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}


MWE2

\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 Answer

This solution hooks into the shorthandwidth format to create a link to entries in the list of shorthands. Then the format bibhyperref which is used to link citations to the bibliography is slightly altered to link to the shorthand target if the shorthand field is available.

This also works if you decide to exclude entries already listed in the list of shorthands from the bibliography.

\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}