[pmwiki-users] Table of content generation

Pierre Rouzeau pierre at rouzeau.net
Wed Feb 16 17:30:38 CST 2005


Hello, my answers in the text :

John Rankin a écrit :
> On Thursday, 17 February 2005 11:27 AM, Pierre Rouzeau <pierre at rouzeau.net> wrote:
> 
>>Hello,
>>after having fighted for some time to have the NumberedHeaders recipe 
>>working with the John rankin Table of contents recipe, i have gone ahead 
>>and decided to build myself my table of content.
> 
> 
> Can we perhaps add your numbered header markup to the table of
> contents script? This /should/ be fairly straightforward.

I have tried that, but discovered number of side-effects. In fact, i 
found simpler to made my own than trying to modify the toc recipe.

> The NumberedHeaders recipe appears to use '°' (which is shift-option-8
> on my keyboard). So I think it ought to be a matter of changing the
> match expression to look for this as well as ! marks. However, the toc
> script also has to insert anchor markups, so NumberedHeaders' use of
> Keep causes a problem for toc, as I understand it.

I no longer use keep, so this is feasable
> 
> Can you perhaps use a <hn> element, but with a class attached to it
> to control indent? This is what I do in the PublishWikiTrail script
> and it seems to work for me.

Using <hn> was my initial intent, but i was not wanting to brake 
everything on a site by modifying its indentation. I had not thought to 
make a class. Probably a better solution, indeed.

> 
> This may be a cleaner way to do it, as you can then let PmWiki
> take care of the html tagging, and not have to 'keep' the output.
> 
> It would be good if the 2 recipes could co-exist, rather than
> creating another toc capability.
> 
> If you like, I'll have a closer look at numheaders and see if I can
> maybe see a way to make the 2 work together.
> 
Ok, sent my dev version by private mail

>>...
>>
>>Please note that i have not been able to understand how does work the 
>>recipe page table of content of John Rankin, so cannot use the same 
>>method...
> 
> 
> Every time I go back to the table of contents script, I find myself
> wondering how on earth I ever got it to work. ;-)
> 
Page principale - Main page  -  www.rouzeau.net <http://www.rouzeau.net>
---------------------------------------------------------------------------






More information about the pmwiki-users mailing list