Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In org-mode, how to export internal links?

Tags:

emacs

org-mode

In org-mode, I have a document that contains internal links, i.e. there are links in this format...

For more info, see [[*First%20heading][First heading]]

...that link to section headings:

* First heading

These links do not appear in my exported files, either in HTML or tex/PDF. Is there an org-mode setting that controls this?

like image 200
incandescentman Avatar asked Sep 18 '25 03:09

incandescentman


1 Answers

While it would be great to export header-links, (and it seems to have worked in versions prior 8.0), as a workaround you can do as the manual recommends and use either dedicated targets, as in

- one item
- <<target>>another item
Here we refer to item [[target]].

or the CUSTOM_ID-property, as in

* Section One
:PROPERTIES:
:CUSTOM_ID: sec:one
:END:

* Section Two
You can reference Section One with [[#sec:one]] but NOT
[[#sec:one][Section One]], i.e., the link without description
will get you the actual section number (1).

(second example from How can I reference a section by number in org-mode export?).

Seems like using * link_name is a fallback solution:

If none of the above succeeds, Org will search for a headline that is exactly the link text but may also include a TODO keyword and tags.

like image 53
serv-inc Avatar answered Sep 21 '25 20:09

serv-inc