Hi, all,
I'm documenting policies and procedures using Mediawiki. Generally, when documenting procedures using something like Word, you'd have a consistent numbering system such as:
1.0 Purpose 2.0 Scope 3.0 Responsibility 3.1 General 3.1.1 Whatever goes here. ...and so on...
I'm using the MagicNumberedHeadings https://www.mediawiki.org/wiki/Extension:MagicNumberedHeadings extension to enable display of section numbers only on pages containing a template designed for procedures.
I'm curious if there might be a way to use the current section number as a prefix for ordered list numbering.
In the example above, "3.0 Responsibility" would be ==Responsibility== ===General=== and then I'd begin enumerating paragraphs with an ordered list either using # or 'ol' and 'li' tags.
Any tricks possible to accomplish this?
I like that the section titles automatically create the TOC. I don't want to use section markers for everything I want numbered in this manner as it seems inappropriate to use headings for this.
I was thinking perhaps there could be some kind of magic word that injects the current counter for the section, and it could possibly be used with the 'ol' tag's 'start' attribute to start the numbering at that of the section.
I'm sure something could be hacked together with CSS and javascript, but I'd like to know if anyone has tackled anything like this previously.
Thanks,
Larry
You might be able to create nested numbering in your TOC by adding CSS to your MediaWiki:Common.css page.
http://stackoverflow.com/questions/956178/html-css-outline-numbering http://www.w3.org/TR/CSS2/generate.html#counters
DanB
Thanks, Daniel. I've already added some CSS from http://stackoverflow.com/a/26245056 to my Common.css and the inline indentint looks great.
What I'm trying to achieve is to have in-line numbering (ala ol>li) prefaced with the section number. Effectively prefixing the ol>li numbering with the most recent section number.
At the moment I'm trying to figure out where in the source code the # character is turned into h1, h2, h3 etc. Perhaps I can inject a CSS counter in such a way that I can concatenate a section CSS counter with a list-item CSS counter.
Otherwise, I'm probably looking at some hacky javascript to fetch the most recent span tag with class "mw-heading-number" so I can scrape out the HTML contents and prepend it to my list item numbering.
Larry Silverman Chief Technology Officer TrackAbout, Inc.
On Wed, Apr 1, 2015 at 3:57 PM, Daniel Barrett danb@cimpress.com wrote:
You might be able to create nested numbering in your TOC by adding CSS to your MediaWiki:Common.css page.
http://stackoverflow.com/questions/956178/html-css-outline-numbering http://www.w3.org/TR/CSS2/generate.html#counters
DanB
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org