0
$\begingroup$

I am writing a demonstration notebook and am unable to create a hyperlink to a proof I'm using in the Detail section of the demonstration when I attempt to use Insert/Hyperlink. So in the Detail section I write:

The following proof is from

then at the end of the line, I select Insert/Hyperlink from the menu items and it brings up a pop up window and I select "Other notebook or URL" button and enter the hyperlink:

https://artofproblemsolving.com/community/c3t48f3h1903996_geometry

but when I press Ok nothing happens. The cell type is "Text" so maybe that's the problem. Is there no way I can enter a hyper link within the sentence of the text cell and the instructions do not allow changing or adding an input cell where I could use the Hyperlink command or no? Would just be more clean-looking to enter it within the same sentence. Can this be done?

$\endgroup$

1 Answer 1

3
$\begingroup$

There are several ways.

  1. One can place a hyperlink into any line of a text within a text cell. You just select a word (or several of them) in the text cell, go to Menu/Insert/Hyperlink/OtherNotebookOr URL enter the link into the text field and press OK. The selected words will become light-blue and transform to the hyperlink.

  2. One can place a command into an input cell and evaluate this cell in a usual way. The code should be as follows: SystemOpen["internet_link_in_quotes"]. For example, SystemOpen["http://www.youtube.com/watch?v=meNEUTn9Atg"]. Evaluate this cell. It will bring up the browser where a movie will start automatically.

  3. Instead of this I usually place into the input cell a code like the following:

    `Button["Show the protein folding MD simulation 2", 
     SystemOpen["http://www.youtube.com/watch?v=meNEUTn9Atg"]]`
    

After evaluation of this cell an output cell with the button entitled "Show the protein folding MD simulation 2" appears. Now I collapse the input/output cell group around the output cell. Like this only the button is visible in the notebook. If you now save this notebook, the button persists also after the notebook will be closed and, further, reopened.

Alternatively you may evaluate this code elsewhere, then copy the button only and paste it into a desired place of your notebook, including a text line. Save the notebook. Done.

Pressing this button opens the browser (and, eventually, launches the movie, provided this is the link to the movie, as it is in the case of my example). I used this method also for notebooks that I distributed among my students. It enabled them to easily launch educative movies at home.

Have fun!

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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