Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.2K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problems with 'Hyperlink["label",("notebook.nb"',"celltag"}]

Posted 11 years ago

Hi,

I am facing the following problem

(* The following sometimes works but sometimes does not *)

(* The issue has been tested in many occasions and situations *)

(* The format does not even launch the linked notebook *)

Hyperlink["label", {"notebook.nb", "celltag"}]

(* However the following always work *)

Hyperlink["label", "notebook.nb"]

(* Both formats have been tested many times in the same situations and conditions *)

Any help will be wellcome.

Martin.

POSTED BY: E Martin
4 Replies
Posted 10 years ago
Attachments:
POSTED BY: E Martin
Posted 10 years ago
POSTED BY: E Martin
Posted 10 years ago

Hi Martin,

Hyperlink[<...>]; does not produce a hyperlink simply because you have suppressed the output from this piece of code by adding the ";" at the end. Please read the Documentation for CompoundExpression (;) and try the following:

Module[{hyperlink1, hyperlink2},
 (* some executable code *)
 (* first hyperlink *)
 hyperlink1 = Hyperlink["GraphicsObjectLabel", {"notebook.nb", "celltag"}];
 (* some executable code *)
 (* second hyperlink *)
 hyperlink2 = Hyperlink["GraphicsObjectLabel", "notebook.nb"];
 (* the output *)
 Column[{hyperlink1, hyperlink2}]
 ]
POSTED BY: Alexey Popkov
Posted 11 years ago

I will be a bit more specific`

(* Both formats set in individual or separated cells wok *)

Hyperlink["GraphicsObjectLabel", {"notebook.nb", "celltag"}]

Hyperlink["GraphicsObjectLabel", "notebook.nb"]

(* But if set inside a compund construct as in a module *)

Module[{},
 (* some executable code *)
 (* this does not work *)
 Hyperlink["GraphicsObjectLabel", {"notebook.nb", "celltag"}];
 (* some executable code *)
 (* this does work *)
 Hyperlink["GraphicsObjectLabel", "notebook.nb"]
 ]

Martin

POSTED BY: E Martin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard