Nicholas Michalowski <nmichalo <at> gmail.com> writes:
I am an editor over at wikibooks and I was have
found myself
wishing for a better way to number things in wikimarkup. Mainly my
activity has been focused on mathematics texts, and I wished for a way
to automatically generate numbers for theorems & exercises. Similar
to what is done in LaTeX. Basically so I could have a template that
would increment say a theorem number from something like 2.1.1 to
2.1.2. (I could imagine 2 and 1 being inputs to the template That
something like {{Theorem|2|1}} display 2.1.1, 2.1.2, ... etc.)
This page:
http://www.w3.org/TR/CSS2/generate.html#counters
made me hopeful something like this might be possible in HTML/CSS, but
to be honest I am not technically savvy enough to figure out if I am
correct.
CSS counters are very flexible, but they are not supported in IE6/7 (nor IE8
with default settings which tends to fall back to IE7 compatility mode on
Wikimedia sites). You could probably force the Cite extension to do something
like that, but that would be a rather ugly hack. You can use javascript if the
lack of numbering is not an accessibility problem, or pywikipediabot if you
don't mind littering the page history.