Mediawiki notes

From raju

editing tables

small table

Small table, with borders, column headers, one row per line of MediaWiki markup:

    {| class="wikitable"
    !col1 !!col2 !!col3
    |-
    |  Orange    ||   Apple   ||   more
    |-
    |   Bread    ||   Pie     ||   more
    |-
    |   Butter   || Ice cream ||  and more
    |}
    
col1 col2 col3
Orange Apple more
Bread Pie more
Butter Ice cream and more

Small table, one row per line of MediaWiki markup:

    {|
    |  Orange    ||   Apple   ||   more
    |-
    |   Bread    ||   Pie     ||   more
    |-
    |   Butter   || Ice cream ||  and more
    |}
    
Orange Apple more
Bread Pie more
Butter Ice cream and more

Very simple table, one cell per line of MediaWiki markup:

    {|
    |Orange
    |Apple
    |-
    |Bread
    |Pie
    |-
    |Butter
    |Ice cream 
    |}
    
Orange Apple
Bread Pie
Butter Ice cream

align everything to left

col1 col2 col3
Orange Apple more
Bread Pie more
Butter Ice cream and more

dummy

Definition lists

term 
definition

numbered lists with preformatted text

  1. item 1
  2. item 2
    preformatted text
    

    unformatted text

  3. item 3

preformatted text

    preformatted text
    

monospace

monospace text

include one page into another

This is called transclusion. See https://www.mediawiki.org/wiki/Transclusion for more details.

horizontal line

Use ---- which will show up as


organize wiki into hierarchical structure

Note:- Subpages are useful for organising information hierarchically. On the other hand, subpages tend to have a long name that is hard to remember, so it may be more user-friendly to use them as little as possible. You can also organize pages with the category feature, which is more suitable for creating a hierarchical network of information.

templates for comparison tables

To create a "yes" template, I created a page with title "Template:Yes" and with contents

    <noinclude>{| class="wikitable"
    |-
    |</noinclude>style="background:#9F9;vertical-align:middle;text-align:{{{align|center}}};{{{style|}}}" class="table-yes"|{{{1|Yes}}}<noinclude>
    |}
    

The exact code was obtained by going to https://en.wikipedia.org/wiki/Template:Yes -> click the "View source" tab in the top right -> copy the source code.

For a list of these type of templates, see https://en.wikipedia.org/wiki/Template:Yes

math equations

mediawiki links

external links