From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Use id property as anchor in the Table of Contents Date: Wed, 07 Sep 2011 20:34:54 -0400 Message-ID: <87zkifx45t.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Sa5-0008IV-GR for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 20:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Sa3-0008AX-OD for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 20:35:01 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:62816 helo=mho-01-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Sa3-0008AK-D9 for emacs-orgmode@gnu.org; Wed, 07 Sep 2011 20:34:59 -0400 In-Reply-To: ("Pere Quintana =?utf-8?Q?Segu=C3=AD=22's?= message of "Wed, 7 Sep 2011 23:07:46 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: pquintana@obsebre.es Cc: emacs-orgmode@gnu.org Pere Quintana Segu=C3=AD writes: > Hi, > > I'm using Org-mode to publish my website. One of my site's pages has > a lot of sections and the number of sections is increasing rapidly.=C2=A0 > > My problem is that the HTML exporter, in the Table of Contents, is > using the section numbers as anchors. As the section numbers change > with time, I can't get stable links=C2=A0across=C2=A0versions of the docu= ment.=C2=A0 > > As many of the sections (headings) have id properties, I'd like the > HTML exporter to use them as anchor for the Table of Contents, when > available. > > Is this possible? I didn't find an answer in the manual. > > As an example. This is the document I'm working on: > http://pere.quintanasegui.com/diccionari-tecnologia.html#sec-2-78 > > As you can see, section 2.78, called RSS, has the anchor sec-2-78. If > the anchor was its id "04E3903E-EAF1-499F-98CD-9E3E4BA0806A", the > link would remain the same in the future. I don't mind if the URL is > not human readable. Sec-2-78 isn't human readable too. Hi Pere, You can manually provide CUSTOM_ID properties. These ids are used in the TOC. e.g. * Reminders :PROPERTIES: :CUSTOM_ID: Reminders :END: for=20 http://doc.norang.ca/org-mode.html#Reminders I don't know if there is a way to use the ID property automatically. Regards, Bernt