discuss: Re: In HTML, "render" all headings as anchors
Subject:
Re: RFE: In HTML, "render" all headings as anchors
From:
Randy Kramer ####@####.####
Date:
22 Mar 2002 13:40:14 -0000
Message-Id: <3C9B32C6.3155@fast.net>
David Merrill wrote:
> Yes, that's easy. What's harder is making the IDs predictable enough
> that other docs can link to them without fear that the ID will change.
> I just wrote texi2db. Believe me, I have a healthy respect for this
> problem.
On TWiki, links to headings are constructed to look like:
*
http://twiki.org/cgi-bin/view/Wikilearn/PlugNPlay#What_Plug_and_Play_Is
*
http://twiki.org/cgi-bin/view/Wikilearn/LinuxAdministrationTools#Web_Based_Linux_Administration_T
*
http://twiki.org/cgi-bin/view/Wikilearn/PlugNPlay#New_Things_I_m_Starting_To_Reali
Where What_Plug_and_Play_Is, Web_Based_Linux_Administration_T, and
New_Things_I_m_Starting_To_Reali are all or the first 32 characters of
the linked to heading, with spaces and punctuation (the ' in I'm)
replaced by underbars.
A typical anchor looks like this in the document source:
<h3><a name="What_Plug_and_Play_Is"> What Plug and Play Is </a></h3>
Yes, I recognize the links can change with new revisions of the document
(if the headings change), but this will not happen with every revision,
and would be something authors/maintainers could attempt to minimize,
especially if they recognized it as a useful goal.
Randy Kramer