In my bibliography style, I have added a trigger to change the biblatex bibliography back reference mechanism to refer to the paragraph numbers in the margins ("runners") instead of pages.


\therunner is added to a paragraph by using the macro from the jurabook class

  \fi% do NOT delete the percentage sign
    {}% nix

Since the runner mechanism is the only feature from the jurabook class I needed, I have copied that macro into my preamble rather than using the entire class.

If I now set the biblatex option runner to true, thus switching bbx:runner to true, the back reference numbers shown in the bibliography show the paragraph numbers shown in the document margins rather than the page numbers for each cited entry.

However, if I click the number, the link takes me to the page corresponding to the number rather than the paragraph corresponding to the number. This means that I have an entry that is cited in paragraph number 10 on page 6, the number shown in the bibliography will be 10. Clicking that number, however, takes me to page number 10.

Does anyone know how I need to adjust the back referencing mechanism to make the paragraph the hyperref target of the numbers shown in the biblatex bibliography?

  • This is not the best place for asking this, but I see from your other questions that you are writing a BibLaTeX style for legal citations. Would it be possible to discuss this topic with you, privately perhaps? I have the same problem (in French, though) and would be very interested in knowing how you are dealing with it. — Sorry I can't help with your question, I have no knowledge of hyperref.
    – ienissei
    Jan 28, 2012 at 19:38
  • 1
    Maybe it is possible and simpler to use \hyperlink and \hypertarget directly? I have used this combo in a similar situation - questions in the running text, and answers at the chapter end pointing to each other. Jan 29, 2012 at 18:56
  • @MichaelPalmer My thesis currently contains around 600 cases cited, and since many are cited multiple times, probably over a 1000 case citations. Furthermore, my ambition is to have a feature complete legal citation style at some point. Shouldn't I be able to somehow set a \hypertarget each time \blx@addbackref@i is called and then patch the back reference mechanism in biblatex to refer to this target? My problem basically is that I don't know how biblatex sets the link? Does it use \hyperlink? How does it determine the argument for it? I understand the biblatex.sty code too little.
    – jjbornheim
    Jan 29, 2012 at 22:18
  • @jjbornheim It does use \hyperlink, and probably prefixes the argument with page.. The link is set by the pageref bibmacro in standard styles. You can see this by taking a look at standard.bbx. The pageref bibmacro is defined in biblatex.def.
    – Audrey
    Jan 31, 2012 at 14:45
  • Thanks @Audrey. Here is what I learned so far. The pageref macro prints the pageref link. The hyperlinking is done by the list formatting for this list. If the pageref list contains more than one item, \DeclareListFormat{pageref} calls, amongst others, three macros: pageref:init, pageref:comp and pageref:dump. If the pageref list contains exactly one item, it is printed by \hyperlink{page.#1}{#1} (provided hyperrefs are used). So in the easiest example (only one back reference), I would need to modify \hyperlink{page.#1}{#1} to refer to the therunner rather than thepage.
    – jjbornheim
    Jan 31, 2012 at 15:48

2 Answers 2


A whole lot goes on under the hood to collect and set the list of page numbers in back references. One easy way out of your problem is to make the page hyperlinks set by the pageref bibliography macro point to runners via \hypertarget.

The document below illustrates this approach. I've closely followed the code you provided, but you might prefer other ways to set paragraph numbers. \hypertarget links to the baseline of its second argument, which is too low for runners. I've adapted the solution in this post to raise the link.



     backrefpage = {siehe Rn\adddot},
     backrefpages = {siehe Rn\adddot}}}










\rn{Filler} text \parencite{ctan,markey}. \lipsum[1] \vfill
\rn{Filler} text \parencite{companion}. See \rnref{run}. \lipsum[2]
\rn{Filler} text \parencite{companion,markey}. \lipsum[3]
\rn[run]{Filler} text \parencite{companion,markey}. \lipsum[4]

Here's the bibliography from the resulting document.

enter image description here

Commenting out \toggletrue{bbx:runner} back-references page numbers.

enter image description here

  • Thanks a lot Audrey. I didn't notice I was logged out, so it took me a while to see your response. Your code does exactly what I want.
    – jjbornheim
    Feb 22, 2012 at 11:45

I wanted to add a small detail to Audrey's solution. It bugged me that after I implemented the code, I would get warnings from hyperref like

destination with the same identifier (name{page.19}) has been already used

I figured they were due to the fact that a destination by the same name is already set by the page numbering mechanism. So I changed




and added another \iftoggle{bbx:runner} test to change every instance of \hyperlink{page. to \hyperlink{runner. in the pageref format, pageref:comp and pageref:dump bibliography macros defined in biblatex.def. These edits can easily be made using egreg's extension of etoolbox patch commands.


  \expandafter#1\csname abx@macro@\detokenize{#2}\endcsname}

  \expandafter#1\csname abx@lfd@*@\detokenize{#2}\endcsname}


  • +1 In \rn, \backreftarget is issued only when bbx:runner is true. So you can just replace page with runner in the original definition. Those bibliography macro edits might be less of a pain using \xpatchbibmacro from egreg's xpatch package.
    – Audrey
    Feb 22, 2012 at 16:35
  • D'oh @Audrey, thanks for pointing that out. I modified my answer accordingly to make the definition of '\backreftarget` independent of bbx:runner's value. Also thanks for suggesting \xpatchbibmacro. I might do that later to make the code more elegant, but as it stands, it does what needs to be done. I simply patched the macros using find and replace in my text editor.
    – jjbornheim
    Feb 22, 2012 at 18:36
  • I added patches for the pageref format and related bibliography macros. Hope you don't mind. Please feel free to edit or omit the new content as you see fit.
    – Audrey
    Jun 11, 2012 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .