Hyperlinks and Internal Links
Introduction
https://orgmode.org/manual/Link-Format.html#FOOT23
Org recognizes URIs (Uniform Resource Identifiers)—a string of characters used to identify a name or a resource on the Internet.
These can (optionally) be wrapped in .
Examples include:
http://www.example.com ftp://ftp.example.com mailto:user@rashi.com file:///C:/Users/Name/Documents/file.txt tel:+1234567890
The general link format looks like this:
[[LINK][DESCRIPTION] [[..][..]] One can exclude the description as in: [[LINK]] http://www.example.com [[http://www.example.com]] [[http://www.example.com][Example Link]]
Brackets disappear once all are present.
If you run C-c C-l
while cursor is on a link you can edit the invisible LINK part
An important command is:
<<toggle>>
org-toggle-link-display
This is available through the Menu: Org/Hyperlinks/Literal Links
Backspace and Del serve to delete a hidden opening or closing bracket
[[https://edition.cnn.com/][cnn]]
C-c C-o
will open/trigger the URI
* Internal Links :PROPERTIES: :CUSTOM_ID: 136 :END:
[[#136]]
Are links that operate within the current document.
One can create a CUSTOM ID in a properties drawer C-u org-insert-drawer
[[#custom_id]]
One can create a direct link to another header as in
[[*Header 1]])
Create dedicated targets with this format:
<<My Target>>
and then go to the kink with
[[My Target]].
One can create named keywords, e.g.
#+NAME: My Target
and then
[[My Target]]
[[*Introduction]] [[toggle]] [[angle brackets]]
#+NAME: My Target | a | table | |----+------------| | of | four cells |
You can follow them by invoking C-c C-o
and go back with C-c &
When to use what?
- Custom ID links are ideal for linking to sections frequently referenced within the document. They offer great precision in finding exactly the section you need.
- Headline links are useful for quickly creating links to specific headings within a document. (But not as accurate as above if more than one headline has the same term)
- Dedicated target links are used for finding specific (non-heading) locations in the text
- Named links are great for linking to tables, figures, charts, or code blocks.
Radio Targets: Useful for definitions mainly
I.e. glossaries, technical terms etc.
How to create?
<<<Machine Learning>>>
This section provides a detailed discussion about the fundamentals of Machine Learning.
Then simply retyping the exact phase:
[Machine Learning]
Machine Learning is good
[[#136]] [[* Internal Links]] [[My Target]]