Extension:H1 CSS

What can this extension do?
This extension allows to specify an initial number for &lt;h1&gt; tags, together with an optional text prefix. This allows subsequently consistent numbering &lt;h1&gt; through &lt;h5&gt; (for if it's supported in a future), regardless autonumbering is enabled or not. This is based in CSS 2 counters, and has been proved successfully in both Firefox and konqueror. IE shows no numbering at all, though the chapter prefix is shown ok. The tag is intended to be called once right before the keyword.

Usage
This starts numbering from "5" on. where prefix additionaly prefixes the &lt;h1&gt; tags with the word "Chapter", so a wiki code of =My custom chapter= would be shown as Chapter 5. My custom chapter and the table of contents will show the numbering starting from 5. Of course, subsequent &lt;h1&gt; tags will follow consecutive numbering (6, 7, etc). The example is exactly the same that which means that the parameter full is parsed, assigning the last word to the chapter, and the rest of the text before it, to the prefix. As an extra option, you can enclose the chapter title, so allows to do it all in one line.

Installation
Copy the H1_CSS.php file into the extensions folder of your MediaWiki installation. Then add the following line to your LocalSettings.php file (near the end):

Parameters

 * full: The final string to be used as prefix and initial chapter number. This is the preferred way if you wish both to add a prefix and have an inititial chapter number different from 1. Currently, if any of the other two parameters is explicitily set, it take precedence.
 * chapter: Sets the initial number for &lt;h1&gt; headings. Meant to be used when you don't want nor need a prefix.
 * prefix: Sets the prefix for &lt;h1&gt; heading. Meant to be used when you don't want nor need an initial chapter number different from 1.

Styling
This extension, when called, adds some inline CSS code, trying to fit to explicit predefined css classes in TOC and headings tags, so necessary actions are done. No font style is changed, just specific counter handling.