2

I'm new here, so I don't know whether I should be creating a new question for this, since this is a follow-up to this question.

I'm trying to get both the name and the year in biblatex's citations to work as hyperlinks. The answer given by Audrey in the original post seems to work great, except for one thing: If multiple entry keys are used within a single \cite command, the delimiter between citations does not show up.

I tried adding a \multicitedelim after the year label, and it works, except that I end up with a semicolon after the final citation too. Thoughts?

apc
  • 848
  • 7
  • 15
  • +1 Thanks for catching this. There is indeed a problem with \textcite{key1,key2} - I forgot to reset a parenthesis flag. I'll update my original answer instead of providing a new one for now. I can't produce any problems with the remaining citation commands. If the fix doesn't solve your problem, could you provide some further details? Some code and biblatex version would be great. – Audrey Sep 04 '11 at 06:14
  • Awesome. Thanks. I will give it a try and get back to you if it doesn't work. – apc Sep 05 '11 at 17:58
  • It works as advertised. Thanks! I am assuming that redefining \parencite along the lines of your definition of \textcite should work as well. – apc Sep 05 '11 at 18:06
  • Actually, I don't know how to do that. But by simply adding the definitions of \parencite from authoryear.cbx it now works for \parencite too. – apc Sep 05 '11 at 18:24
  • Have a look at the sample document. The code redefines a macro used by all citation commands (under the authoryear style) except \textcite. So it should affect the output of \parencite without direct edits to this command. To take this post off the unanswered list, I can provide an answer with details on the bug fix. But feel free to request another feature. Maybe the inclusion of postnote in hyperlinks generated by \textcite? – Audrey Sep 05 '11 at 19:06
  • I see. I don't know why it wasn't working before? One more question (and I'll stop, I promise!): any way of making it work with authoryear-comp? I tried modifying the definition of \cite in authoryear-comp.cbx along the lines of what you did, but I get an error message: Latex Error: ./biblatex.tex:96 Argument of \@secondoftwo has an extra }. Runaway argument? Here's the code: http://snipt.org/xnrp – apc Sep 05 '11 at 19:14
  • Hard to say why it wasn't working - sometimes deleting auxiliary files and compiling from scratch helps. But you shouldn't have to redefine \parencite to get it to work. The code as-is cannot be extended to compact variants of authoryear. Recurrent names and years in labels are subject to truncation. For example Doe (1990a); Doe (1990b) becomes Doe (1990a,b). The two hyperlinks are tied to 1990a and b. I'm pretty sure it is possible to work out a solution that hyperlinks a "maximal" portion of the label. To get this problem some more attention, feel free to edit your question. – Audrey Sep 05 '11 at 19:34
  • That's very helpful. I'll create a new question, to see if anyone else knows what to do with authoryear-comp. This question has been more than adequately answered. – apc Sep 05 '11 at 22:02

1 Answers1

3

(Just repeating my comment in an answer to take this question off the unanswered list.)

The question uncovers a bug. For the parenthesis printed in the hyperlink, I didn't reset a flag biblatex uses to track parentheses. In particular

\bibcloseparen

needs to followed up with

\global\boolfalse{cbx:parens}

I've edited the answer to incorporate this fix.

Audrey
  • 28,881