MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Relative hyperlink


> How does one create (in a Mathematica notebook) a hyperlink to an
> arbitrary
> file (i.e. not to another
> Mathematica notebook) without having to give the full path to the file?
> For
> instance, I can successfully open a
> file using a link like the one in the following type of text cell, where
> "C:\......\file.html" is the full path
> of the file (fill in the dots to make the full path), and the file type
> can
> be anything I could normally open on
> my computer:
> 
> Cell[TextData[ButtonBox["link", ButtonData:>{ URL[ "C:\......\file.html"],
> None}, ButtonStyle->"Hyperlink"]],
> "Text"]
> 
> However, I would like to be able to specify the file path relative to the
> notebook's location, because this
> would allow me to move the whole directory tree around (to a different
> disk,
> say) without breaking the links.
> How can this be done?

Hyperlinks are available from Input->Create hyperlink, and you need to check
"Other notebook or URL", then browse for the file.

Displaying the cell's contents (Ctrl-Shift-E) allows you to edit all the
hard paths to relative ones.

Perhaps there should be another button in the dialog box to create a
relative link?

Regards,

Dave.


  • Prev by Date: Re: Plotting two differently scaled graphs together
  • Next by Date: Re: can't MATHEMATICA simplify simple expressions?
  • Previous by thread: Relative hyperlink
  • Next by thread: Plotting two differently scaled graphs together