Details
- Applies to
- moin--main--1.5--patch-412/MoinMoin/macro/TableOfContents.py
- Purpose
handle the choice of hierarchical indented list progressions according to indent depth in TableOfContents macro.
- Description
- Eg: instead of 1, 2, 3 at all levels, we have A, B, C at the second, I, II, III at the third, a, b, c at the fourth and i, ii, iii at the fifth.
Have a look at HelpMiscellaneous when the patched version is running to see the difference.
Patch
Discussion
Excerpts from #moin:
<pawan_> Okeydokey, the patch is up under moinmoinpatch under a record-length name ;-) <pawan_> almost bigger than the patch itself ;-) <ThomasWaldmann> pawan_: it is a bit unclear for me whether this is considered an improvement by anyone <ThomasWaldmann> also, if you enable section-numbers, the toc numbers wont match the section numbers <ThomasWaldmann> and x?html strict did remove the list type <ThomasWaldmann> although that could be solved by css class <pawan_> Easily solved. I define that behaviour as a feature. Yes. <pawan_> ThomasWaldmann : suggestions on how to improve it? <ThomasWaldmann> pawan_: fear featurism :) <ThomasWaldmann> we maybe just could do all that by css <ThomasWaldmann> althoug that wont solve Hn numbering <ThomasWaldmann> iirc there was some other feature request for 1. 1.1. 1.1.1 style numbering <DasSheep> ThomasWaldmann: you could use taht bulletless lists and put numbers by yourself <ThomasWaldmann> indenting would be wrong maybe <ThomasWaldmann> esp. when going from 9. to 10. * pawan_ fears feeping creaturism <DasSheep> ThomasWaldmann: can do with css <DasSheep> <li><span class="toc-number">1.1.1.1.1</span> Ziew</li> <DasSheep> and set the span's width to constant <ThomasWaldmann> pawan_: i think that 1.1.1 approach is better because it matches Hn without change <pawan_> html itself can also be adjusted to align to a character. But DasSheep would disapprove being a css guy. <starshine> decimal tab? <DasSheep> pawan_: how do you know the width of space character in the user's font to align it in html? and the widths of the digit characters... <xorAxAx> many people want such a feature ... <ThomasWaldmann> xorAxAx: "such"? <pawan_> DasSheep : I wouldn't use space. I would use the evil of tables and the char attribute. http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.3.2. <pawan_> ThomasWaldmann : it wasn't actually aimed at section numbered stuff. So you think the patch should be s/A/1/ s/i/1/ s/a/1/ and s/I/1/ ? <ThomasWaldmann> pawan_: it maybe should check if section-numbers are wanted (see Hn) and use "1" if yes
Hmmm. I should see how this tiny patch compares with AlterTableOfContentsAppearanceWithStyleSheet - PJ
OK. TocNumberingStyle is obsolete, since AlterTableOfContentsAppearanceWithStyleSheet can do this much more elegantly. All you need to do is add something like the following into the stylesheet (common.css etc) to get the same result with AlterTableOfContentsAppearanceWithStyleSheet:
.table-of-contents ol { margin:0; margin-left:1em; list-style-type:decimal; } .table-of-contents ol ol { list-style-type:upper-alpha; } .table-of-contents ol ol ol { list-style-type:upper-roman; } .table-of-contents ol ol ol ol { list-style-type:lower-alpha; } .table-of-contents ol ol ol ol ol { list-style-type:lower-roman; }
- - PJ
Plan
- Priority: N/A
- Assigned to: N/A
- Status: Obsolete