[Moin-devel] [ moin-Patches-644224 ] Enhanced TableOfContents macro

noreply at sourceforge.net noreply at sourceforge.net
Thu Nov 28 11:28:03 EST 2002


Patches item #644224, was opened at 2002-11-26 17:21
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=644224&group_id=8482

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Simon Huggins (huggie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhanced TableOfContents macro

Initial Comment:
Numbers the links the same as the titles or not at all 
depending on the setting of pragma section-numbers 
(see http://the.earth.li/~huggie/cgi-bin/moin/HtagHowto 
for an example)

It makes following the example page above a lot easier.

I added this to MacroMarket but maybe that was the 
wrong place if I want feedback.

Please grab the patch from 
http://the.earth.li/~huggie/tc.diff 

----------------------------------------------------------------------

Comment By: Steve McIntyre (steve_mcintyre)
Date: 2002-11-28 19:27

Message:
Logged In: YES 
user_id=658437

Found a little bug in the code - deeply nested section
numbers would break things - I was seeing 6.1.1 going to 9
for the next top-level header.

This new patch ties up with my other one - if you use 

#pragma section-numbers 2

or

#pragma section-numbers offset

then it will ignore the very top-level header when counting
and generating the TOC

See http://www.einval.com/steve/patches/moinmoin/toc.patch

----------------------------------------------------------------------

Comment By: Steve McIntyre (steve_mcintyre)
Date: 2002-11-28 17:40

Message:
Logged In: YES 
user_id=658437

Excellent - just what I was looking for.

I'm currently playing with the output of the section numbers
code to allow you to use a top-level section that doesn't
affect the section numbers. In the example page you've
posted, everything appears as 1.something, which seems a
little odd. I'll post my patch shortly...

----------------------------------------------------------------------

Comment By: Simon Huggins (huggie)
Date: 2002-11-28 12:20

Message:
Logged In: YES 
user_id=1192

Of course I meant:
http://the.earth.li/~huggie/cgi-bin/moin/WikiSandBox
Doh.

----------------------------------------------------------------------

Comment By: Simon Huggins (huggie)
Date: 2002-11-28 12:19

Message:
Logged In: YES 
user_id=1192

It's because as you've noticed of the top-level section.  I can't 
see a sensible way around that though.

You can see an example (or test :)) that isn't just 
1.something at
http://the.earth.li/~huggie/cgi-bin/moin/WikiSandbox

----------------------------------------------------------------------

Comment By: Steve McIntyre (steve_mcintyre)
Date: 2002-11-28 11:29

Message:
Logged In: YES 
user_id=658437

Excellent - just what I was looking for.

I'm currently playing with the output of the section numbers
code to allow you to use a top-level section that doesn't
affect the section numbers. In the example page you've
posted, everything appears as 1.something, which seems a
little odd. I'll post my patch shortly...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=644224&group_id=8482




More information about the Moin-devel mailing list