OutlineLists
Questions answered by this recipe
Can I get PmWiki to generate numbered lists using standard outline numbering? (I.A.1.i.a)
Description
The following code enables an %outline% wikistyle to be applied to ordered lists:
$HTMLStylesFmt[] = " ol.outline { list-style-type:upper-roman; } ol.outline ol { list-style-type:upper-alpha; } ol.outline ol ol { list-style-type:decimal; } ol.outline ol ol ol { list-style-type:lower-roman; } ol.outline ol ol ol ol { list-style-type:lower-alpha; } ";$WikiStyle['outline'] = array('class'=>'outline','apply'=>'list');
With this in place, one can create lists like:
Here's an outline list: # %outline% top-level # top-level ## second-level ### third-level ## second-level ## second-level ### third-level #### fourth-level ##### fifth-level While this list is just a normal PmWiki-ordered list: # top-level ## second-level ### third-level |
Here's an outline list:
While this list is just a normal PmWiki-ordered list:
|
Notes
Contributors
- Pm, 2004-12-21
Sandbox
This page has the outline modification installed, so you can play with outline lists below.
- top-level
- top-level
- second-level
- third-levelkjhsfgdn dfsgh fg dsfgh dfgkhdgkdesrhgkerhgdk fgdf gdfg fd gdskfjhdf dsfl df df df dfkjhdfkhdrfg drfg df gfdghdfjkghfdkjghfgkedhgierhuirhdfiug fv fddhdk dfv ijkvfgdsfrg
- second-level
- second-level
- third-level
- fourth-level
- fifth-level
- fourth-level
- third-level
- second-level
I just created a GuiEdit button function for this:
$GUIButtons['outline'] = array(530,
'\\n# %outline% Top Level \\n## Second Level \\n### Third Level ',
'\\n', '', '$GUIButtonDirUrlFmt/outline.gif"$[Outline list]"');
I also created a button image: Attach:outline.gifΔ
- David A. Spitzley 4/1/05
Is it possible to modify this recipe to make numbered outlines like this?
1. top-level
2. top-level
etc.
shi September 05, 2005, at 05:45 PM
Unfortunately, AFAIK HTML doesn't directly support this style of numbering. --Pm
It's quite possible with CSS counters, but doesn't work in the majority of browsers. It goes something like this:
ol { counter-reset: item }
li { display: block }
li:before { content: counters(item, ".") " "; counter-increment: item }
Is it possible to modify this recipe to make numbered outlines like this?
1. top-level
2. top-level
etc.
Melvyn 14th March 2006, at 10:41 AM
Hello Melvyn, This should acomplish what you are after.
$HTMLStylesFmt[] = "
ol.outline2 { list-style-type:decimal; }
ol.outline2 ol { list-style-type:lower-alpha; }
ol.outline2 ol ol { list-style-type:lower-roman; }
";
$WikiStyle['outline2'] = array('class'=>'outline2','apply'=>'list');
This has the same usage as above save use the %outline2% WikiStyle and lives along side the above or independent of the above without issue.
My best regards to you,