[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Custom entry IDs in HTML export

From: Daniel Clemente
Subject: [Orgmode] Custom entry IDs in HTML export
Date: Fri, 27 Mar 2009 13:47:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

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

  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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]