[pmwiki-users] wikipublisher (pagetoc)

John Rankin john.rankin at affinity.co.nz
Wed Mar 8 16:45:24 CST 2006


On Thursday, 9 March 2006 12:13 AM, noskule at gmx.net wrote:
>John Rankin schrieb:
<snip>
>>So what we need is a "silent toc" directive -- it generates
>>anchors but no toc list. This needs a suitable markup
>>variant, such as (:^toc:) for "not toc", in contrast to
>>(:*toc:) and (:#toc:).
>>
>This seams a good approach.  IMO anchors for heading shouldnt require a 
>(visible) table of content. Cause I'maby like to link a arbitary heading 
>in an arbitary page but the target page I do not need a table of 
>content. So to make autmatic anchors independend from a toc seams a good 
>thing.  It would be nice if a silent toc could be put into the 
>groupheader to assign them automaticly to every page.

It's likely to be (:toc-hide:) [by analogy with (:toc-float:)]. This will
allow authors to control what gets included and how: (#toc-hide:) would
number the headings, and so on.

>
>One question is the nameconvention. Numbers have the problem, if the 
>content changes(additional heading), referenves maby point to the wrong 
>anchor. Anchors with the same name as the heading(underscores instead of 
>space) have the problem that there could exists multiple times. So it 
>seams need some thinking to get a solution . ..
>
I'm not sure how big a problem this is in practice.

Hard-wired references may point to the wrong item. Because the toc
directive automatically generates the references on demand, the links
are always correct (barring programming errors). If somebody wishes
to make a hard-coded reference, she or he can insert an anchor
manually and link to that. If an anchor already exists, the toc
uses it. I don't think it's the toc's job to generate persistent
unique identifiers for anchor references.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list