[Pmwiki-users] Automatic page table of contents with [[toc]]
Patrick R. Michaud
Sat Nov 29 20:03:20 CST 2003
I'm interested in creating a mini-toc for a wiki page but thus far have
been stymied about how it should handle embedded WikiWords and
formatting in the toc links (and, I've been working on a few other
development priorities). If we can get consensus about how those
should be handled I'd be happy to take it further.
On Sunday, November 23, 2003, 2:42:27 PM, you wrote:
> There has been some discussion in the past about creating a mini-toc
> for a wiki page.
> Are there any volunteers who want to take this further??
> We have been experimenting with this a bit for a couple of
> the wikis we use and came up with:
> vanilla flavour
> [[toc]], [[toc#]] or [[toc*]]
> produces a numbered or bulleted list of references to the
> paragraph text following any ![[#anchors]] or :[[#anchors]]
> For example it includes
> !![[#anch01]]A heading
> Q:[[#anch01]]A question
> but not
> [[#top]]This page is about ...
> It uses styles to float the toc list to the right of the page.
> hokey-pokey flavour
> It looks for markup like
> !!#A heading
> Q:#A question
> and turns the # into a [[#tocnn]] anchor
> [[toc]] then searches for !# or :#
> We thought of looking for !s and automatically inserting
> anchors and toc entries, perhaps based on whatever ! comes
> first. For example, if the first occurrence of ! markup is
> !!, make a toc of any other !! occurrences, but not ! or !!!.
> The problem I see with this is what if an author inserts anchor
> markup manually.
> Any thoughts on how a toc feature should work?
> I am happy to release this to the cookbook, but would like some
> volunteers to test it. We rely on other local customisations,
> for example to make sure it copes with
> !!#A WikiWord reference and '''very''' interesting idea
> So I have to pull together a collection of stuff that works
> with a standard pmwiki distribution.
More information about the pmwiki-users