Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

hyperlink to pdf files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45552] hyperlink to pdf files
  • From: Christopher Purcell <chris.purcell at drdc-rddc.gc.ca>
  • Date: Tue, 13 Jan 2004 04:04:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I would like to insert hyperlinks to pdf files in notebooks in a  
platform independent way.

I can create a cell that looks like this:

Cell[TextData[ButtonBox["Examples Manual",
   ButtonData:>{
     URL[  
"file:///Library/Mathematica/Applications/MyPackage/Documentation/ 
English/References/examples.pdf"], None},
   ButtonStyle->"Hyperlink"]], "Input"]

that works great on MacOSX to hyperlink to the file examples.pdf.  I am  
sure I can do something similar on Windows, provided I use Windows  
style paths.

But to have this work in a platform-independent way,
I would like to make the argument of URL[ ]  to be something like:

"file:/ 
/"<>ToFileName[{$AddOnsDirectory,"MyPackage","Documentation","English"," 
References"},"examples.pdf"]

But this doesn't work. Putting Evaluate around it does not help. URL or  
ButtonData reject everything except the explicit text string. Any other  
ideas?




Christopher Purcell
Sensors & Actuators Group
DRDC-Atlantic, 9 Grove St., PO Box 1012,
Dartmouth NS B2Y 3Z7 Canada
Tel 902-426-3100 x389
Fax 902-426-9654


  • Prev by Date: Re: How to substitute?
  • Next by Date: FW: Re: Wishart Distribution
  • Previous by thread: Timing[] returned { Null Second, {}} ?!?
  • Next by thread: Re: hyperlink to pdf files