Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a rather large notebook, which contains a lot of hyperlinks to different parts of the notebook.

Is it possible to make a back button (maybe as a docked cell button?) so that when a reader clicks a link and is moved up or down in the document, then he can click the button and then return to the location of the link?

share|improve this question
This sounds possible, but you'll get faster and better responses it you "seed" the discussion with some examples you've tried. – Jagra Aug 15 '13 at 16:15
The Mac version of Mathematica has a back button in the toolbar. – Mike Honeychurch Aug 15 '13 at 22:20
The Help notebook toolbar also has back (and forward) buttons. You can see the code for this toolbar by executing FrontEndResource["FEExpressions", "HelpViewerToolbar"] and the ButtonFunction for the back button is FrontEndToken[FrontEnd`ButtonNotebook[], "HyperlinkGoBack"]. – MikeLimaOscar Aug 20 '13 at 8:22
@Mike Why don't you post an answer? – Mr.Wizard Feb 2 '15 at 1:19

A simple back button can be implemented using

Button["Back", FrontEndToken[FrontEnd`ButtonNotebook[],
 "HyperlinkGoBack"], Evaluator -> None]

The Evaluator -> None option ensures that this is processed by the Front End.

I'll leave it to the OP to work out how to turn this into a docked cell (if they haven't already done so some time ago!).

For a more sophisticated button, this is a modification of the help toolbar code I mentioned in my comment to the OP:

Tooltip[DynamicModule[{$CellContext`destination$$ = 0}, 
      Dynamic[If[FEPrivate`HistoryList["Back"] === {}, 
          FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
             "SystemResources", "Bitmaps", "Toolbars", "DocCenter", 
            "DisabledBackIcon.png"}]], Enabled -> False, 
         Appearance -> None, FrameMargins -> 0], 
        Button[PaneSelector[{True -> 
            Import[FileNameJoin[{$InstallationDirectory, "SystemFiles", 
               "FrontEnd", "SystemResources", "Bitmaps", "Toolbars", 
               "DocCenter", "BackIconHot.png"}]], 
           False -> 
            Import[FileNameJoin[{$InstallationDirectory, "SystemFiles", 
           "FrontEnd", "SystemResources", "Bitmaps", "Toolbars", 
           "DocCenter", "BackIcon.png"}]]}, 
     FrontEndToken[FrontEnd`ButtonNotebook[], "HyperlinkGoBack"], 
     Evaluator -> None, Appearance -> None, FrameMargins -> 0]]], 
  DynamicModuleValues :> {}], "Go back"]
share|improve this answer
@Mr.Wizard Was your prompt part of a general purge of unanswered questions? – MikeLimaOscar Feb 2 '15 at 13:27
It's me who is doing the slaughter. Relaxing thing when I'm bored :p – Kuba Feb 2 '15 at 13:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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