Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When the table of contents is generated, it numbers sections based upon their heading:

1. section 1  
2. section 2  
2.1 section 2.1  
2.2 section 2.2  
3. section 3

I would like these section numbers to appear at the paragraph level as well:

1. (section 1 header text)
... section 1 content ...

2. (section 2 header text)
... section 2 content ....

Any tips?

share|improve this question
up vote 3 down vote accepted

There is a user-preference to make all headings use outline numbering, but no way to make that a default for all users. Here's a few lines of code which can be added to your LocalSettings.php file which do that.

$wgExtensionFunctions[] = 'wfNumberHeadings';
function wfNumberHeadings() {
    global $wgUser;
    $wgUser->setOption('numberheadings', true);
share|improve this answer

According to this page, you can also change in LocalSettings.php to make this behavior the default.

$wgDefaultUserOptions['numberheadings'] = 1;
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .