Option to include author as part of hyperlink with authoryear style
Based on the following TeX.SE post: https://tex.stackexchange.com/a/27107
Basically, in addition to the date I'd like for the author to be part of the hyperref that links to the bibliography. Additional (or all) citation parts and styles could also be considered.
There aren't comments or answers mentioning a native solution, so I'm assuming nothing's been implemented. PLK left a comment 4 years ago, so I'm curious as to why this hasn't been implemented. They mentioned the desire to make it default behavior, but if that's too much to ask, I'd settle for an option to set somewhere.
See also https://github.com/plk/biblatex/issues/428.
The thing is that if you want to pull off a large continuous link target with a consistent output across styles and citation commands, things are going to be difficult. If you look at the answer https://tex.stackexchange.com/a/27107/35864 you linked, you'll see that the link target in \textcite differs depending on whether or not a postnote is present. That was not arbitrary or a simple oversight: It's just extremely tricky to get a large link target if postnotes are involved and you want to stick with the current implementation of citation commands. I don't want to have to change the implementation of the citation commands in a way that would be required to make consistently larger link targets possible (and I haven't checked whether it would be possible/viable to do that in the first place, I only have a rough idea of what would definitely be required). But then I also don't think it is a great look to apply link targets inconsistently.
It is more realistic to produce several small link targets. But then I feel the only reasonable course of action is to only link the author and the year (separately, mind you). That's what I've shown in https://tex.stackexchange.com/q/537426/35864.
As always we have to consider the impact of such a change. Any change to often used and modified bibmacros (like the ones that would be involved here) has the potential to break people's preambles or styles. Plus everything that modifies the actual output would be problematic from a backwards compatibility point of view (changing link targets is probably not a big issue, but it should still be mentioned).
Where you are using the word target, I assume you actually mean anchor; which is the region that is active for clicking the hyperlink. There is another problem with having a single long anchor, when it is needed to break across 2 (or more) lines, or even across 2 pages. It is far better to have multiple smaller anchors that you can be confident each will be on a single line.
Although pdfTeX can break a hyperlink, it does so by internally creating 2 hyperlink anchors for the same target destination. This is fine, until you come to attempting valid tagged PDF, as will ultimately be needed with accessible formats. As this breaking action is taken at page shipout time, there is no way of knowing the object number of that 2nd anchor while processing LaTeX macros alone. The result is a Link object that is not included within the PDF's structure tree; hence validation will fail for modern accessible PDF/UA formats.
The only way, so far, to deal with this is to manually recognise the places where this occurs, and do one of 2 things:
- adjust the wording within the paragraph, to keep the complete anchor on a single line;
- break the anchor text into 2 pieces, each on a single line. This 2nd option is extremely difficult with anchor-text that must to be automatically generated from other source: citations, cross-references, glossary items, etc. as is wanted here.