[pmwiki-users] Automatically add anchors to heading tags?

Kathryn Andersen kat_lists at katspace.homelinux.org
Sun Jul 29 20:55:51 CDT 2007


On Mon, Jul 30, 2007 at 01:44:57AM +0200, christian.ridderstrom at gmail.com wrote:
> On Tue, 24 Jul 2007, H. Fox wrote:
> 
> >On 7/22/07, christian.ridderstrom at gmail.com
> ><christian.ridderstrom at gmail.com> wrote:
> Please read me sentence again. If you change the heading text, the anchor 
> lable will change. A changed anchor label is a problem that is similar to 
> what you would have if anchor labels were determined from their number, 
> i.e. if this is heading one, two, three etc. In this case, inserting a new 
> heading means that the old label of say "toc3" will refer to the wrong 
> entry.
> 
> The point is really that neither system is very good.

The question is, which is more likely: changing header text, or
inserting new material?  From my personal experience, inserting new
material is more common, and therefore a solution should be weighted
more towards that possibility.

Other advantages of anchor labels being based on the content of the
anchor is that
a) they are meaningful
b) they are easy to figure out, you don't have to count headers or look
at the source code of the HTML

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe



More information about the pmwiki-users mailing list