7

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}
  • 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 8 '15 at 11:56
  • 6
    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 8 '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 8 '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 8 '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 8 '15 at 13:08
7

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

  • This works very well with Adobe Reader and SumatraPDF, but failed with TeXworks' built-in reader. – moewe Apr 8 '15 at 13:48
  • While we are at it, do you think an answer employing much the same method would benefit Going “back” when using hyperref? It is one of the first questions that comes up when searching for going back from links. – moewe Apr 8 '15 at 15:20
  • @moewe Yes, hood idea. I have now provided an answer there. – Heiko Oberdiek Apr 14 '15 at 7:45
  • Is it possible to achieve the same thing with bibtex ? – Gabriel Romon Sep 18 '18 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.