Wiki reference notes

From w.mfi
Jump to navigation Jump to search

These are notes to myself about things I use on Mediawiki, to remind my addled brain about them. If it helps you too, welcome.

Text Size

Here's a link for bunch of wikitext HTML codes.

For font sizing, use

  <big>   not <Large>

Also see the <font> entry there for more options.


You can highlight something like this:

You can <span style="background:yellow">highlight something</span> like this

There are lots of different colors to choose from, for both background and foreground (font) color.


I like listing data, but I don't like default wiki tables. Here's an example of a nice tight table, from my No Man's Sky page:

Metal Units per




U/p vs.


U/p vs.


Emeril 275.00 +186% 100.0%
Gold 220.00 55 +129% 80.0%

In code:

   {| class="wikitable collapsible autocollapse sortable" style="text-align: center;" 
   ! Metal
   ! <strike>U</strike>nits per
   ! Δ
   ! <strike>U</strike>/p vs.
   ! <strike>U</strike>/p vs.
   | Emeril || 275.00 ||  || +186% || 100.0%
   | Gold || 220.00 || 55 || +129% || 80.0%


Everything Centered (unless otherwise specified)

The style="text-align: center; does this. When part of the table intro, it applies to the entire table. See example above.


Put "sortable" in the table intro.


I used <strike> to turn a simple "U" into the special Unit (money symbol) of that game.

Header Line Breaks

As you can see, you can start header text on a new row to make entries be two lines tall to essentially force a word-wrap within the column header itself. I like to keep columns tight, so eyes don't have tons of left to right movement to read a row. Maybe I went a little overboard here, but I hate it when a very long table has very wide header text, even though the text in each column is very narrow. What a waste of space.

Unfortunately, I haven't found a way to have the column header row be bottom-centered vertically.

A tight ASCII table

Excel to Wiki Table Converters

Here are a couple of converters; there are many out there. It all depends on what you want.

I like to tweak and haven't found a single one that doesn't always need post-editing. In particular, I think each table row should be on one line and not make every cell start a new line. A table is a table, whether in raw wiki code or not. Since not a single converter does this, I have to use TextPad all the time (see below).

  • ConvertCSC: This is what I usually use, but I have to change a dozen settings every single time I use it.
  • is very simple and quick. But what you see is what you get. Not for tweakers.

TextPad Regular Expressions and Special Characters

To prevent TextPad from choking on special characters (like the '|' pipe character when trying to search and replace line-wraps in Excel-to-wiki table output utilities),

Just put a \ in front of the special character (here, the | pipe).

ASCII tables

Every now and then, you want to forget all the built-in wiki table sophistry and just make a super-tight ASCII table. Here is a super tight table I made for XCOM 1994.

These tables are made very simply: Just put three spaces at the beginning of each line like so:

  <--- three spaces here

This over-rides all formatting and creates straight text. Strictly speaking, MediaWiki doesn't know or care that you're making a table.

This be straight-up fixed-width characters and spaces. Because sometimes it's perfect.

You can still put in, e.g., underlining codes and hotlinks, like I did.

Special Characters

Here are some special characters, especially math, taken from, e.g., this page:

Punctuation: ¿ ¡ « » § ¶ † ‡ • - – —
Commercial symbols: ™ © ® ¢ € ¥ £ ¤
Greek characters: α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω
Math characters: ∫ ∑ ∏ √ − ± ∞ ≈ ∝ ≡ ≠ ≤ ≥ × · ÷ ∂ ′ ″ ∇ ‰ ° ∴ ø ∈ ∩ ∪ ⊂ ⊃ ⊆ ⊇ ¬ ∧ ∨ ∃ ∀ ⇒ ⇔ → ↔ ↑ ℵ ∉ °

You don't need to look at the source code here. Just directly cut and paste them into your wiki text.

Non-breaking space (padding)

Plenty of times, I just want a little more space,

Use &_nbsp;

test b&b

test b&b

test b&nbsp;b

Arg, why won't the nowiki tag work? DELETE THE UNDERSCORE THERE

Look on my Works, ye Mighty, and despair

Forcing a new line break

Use either

 <br />  or  <p>yer text goes here</p>

Displaying images

A typical image

A recent JPG

For this image, use this callout:

[[Image:TWB Food Level Tooltip - Mide Summer 911 screencap 2020-07-03.jpg|100px|thumb|right|A recent JPG]]

Use "Media:" for, e.g., PDFs and XLSs.

For more info, see MediaWiki Help:Images.

I find it odd that anything you upload is prefaced with "File:" in your upload directory... I'm not sure when you'd ever actually use "File:" in a callout.

Having a "cover" image for PDF, XLS, etc.

Table of Vendors in the Game

For a click-able image that tells what type of file it is (without showing its contents), and which will immediately download the file, use:

[[File:PDF_icon.GIF|150px|right|link=|thumb|Table of Vendors in the Game]] 

The "thumb" actually causes the caption here, despite what MediaWiki help says. And the media file has to be called out by direct file location due to bug phab:T18409.

If you're working with a template, you can use a statement like:

[[File:{{{Download}}} | thumb | link={{SERVER}}/media/{{urlencode:{{{Download}}}|WIKI}} | {{{Caption|}}} ]]

For more info, see this MediaWiki Support topic.

Collapsible Elements

Used on my wiki home page and elsewhere. Here's the wiki manual for it. Especially see its section on Custom Toggle Links.

Formed as follows:

  <span class="mw-customtoggle-TOC_SmartHome"><h2>Smart Home Tech</h2></span>
   <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-TOC_SmartHome">
    ''insert expanding text here''

The custom collapsible i.d. can actually be called from anywhere. But be careful not to copy the i.d. when cutting and pasting, or all your "different" collapsible elements will reference the same text. You must use a unique i.d. for each unique element.

MediaWiki Version


Hidden Text

Like this:

  <!--- Comment -->