Starting a counter in mediawiki without extension

⇠ Back to Blog:Hacks
m
m
 
(48 intermediate revisions by one user not shown)
Line 19: Line 19:
 
</nowiki></pre>
 
</nowiki></pre>
  
I use that often in multicol environment:
+
It's ugly and could break your document! Use with care under desperate circumstances! Here's an example with the <tt>multicol</tt> [[template]]:
  
<pre>
 
<nowiki>
 
 
{{multicol}}
 
{{multicol}}
 
# [https://www.youtube.com/watch?v=frJ10fmNRQo The Platonic Universe]
 
# [https://www.youtube.com/watch?v=frJ10fmNRQo The Platonic Universe]
Line 36: Line 34:
 
{{multicol-break}}
 
{{multicol-break}}
 
<div style="color:white;">
 
<div style="color:white;">
# <ol start=11><div style="color:black; position:relative; left:-50px;"><div>
+
# <ol start=11><div style="color:black; position:relative; left:-50px;">
 
# [https://www.youtube.com/watch?v=980xGs1dL3w Bra and Kets]
 
# [https://www.youtube.com/watch?v=980xGs1dL3w Bra and Kets]
 
# [https://www.youtube.com/watch?v=GW-OvvqsTjY Integrals]
 
# [https://www.youtube.com/watch?v=GW-OvvqsTjY Integrals]
Line 47: Line 45:
 
# [https://www.youtube.com/watch?v=Eh_UbQdddIg Wronskians]
 
# [https://www.youtube.com/watch?v=Eh_UbQdddIg Wronskians]
 
# [https://www.youtube.com/watch?v=uKtNA_P_-ho Jacobians]
 
# [https://www.youtube.com/watch?v=uKtNA_P_-ho Jacobians]
# [https://www.youtube.com/watch?v=T7k17Ct5FeM The Equations of Physics]
+
# [https://www.youtube.com/watch?v=T7k17Ct5FeM The Equations of Physics]</div></ol></div>
 
{{multicol-end}}
 
{{multicol-end}}
</nowiki>
 
</pre>
 
  
which gives me a nicely-ordered, neatly-displayed list of my [[Mathematics]]'s [[The_Wolverhampton_Lectures_of_Physics/Mathematics|Wolverhampton lectures of Physics]]:
+
which gives me a nicely-ordered, neatly-displayed list of my [[Mathematics]]'s [[The_Wolverhampton_Lectures_of_Physics/Mathematics|Wolverhampton lectures of Physics]]. [[Fourier Series]] are covered in Lecture 17!
  
 +
Here's a template of how to get this:
 +
<pre>
 +
<nowiki>
 
{{multicol}}
 
{{multicol}}
# [https://www.youtube.com/watch?v=frJ10fmNRQo The Platonic Universe]
+
# item 1
# [https://www.youtube.com/watch?v=9dhEbzZn6-4 Arithmetic and Algebra]
+
# item 2
# [https://www.youtube.com/watch?v=imd_npki9y8 Logic and Sets]
+
# [https://www.youtube.com/watch?v=QNMvFum0tjw Complex Numbers]
+
# [https://www.youtube.com/watch?v=Kh5Vnlzi0BI Vectors]
+
# [https://www.youtube.com/watch?v=V6k8kofOvO4 Functions]
+
# [https://www.youtube.com/watch?v=g5IQSEV-JCY Infinities]
+
# [https://www.youtube.com/watch?v=CqW-yUim1eQ Infinitesimals]
+
# [https://www.youtube.com/watch?v=MYxj8dknFzs Composite and Inverses]
+
# [https://www.youtube.com/watch?v=0Qux70NDSZY Taylor Expansions]
+
 
{{multicol-break}}
 
{{multicol-break}}
 
<div style="color:white;">
 
<div style="color:white;">
# <ol start=11><div style="color:black; position:relative; left:-50px;"><div>
+
# <ol start=3><div style="color:black; position:relative; left:-50px;">
# [https://www.youtube.com/watch?v=980xGs1dL3w Bra and Kets]
+
# item 3
# [https://www.youtube.com/watch?v=GW-OvvqsTjY Integrals]
+
# item 4</div></ol></div>
# [https://www.youtube.com/watch?v=OPyOe-hutXo Basis]
+
# [https://www.youtube.com/watch?v=2tc8VYUoYD4 Linear Functions]
+
# [https://www.youtube.com/watch?v=ubDQTgJUf-8 Inverses and Determinants]
+
# [https://www.youtube.com/watch?v=F2XsXH7HtQI Eigensystems]
+
# [https://www.youtube.com/watch?v=OYfqXxAPVnk Fourier Series]
+
# [https://www.youtube.com/watch?v=oN4g3l2oo4Q Differential Equations]
+
# [https://www.youtube.com/watch?v=Eh_UbQdddIg Wronskians]
+
# [https://www.youtube.com/watch?v=uKtNA_P_-ho Jacobians]
+
# [https://www.youtube.com/watch?v=T7k17Ct5FeM The Equations of Physics]
+
 
{{multicol-end}}
 
{{multicol-end}}
 +
</nowiki>
 +
</pre>
  
 
{{wl-publish: 2021-01-25 10:10:13 +0000 | Fabrice }}
 
{{wl-publish: 2021-01-25 10:10:13 +0000 | Fabrice }}

Latest revision as of 15:52, 30 March 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! Here's an example with the multicol template:

which gives me a nicely-ordered, neatly-displayed list of my Mathematics's Wolverhampton lectures of Physics. Fourier Series are covered in Lecture 17!

Here's a template of how to get this:


{{multicol}}
# item 1
# item 2
{{multicol-break}}
<div style="color:white;">
# <ol start=3><div style="color:black; position:relative; left:-50px;">
# item 3
# item 4</div></ol></div>
{{multicol-end}}