21

The answer to this is most likely no. But if someone with deep LaTeX or pdf-viewer knowledge know the answer to be a yes, then please do tell!

Imagine the following situation: a person is reading a thesis on a computer screen. The user clicks on an in-text citation (e.g. [52] ) and jumps to the references page.

It states: [52] M. K. Stenzler and R. R. Eckert. Interactive video. ACM SIGCHI Bulletin, 28(2):76–81, 1996.

This is amazing. There was no scrolling needed, and it would've been a while since this in-text citation was even in the preface! But how does the user go back? The user could scroll or have some menu in which the preface is clickable. But it would be more convenient if the user could go back to where she came from.

My question: is there a way for a user to jump back to where she came from?

One solution would be to generate a "jump back to" line in the reference list when the person is reading the electronic PDF version, but that is non-academic and a bit tedious to read (though an interesting question by itself!).

So I wonder: is it possible for the PDF to somehow remember where the user came from and give a link to jump back?

In our imagined scenario this would happen: the person sees a "jump back" text in the top right corner, clicks on it and jumped back to where she saw her in-text citation.

While that is my question, if there are other clever solutions I will upvote those answers as well, since my goal is to allow the user to go back where he or she came from.

Edit (why this is a non-duplicate): It is pointed out that this question is a lot like: Going "back" when using hyperref which is true. It is a lot like that, but I couldn't find it after searching on Google for quite a bit. So there needs to be more general keywords for Google and other search engines to pick it up. Furthermore this question is more broad. This is because I asked three questions: (1) is there a go back button? Or could it be generated? (2) how do you generate go back pages? And (3) are there other clever solutions to solve this problem? It is in essence a usability issue that we're trying to solve in a PDF/LaTeX context, which is for the user to go back easily, the design approach of a solution could be completely different than my first 2 leading questions.

For me personally, the answer is that I will include a pagebackref so that people on paper also are able to go back. And another is to explain in the preface that most PDF readers have a "go back" feature. In the discussion surrounding the answer, I realized using an explicit "go back" link is not needed.

  • 2
    Hope you are expecting two way links, if yes, please look into the hyperref package.... – MadyYuvi Apr 04 '18 at 11:13
  • Yes I do expect two way links. – Melvin Roest Apr 04 '18 at 11:17
  • Kind of frequently asked question, e. g. https://tex.stackexchange.com/q/51320 , https://tex.stackexchange.com/a/237512 , https://tex.stackexchange.com/q/336993 – AlexG Apr 06 '18 at 13:02
  • This question is more broad since no other answer has comments like "I wish I'd known about backref before I built a small version for myself. Oh well the exercise was fun." Furthermore, the new discussion on the similar parts of this question people to understand that Evince sometimes does have a back button. All the other questions, including my for a large extent suffer from the x-y problem ( https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem ) since this is a usability question and a LaTeX question. – Melvin Roest Apr 06 '18 at 13:32

1 Answers1

29

GoBack

Nearly all PDF viewers have a "go back" feature. Thus, there is no need for explicit "go back" links. There is an unofficial named action GoBack (not part of the PDF standard) that most PDF viewers understand, for example:

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\section{Hello World}
\label{sec:hello}
\Acrobatmenu{GoBack}{Go back}
\newpage
\autoref{sec:hello}
\end{document}

Evince in version 2.32 or 3.26 does not support the named action "GoBack" ☹. The newer version has even lost the "go back" feature. The old version does not have menu entries for going back, a button must be added to the toolbar instead.

Back references

The backref package adds back references to citations. It is supported by hyperref, see the backref or pagebackref options.

Heiko Oberdiek
  • 271,626
  • 1
    Does evince support GoToE (goto embedded file: the refs could be in an embedded file perhaps) or SetOCGState? My idea with the latter would be to make the \ref have a NextAction of SetOCGState that would make a back-link visible on the reference page. – Bruno Le Floch Apr 04 '18 at 11:17
  • Wow! I did not know this. Thanks! So I suppose I would need to write about this feature and which popular PDF readers support it in the preface or something similar. The \usepackage[pagebackref]{hyperref} option is exactly what I need. – Melvin Roest Apr 04 '18 at 11:27
  • @BrunoLeFloch I doubt it. But you can try, for example, see packages hypgotoe and embedfile. – Heiko Oberdiek Apr 04 '18 at 11:48
  • I wish I'd known about backref before I built a small version for myself. Oh well the exercise was fun. – Ethan Bolker Apr 04 '18 at 13:13
  • 1
    Evince 2.32.0.145 does have a Back functionality, indeed acting more as a sort of a history of visited pages. However, the Alt + Left shortcut for Back that works in some other pdf readers does not work in evince. – Fato39 Apr 04 '18 at 15:21
  • @Fato39 My port of evince has only "previous page", "next page", "first page", and "last page". The only "history" feature I could detect is the five last recently opened files, but that's not the "go back" feature. – Heiko Oberdiek Apr 04 '18 at 15:30
  • This is one of the reasons I switched to okular for my pdf viewer. (Also, integrates well with vimtex). – Rmano Apr 05 '18 at 07:36
  • @HeikoOberdiek I am using Evince for Windows. It has a Back button that can be dragged into the toolbar. Anyway, it might be a quirk of the Windows (old) version? – Fato39 Apr 06 '18 at 12:30