From: Daniel Clemente <n142857@gmail.com>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Custom entry IDs in HTML export
Date: Fri, 27 Mar 2009 13:47:34 +0100 [thread overview]
Message-ID: <87myb7w2s9.fsf@CPU107.opentrends.net> (raw)
Hi, this may have been reported before; however I didn't find it in the FAQ.
I would like to choose which ID each heading will have when they are exported to HTML. For instance, I want the table of contents to link to the anchor #tutorials instead of #sec-1.4.1. In this way, external links won't depend on the section ordering. It is also more expressive semantically.
At the moment the best I know of is:
** TODO heading
#<<target>>
This is exported as:
: <h3 id="sec-1.1"><a name="target" id="target"></a><span class="section-number-3">1.1</span> <span class="todo TODO"> TODO</span> heading </h3>
But I want:
: <h3 id="target"><span class="section-number-3">1.1</span> <span class="todo TODO"> TODO</span> heading </h3>
Since entries can already have IDs (I mean the property "ID", obtained by C-c l for instance), this could now be easier to implement.
As an extreme solution: If org-mode used exactly that ID to link to the entry, I wouldn't mind changing the entry ID overall in my files so that they have meaningful names instead of random data. Maybe I wouldn't even mind having an HTML ID called b9c1a93e-2af4-4a41-bfe3-8d2bd62c0614… (if it starts with a letter, it's still a valid ID).
In case it's too complex to do this in org, do you know of some script to replace the IDs after export?
Thanks,
Daniel
next reply other threads:[~2009-03-27 12:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 12:47 Daniel Clemente [this message]
2009-03-27 16:16 ` Custom entry IDs in HTML export Carsten Dominik
2009-03-27 17:57 ` Bernt Hansen
2009-03-27 21:32 ` Sebastian Rose
2009-03-30 11:49 ` Daniel Clemente
2009-04-16 6:55 ` Carsten Dominik
2009-04-16 8:50 ` Sebastian Rose
2009-04-16 11:28 ` Carsten Dominik
2009-04-16 13:14 ` Sebastian Rose
2009-04-16 17:14 ` Carsten Dominik
2009-04-16 20:50 ` Sebastian Rose
2009-04-16 21:26 ` Carsten Dominik
2009-04-16 22:37 ` Sebastian Rose
2009-04-17 4:11 ` Carsten Dominik
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=87myb7w2s9.fsf@CPU107.opentrends.net \
--to=n142857@gmail.com \
--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).