Starting a counter in mediawiki without extension

⇠ Back to Blog:Hacks
m
m
Line 9: Line 9:
 
The internet tells you it's not possible natively and that you need an extension. Here's an ugly hack to do it anyway! (keeping the # rather than going full [[HTML]]).
 
The internet tells you it's not possible natively and that you need an extension. Here's an ugly hack to do it anyway! (keeping the # rather than going full [[HTML]]).
  
 +
--more--
 +
 +
<pre><nowiki>
 +
<div style="color:white;">
 +
# <ol start=3><div style="color:black; position:relative; left:-50px;">
 +
# Three
 +
# Four
 +
# Five</div></ol></div>
 +
</nowiki></pre>
 +
 +
It's ugly and could break your document! Use with care under desperate circumstances!
  
 
{{wl-publish: 2021-01-25 10:10:13 +0000 | Fabrice }}
 
{{wl-publish: 2021-01-25 10:10:13 +0000 | Fabrice }}

Revision as of 10:42, 25 January 2021

Say you want to count like this in mediawiki (not starting at 1):

    1. Three
    2. Four
    3. Five

The internet tells you it's not possible natively and that you need an extension. Here's an ugly hack to do it anyway! (keeping the # rather than going full HTML).

<div style="color:white;">
# <ol start=3><div style="color:black; position:relative; left:-50px;">
# Three
# Four
# Five</div></ol></div>

It's ugly and could break your document! Use with care under desperate circumstances!