Help:Editing
From ZWHLUG
To format a word in italic, you include it in two single quotes like ''this''
[edit] Paragraphs
Mediawiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a newline with the HTML tag <br>.
[edit] HTML
Some HTML-Tags are allowed in MediaWiki, for example <code>, <div>, <span>, <b>, <i>, <br> and <font>.
[edit] Magic words
This is an organised index of Magic words used in MediaWiki. Tags such as "[MW1.5+]" indicate the version that first supported the magic word. "XYZ" indicates user input, which is used in the example.
| Word | Explanation |
|---|---|
| __NOTOC__ | Hides ToC on the current page. |
| __FORCETOC__ | Forces the table of contents to appear. |
| __TOC__ | Places a ToC here (overriding any __NOTOC__). |
| Word | Explanation |
|---|---|
| __NOEDITSECTION__ | Hides the edit links beside headings. |
| __NEWSECTIONLINK__ | [MW1.7+] Gives a "+"-link next to the edit-tab to make a new section on a non-talk page. |
| __NOCONTENTCONVERT__ __NOCC__ | Don't perform the content language conversion (character and phase) in article display; for example, Chinese zh with zh_cn, zh_tw, zh_sg, zh_hk. |
| __NOGALLERY__ | [MW1.7+] This magic word allows images in category pages to be displayed as inline links instead of gallery. |
| __NOTITLECONVERT__ __NOTC__ | Like __NOCC__ but affecting article title only. |
| __END__ | Allows for trailing whitespace to be included in the page save. |
| __START__ | This magic word has no effect but an ID in MagicWord.php (MAG_START).
|
| Word | Example | Explanation |
|---|---|---|
| {{CURRENTDAY}} | 5
| Displays the current day in numeric form. |
| {{CURRENTDAY2}} | 05
| [MW1.6+] Ditto with leading zero (01 .. 31). |
| {{CURRENTDAYNAME}} | Friday
| Name of the day in the language of the project or English. |
| {{CURRENTDOW}} | 5
| Ditto as number (0=Sunday, 1=Monday...). |
| {{CURRENTMONTH}} | 12
| The number 01 .. 12 of the month. |
| {{CURRENTMONTHABBREV}} | Dec
| [MW1.5+] Ditto abbreviated Jan .. Dec. |
| {{CURRENTMONTHNAME}} | December
| Ditto in named form January .. December. |
| {{CURRENTTIME}} | 09:30
| The current time (00:00 .. 23:59). |
| {{CURRENTHOUR}} | 21
| The current hour (00 .. 23). |
| {{CURRENTWEEK}} | 49
| Number of the current week (1-53) according to ISO 8601 with no leading zero. |
| {{CURRENTYEAR}} | 2008
| Returns the current year. |
| {{CURRENTTIMESTAMP}} | 17-08-2006
| [MW1.7+] ISO 8601 time stamp. |
[edit] Tables
| Description | You type | You get |
|---|---|---|
| applies anywhere | ||
| Italic text | ''italic'' | italic |
| Bold text | '''bold''' | bold |
| Bold and italic | '''''bold & italic''''' | bold & italic |
| Escape wiki markup | <nowiki>no ''markup''</nowiki> | no ''markup'' |
| only at the beginning of the line | ||
| Headings of different sizes |
==level 1== |
[edit] Level 1[edit] Level 2[edit] Level 3[edit] Level 4 |
| Horizontal rule |
---- |
|
| Bullet list |
* one |
|
| Numbered list |
# one |
|
| Definition list |
;Definition |
|
| Preformatted text |
a space at the |
a space at the beginning of the line creates preformatted text |
[edit] Centering tables
Centered tables can be achieved, but they will not "float", no text will appear to either side. The trick is {| style="margin: 1em auto 1em auto"
{| class="wikitable"
|+ '''Cells left-aligned, table centered'''
! Duis || aute || irure
|-
| dolor || in reprehenderit || in voluptate velit
|-
| esse cillum dolore || eu fugiat nulla || pariatur.
|}
What it looks like in your browser
| Duis | aute | irure |
|---|---|---|
| dolor | in reprehenderit | in voluptate velit |
| esse cillum dolore | eu fugiat nulla | pariatur. |
[edit] Table syntaxes
| XHTML | HTML & Wiki-td | Wiki-pipe | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Table | <table></table> | <table></table> | {| params
|}
| ||||||
| Caption | <caption></caption> | <caption></caption> | |+ caption | ||||||
| Row | <tr></tr> | <tr> | |- params | ||||||
| Data cell |
<td>cell1</td> |
<td>cell1 |
| cell1 | cell2 | ||||||
| Data cell | <td>cell1</td> <td>cell2</td> <td>cell3</td> | <td>cell1 <td>cell2 <td>cell3 | |cell1||cell2||cell3 | ||||||
| Header cell | <th></th> | <th> | ! heading | ||||||
| Sample table |
| ||||||||
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>
|
<table>
<tr>
<td> 1 <td> 2
<tr>
<td> 3 <td> 4
</table>
|
{|
| 1 || 2
|-
| 3 || 4
|}
| |||||||
| Sample table |
| ||||||||
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
</tr>
</table>
|
<table>
<tr>
<td> 1 <td> 2
<tr>
<td> 3 <td> 4
<tr>
<td> 5 <td> 6
</table>
|
{|
| 1 || 2
|-
| 3 || 4
|-
| 5 || 6
|}
| |||||||
| XHTML | HTML & Wiki-td | Wiki-pipe | |||||||
