From: Vladimir Alexiev <vladimir@sirma.bg>
To: emacs-orgmode@gnu.org
Subject: [BUG] org-html.el: internal links don't work unless CUSTOM_ID is used
Date: Sun, 30 Jan 2011 14:48:00 +0000 (UTC) [thread overview]
Message-ID: <loom.20110130T145949-271@post.gmane.org> (raw)
Internal links do not work in HTML export unless CUSTOM_ID is used.
I have tried with [[id:]] and [[*Heading]] links.
It makes the link like this:
<a href="#sec-49">
It makes the anchor like this:
<h2 id="sec-49">...</h2>
and if the entry has ID (id: link is used) then also
<a name="ID-80ea259f-73f0-4456-b2f5-3343d44e6336"
id="ID-80ea259f-73f0-4456-b2f5-3343d44e6336"></a>
Unfortunately h2.id doesn't create an anchor,
and even for id: links it uses <href="#sec-49">, which doesn't work.
I wondered how links in WORK work, so I checked, e.g.
http://orgmode.org/worg/org-contrib/babel/intro.html
The link is denoted like this
[[#source-code-execution][here]]
and the target like this:
* Source Code Execution
:PROPERTIES:
:CUSTOM_ID: source-code-execution
:END:
Indeed the Org manual advises:
The most important case is a link like
`[[#my-custom-id]]' which will link to the entry with the `CUSTOM_ID'
property `my-custom-id'. Such custom IDs are very good for HTML export
(*note HTML export::) where they produce pretty section links.
But it would be very tedious to add CUSTOM_ID to every target,
and the manual also hints to it:
You are responsible yourself to make sure these custom IDs are unique
Having to go out and make a target interrupts one's flow.
It's much faster to type "[[*He" and use completion to create the link.
That's why I've marked this "BUG" and not "Enhancement".
reply other threads:[~2011-01-30 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110130T145949-271@post.gmane.org \
--to=vladimir@sirma.bg \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).