MathGroup Archive 2004

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

Search the Archive

Relative hyperlink

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51481] Relative hyperlink
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Tue, 19 Oct 2004 02:56:00 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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?

Steve Luttrell 



  • Prev by Date: Re: Simple question sabout setting directory
  • Next by Date: Plotting two differently scaled graphs together
  • Previous by thread: Why Not[] is not Listable by default ?
  • Next by thread: Re: Relative hyperlink