10

I am a big fan of hyperref. It allows (among other things) to go quickly to the bibliography (at the end of a document) by clicking to the name of the author in the body of the text. So, I have plenty of links which look like that:

enter image description here

If I click on 2000, I could see what book is actually cited (in the bibliography). I do this a lot but I am always facing a issue for continuing reading. Indeed, I have to find the exact page where the citation was by hand...

I'm wondering if there is a way to add a link (anchor) inside the bibliography in order to send back to the text body.

Of course, the main (and huge) problem is to know where you were when you clicked on the citation and where to see you back. I cannot think a way to achieve this but I'm asking this question to collect idea on this subject.

MWE:

\begin{filecontents}{biblio.bib}
@Book{author00:_title,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}
\end{filecontents}

\documentclass[12pt,twoside,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\usepackage[autostyle=true]{csquotes}
\usepackage[style=authoryear-comp,
     hyperref,]{biblatex}
\addbibresource{biblio}
\usepackage[colorlinks]{hyperref}

\begin{document}

\cite{author00:_title}

\printbibliography
\end{document}
lockstep
  • 250,273
ppr
  • 8,994
  • 1
    I don't know whether this could be implemented using LaTeX. However, some pdf viewers (such as Adobe Reader or Foxit Reader) feature a keyboard shortcut for that purpose (Alt+Left Arrow in the above cases). – Fato39 Apr 08 '15 at 11:56
  • 7
    There is no way to have a universal "go back" link, I don't think (I'd have thought there might be some JavaScript hack specific to AdobeReader, but couldn't find anything more). But you can have back-references in the bibliography that link back to where the items in the bibliography were cited. Just add the option backref to biblatex at loading time. – moewe Apr 08 '15 at 11:57
  • 5
    It doesn't make sense to implement this in LaTeX: A destination can have more then one source. Use the means of your pdf viewer to go back as you would do it in a brower. – Ulrike Fischer Apr 08 '15 at 12:08
  • Ulrike Fischer has a point there, if I remember correctly from my HTML days (they were quite some time ago), there is no HTML way to have such a back button: It could be implemented via JavaScript or PHP, but not HTML-native. So this feature does not seem to something that is available in markup languages that are normally agnostic with respect to how someone got to a specific part of the output. – moewe Apr 08 '15 at 12:20
  • I use features of the PDF viewers (Preview View and Next View in Foxit Reader; Preview view and Next view in Adobe Reader). Several times, I tried and used the authorindex tool to enhance my document. This tool adds a list of pages, where a specific reference is cited in the document, at the very end of a bibliography item. Still, if you want to use it and a reference is cited multiply times, you shall have a general idea which page you were reading before clicking a hyperlink. – Malipivo Apr 08 '15 at 13:08
  • @UlrikeFischer I know a destination can have more than one source. This is "the main (and huge) problem" I mentioned. – ppr Apr 08 '15 at 15:00
  • @moewe Sorry for \usebibresource I was using \bibliography and change that, making a mistake, before posting to avoid annoying remarks about obsoleteness. But I'm sure you know also that you could have corrected my mistake instead of just pointing it... :-) – ppr Apr 08 '15 at 15:04
  • It certainly wasn't a big deal. Normally I avoid changing people's code, because I can never be sure about the intentions behind posting that exact code and in a way I think it often constitutes "changing the message of the post". In this case, though where it was quite obvious that this had nothing to do with the issue, it wouldn't have done any harm, I admit. – moewe Apr 08 '15 at 15:21
  • Talking about specific PDF readers, in Zathura the "back" feature is Ctrl-O (same as Vim). – PlasmaBinturong Jun 30 '20 at 17:38

1 Answers1

11

Each not too bad PDF viewer should have a "back" feature for jumping to the previous location. Thus there is no need to have such a go back link.

Nevertheless there are some options:

backref

Package biblatex provides a backref feature, which prints a list of pages, where the bibliography entry is cited. Of course the user would have to remember the page.

GoBack menu option

The PDF format knows named link actions like PrevPage, NextPage, First, and Last. AR and some PDF viewers also know additional named actions like GoBack. Package hyperref provides \Acrobatmenu to specify such links.

Example, which replaces the list of back references in biblatex by such a generic GoBack link:

\begin{filecontents}{biblio.bib}
@Book{author00:_title,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}
\end{filecontents}

\documentclass[12pt,twoside,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,french]{babel}
\usepackage[autostyle=true]{csquotes}
\usepackage[style=authoryear-comp,
     hyperref]{biblatex}
\addbibresource{biblio.bib}
\usepackage[colorlinks]{hyperref}

\renewbibmacro*{pageref}{%
  \printtext[parens]{%
    \Acrobatmenu{GoBack}{Go back}%
  }%
}

\begin{document}

\cite{author00:_title}

\newpage

\printbibliography

\end{document}

Result bibliography

ppr
  • 8,994
Heiko Oberdiek
  • 271,626