From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Pere_Quintana_Segu=ED?= Subject: Re: Use id property as anchor in the Table of Contents Date: Thu, 8 Sep 2011 12:53:05 +0200 Message-ID: References: <87zkifx45t.fsf@norang.ca> Reply-To: pquintana@obsebre.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1cEy-0001hR-8V for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 06:53:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1cEt-0003lC-Mg for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 06:53:52 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]:57144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1cEt-0003l8-Iu for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 06:53:47 -0400 Received: by gxk19 with SMTP id 19so927051gxk.31 for ; Thu, 08 Sep 2011 03:53:47 -0700 (PDT) In-Reply-To: <87zkifx45t.fsf@norang.ca> 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: Bernt Hansen Cc: emacs-orgmode@gnu.org 2011/9/8 Bernt Hansen > > Pere Quintana Segu=ED 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. > > > > 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=A0across=A0versions of the document= . > > > > 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. =A0These ids are used in > the TOC. > > e.g. > > * Reminders > =A0:PROPERTIES: > =A0:CUSTOM_ID: Reminders > =A0:END: > > for > > http://doc.norang.ca/org-mode.html#Reminders OK, thanks for the tip. That's an option, but unfortunately it is not automatic. > I don't know if there is a way to use the ID property automatically. Unfortunately I don't know lisp, so I can't modify org-mode to provide this feature :'( If anyone is willing, I would be very grateful. Thanks, Pere