Help:Wikitext: Difference between revisions

From TSP Encyclopedia
Jump to navigation Jump to search
(add info on headings (did we really not have this lol?))
(links, images, newlines)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following guide serves as a guide to Wiki-text hosted on this wiki. If you'd like a general guide to editing pages, you can view the MediaWiki guide to editing pages [https://www.mediawiki.org/wiki/Help:Editing_pages here].
The following guide serves as a guide to Wiki-text hosted on this wiki. If you'd like a general guide to editing pages, you can view the MediaWiki guide to editing pages [https://www.mediawiki.org/wiki/Help:Editing_pages here]. A wikitext cheatsheet is available [[wikipedia:Help:Cheatsheet|here]].


==Formatting Text==  
==Formatting text==  


These are the basics of Wiki-text; the fundamentals of which every editors needs to know:
These are the basics of wikitext:


===Strike Through===
===Basic styles===


{| class="wikitable"
{{see|wikipedia:Help:Wikitext#Text formatting}}
!Markup
!Renders as
|-
|<code><nowiki>
<s>Rabbitz is very awesome</s>
</nowiki></code>
|
<s>Rabbitz is very awesome</s>
|}
----
===Bold===


{| class="wikitable"
{{markup|
!Markup
<nowiki>'''Bold text'''
!Renders as
</nowiki>|'''Bold text'''|
|-
<nowiki>''Italic text''
|<code><nowiki>
</nowiki>|''Italic text''|
'''Rabbitz is very awesome'''
<nowiki>'''''Bold and italic text'''''
</nowiki></code>
</nowiki>|'''''Bold and italic text'''''|
|
<nowiki><s>Strikethrough</s>
'''Rabbitz is very awesome'''
</nowiki>|<s>Strikethrough</s>|
|}
<nowiki><code>Code (monospaced)</code>
----
</nowiki>|<code>Code (monospaced)</code>}}<!-- Template:Mra -->
===Italics===


{| class="wikitable"
===Lists===
!Markup
!Renders as
|-
|<code><nowiki>
''Rabbitz is very awesome''
</nowiki></code>
|
''Rabbitz is very awesome''
|}
----
===Bold and Italicized===


{| class="wikitable"
{{see|wikipedia:Help:Wikitext#Lists|wikipedia:Help:List}}
!Markup
!Renders as
|-
|<code><nowiki>
'''''Rabbitz is very awesome'''''
</nowiki></code>
|
'''''Rabbitz is very awesome'''''
|}
----
===Lists===


====Numbered List====
====Numbered list====


{{markup
{{markup|
|
<nowiki>
<nowiki>
#Rabbitz
#Rabbitz
Line 74: Line 39:
##Goes
##Goes
#On
#On
</nowiki>
</nowiki>|
|
#Rabbitz
#Rabbitz
#Gets
#Gets
Line 85: Line 49:
###List
###List
##Goes
##Goes
#On
#On}}<!-- Template:Mra -->
}}


====Bulleted List====
====Bulleted list====


{{markup
{{markup|
|<nowiki>
<nowiki>
*Rabbitz
*Rabbitz
*Gets
*Gets
Line 102: Line 65:
**Goes
**Goes
*On
*On
</nowiki>
</nowiki>|
|
*Rabbitz
*Rabbitz
*Gets
*Gets
Line 113: Line 75:
***List
***List
**Goes
**Goes
*On
*On}}<!-- Template:Mra -->
}}


====Term and Definition List====
====Term and definition list====


{{markup
{{markup|
|<nowiki>
<nowiki>
; Rabbitz (Term) : Awesome (Definition)
; Rabbitz (Term) : Awesome (Definition)
</nowiki>
</nowiki>|
|
; Rabbitz (Term) : Awesome (Definition)|
; Rabbitz (Term) : Awesome (Definition)
<nowiki>
|<nowiki>
; Rabbitz (Term)  
; Rabbitz (Term)  
: Awesome (Definition)
: Awesome (Definition)
: Awesomer (Definition)
: Awesomer (Definition)
: Awesomest (Definition)
: Awesomest (Definition)
</nowiki>
</nowiki>|
|
; Rabbitz (Term)  
; Rabbitz (Term)  
: Awesome (Definition)
: Awesome (Definition)
: Awesomer (Definition)
: Awesomer (Definition)
: Awesomest (Definition)
: Awesomest (Definition)}}<!-- Template:Mra -->
}}
----


===Font Color===
===Font color===


====Text Color====
====Text color====


{| class="wikitable"
{{markup|
!Markup
<nowiki>{{font color|red|Rabbitz is very awesome}}
!Renders as
</nowiki>|{{font color|red|Rabbitz is very awesome}}|
|-
<nowiki>{{font color|#e38690|Rabbitz is very awesome}}
|<code><nowiki>
</nowiki>|{{font color|#e38690|Rabbitz is very awesome}}}}<!-- Template:Mra -->
{{Font color|red|Rabbitz is very awesome}}
</nowiki></code>
|
{{Font color|red|Rabbitz is very awesome}}
|-
|
<code><nowiki>
{{Font color|#e38690|Rabbitz is very awesome}}
</nowiki></code>
|
{{Font color|#e38690|Rabbitz is very awesome}}
|}


====Text Color + Background Color====
====Text Color + Background Color====


{| class="wikitable"
{{markup|
!Markup
<nowiki>{{font color|red|tan|Rabbitz is very awesome}}
!Renders as
</nowiki>|{{font color|red|tan|Rabbitz is very awesome}}|
|-
<nowiki>{{font color|#e38690|tan|Rabbitz is very awesome}}
|<code><nowiki>
</nowiki>|{{font color|#e38690|tan|Rabbitz is very awesome}}|
{{Font color|red|tan|Rabbitz is very awesome}}
<nowiki>{{font color|tan|#e38690|Rabbitz is very awesome}}
</nowiki></code>
</nowiki>|{{font color|tan|#e38690|Rabbitz is very awesome}}|
|
<nowiki>{{font color|#c6cccc|#e38690|Rabbitz is very awesome}}
{{Font color|red|tan|Rabbitz is very awesome}}
</nowiki>|{{font color|#c6cccc|#e38690|Rabbitz is very awesome}}}}<!-- Template:Mra -->
|-
|<code><nowiki>
{{Font color|#e38690|tan|Rabbitz is very awesome}}
</nowiki></code>
|
{{Font color|#e38690|tan|Rabbitz is very awesome}}
|-
|
<code><nowiki>
{{Font color|tan|#e38690|Rabbitz is very awesome}}
</nowiki></code>
|
{{Font color|tan|#e38690|Rabbitz is very awesome}}
|-
|
<code><nowiki>
{{Font color|#c6cccc|#e38690|Rabbitz is very awesome}}
</nowiki></code>
|
{{Font color|#c6cccc|#e38690|Rabbitz is very awesome}}
|}


===Font===
===Font===


{| class="wikitable"
{{markup|
!Markup
<nowiki>{{font|Rabbitz is very awesome|font=Georgia}}
!Renders as
</nowiki>|{{font|Rabbitz is very awesome|font=Georgia}}}}<!-- Template:Mra -->
|-
|
<code><nowiki>
<span style="font-family:Garamond;">Rabbitz is very awesome</span>
</nowiki></code>
|
<span style="font-family:Garamond;">Rabbitz is very awesome</span>
|}
----
 
===Superscripts===


{|class= "wikitable"
===Superscript and subscript===
!Markup
!Renders as
|-
|<code><nowiki> Rabbitz is very<sup>awesome</sup>
</nowiki></code>
|Rabbitz is<sup>awesome</sup>
|}


===Subscript===
{{markup|
 
<nowiki>Rabbitz is very <sup>awesome</sup>
{|class= "wikitable"
</nowiki>|Rabbitz is very <sup>awesome</sup>|
!Markup
<nowiki>Rabbitz is <sub>awesome</sub>
!Renders as
</nowiki>|Rabbitz is <sub>awesome</sub>}}<!-- Template:Mra -->
|-
|<code><nowiki> Rabbitz is<sub>awesome</sub>
</nowiki></code>
|Rabbitz is very<sub>awesome</sub>
|}


=== Headings ===
=== Headings ===


{{see|wikipedia:Help:Wikitext#Section_headings|wikipedia:Help:Section}}
{{see|wikipedia:Help:Wikitext#Section headings|wikipedia:Help:Section}}


Headings are surrounded with equal signs (<code>=</code>). Heading 1, with one equals sign, is used for article titles and should not be used within articles. A table of contents will be generated automatically if there are four or more headings.
Headings are surrounded with equal signs (<code>=</code>). Heading 1, with one equals sign, is used for article titles and should not be used within articles. A table of contents will be generated automatically if there are four or more headings.


<!-- don't use subst:mra here, since it would generate real headings, not fake ones -->
{{markup
{{markup
|<nowiki>= Heading 1 =
|<nowiki>= Heading 1 =
Line 250: Line 152:
{{fake heading|sub=6|Heading 6}}
{{fake heading|sub=6|Heading 6}}
}}
}}
=== Newlines ===
Single newlines are ignored. To produce a new line in the article, you need to enter two newline characters in wikitext:
{{markup|
<nowiki>This is a
new line
</nowiki>|This is a
new line|
<nowiki>This is not a
new line
</nowiki>|This is not a
new line}}<!-- Template:Mra -->
== Invisible text (comments) ==
{{see|wikipedia:Help:Wikitext#Invisible text (comments)|wikipedia:Help:Hidden text}}
Comments are notes that are visible in the wikitext editor, but not in the "rendered" article that is visible to readers.
This may be useful, for example, to alert other editors to common mistakes, or to hide a section of a work-in-progress article but keep your wikitext, so it won't be lost forever.
The hidden text should be surrounded with <code><nowiki><!--</nowiki></code> and <code><nowiki>--></nowiki></code>. For example: <code><nowiki><!-- this text will be hidden except in 'edit' mode --></nowiki></code>
Comments can also cover multiple lines. For example:
<pre><nowiki>
<!-- This comment covers
multiple lines -->
</nowiki></pre>
<!-- See? You can only see this comment in edit mode. -->
Nesting comments inside of each other can produce odd results. If you somehow find a need for that, you can also use the {{tl|Void}} template, which can be abbreviated as {{tl|^}}.
== Links ==
{{see|wikipedia:Help:Wikitext#Links and URLs|wikipedia:Help:Link}}
=== Wikilinks ===
To link to another article, surround the name of the article in two square brackets. You can also change the text displayed.
{{markup|
<nowiki>[[the South Pacific]]
</nowiki>|[[the South Pacific]]|
<nowiki>[[the South Pacific|TSP]]
</nowiki>|[[the South Pacific|TSP]]}}<!-- Template:Mra -->
If you are editing roleplay pages, you may commonly use this to hide the canon from article names. For Pacifica, you may find it more convenient to use the template {{tl|Pacifica}}, which can be abbreviated as {{tl|Pa}}. (You can click on the name of the template to view its [[wikipedia:Help:Template documentation|documentation]] page, which explains how to use it.)
You can link to a section of a page with <code><nowiki>[[page name#section name]]</nowiki></code>.
[[Intentionally permanent red link|A red link]] indicates that the linked page does not exist yet.
=== External links ===
To link to a page outside of the wiki, use single square brackets. The text to be displayed is separated from the URL by a space.
{{markup|
<nowiki>[https://tspforums.xyz TSP Forums]
</nowiki>|[https://tspforums.xyz TSP Forums]}}<!-- Template:Mra -->
If you are creating an external link to NationStates, you may find it more convenient to use the templates {{tl|Nation}} for nation links or {{tl|Region}} for region links. (You can click on the name of the template to view its [[wikipedia:Help:Template documentation|documentation]] page, which explains how to use it.)
=== Wikipedia links ===
To link to a Wikipedia page, you can add the prefix <code>Wikipedia:</code> before the link:
{{markup|
<nowiki>[[wikipedia:NationStates]]
</nowiki>|[[wikipedia:NationStates]]|
<nowiki>[[wikipedia:NationStates|NationStates]]
</nowiki>|[[wikipedia:NationStates|NationStates]]}}<!-- Template:Mra -->
== Images ==
{{see|wikipedia:Help:Wikitext#Images|wikipedia:Help:Visual file markup}}
The basic markup for inserting an image is <code><nowiki>[[File:Example.jpg|thumb|Caption text]]</nowiki></code>. Other ways include:
{{markup|
<nowiki>[[File:Example.jpg|thumb|Caption text|alt=alternative text]]
</nowiki>|[[File:Example.jpg|thumb|Caption text|alt=alternative text]]|
<nowiki>[[File:Example.jpg|50 px]]
</nowiki>|[[File:Example.jpg|50 px]]|
<nowiki>[[:File:Example.jpg]]
</nowiki>|[[:File:Example.jpg]]}}<!-- Template:Mra -->
* Alternative text should contain a textual description of the image. It is used when the image is unavailable, loaded in a text-only browser, or spoken aloud. This is very helpful for making the webpage more accessible.
* All images from [https://commons.wikimedia.org/wiki/Main_Page Wikimedia Commons] are already available. To use other images, you'll need to [[Special:Upload|upload]] them. Please make sure you have the rights to use the image.
* A more complete list of less common ways to display images can be found [[wikipedia:Help:Wikitext#Images|here]].
<!-- TODO:
- templates
- tables
-->


__NOEDITSECTION__
__NOEDITSECTION__

Latest revision as of 16:43, 27 January 2022

The following guide serves as a guide to Wiki-text hosted on this wiki. If you'd like a general guide to editing pages, you can view the MediaWiki guide to editing pages here. A wikitext cheatsheet is available here.

Formatting text

These are the basics of wikitext:

Basic styles

Markup Renders as
'''Bold text'''

Bold text

''Italic text''

Italic text

'''''Bold and italic text'''''

Bold and italic text

<s>Strikethrough</s>

Strikethrough

<code>Code (monospaced)</code>

Code (monospaced)

Lists

Numbered list

Markup Renders as
#Rabbitz
#Gets
#More
#Awesome
##The
###More
####This
###List
##Goes
#On
  1. Rabbitz
  2. Gets
  3. More
  4. Awesome
    1. The
      1. More
        1. This
      2. List
    2. Goes
  5. On

Bulleted list

Markup Renders as
*Rabbitz
*Gets
*More
*Awesome
**The
***More
****This
***List
**Goes
*On
  • Rabbitz
  • Gets
  • More
  • Awesome
    • The
      • More
        • This
      • List
    • Goes
  • On

Term and definition list

Markup Renders as
; Rabbitz (Term) : Awesome (Definition)
Rabbitz (Term)
Awesome (Definition)
; Rabbitz (Term) 
: Awesome (Definition)
: Awesomer (Definition)
: Awesomest (Definition)
Rabbitz (Term)
Awesome (Definition)
Awesomer (Definition)
Awesomest (Definition)

Font color

Text color

Markup Renders as
{{font color|red|Rabbitz is very awesome}}

Rabbitz is very awesome

{{font color|#e38690|Rabbitz is very awesome}}

Rabbitz is very awesome

Text Color + Background Color

Markup Renders as
{{font color|red|tan|Rabbitz is very awesome}}

Rabbitz is very awesome

{{font color|#e38690|tan|Rabbitz is very awesome}}

Rabbitz is very awesome

{{font color|tan|#e38690|Rabbitz is very awesome}}

Rabbitz is very awesome

{{font color|#c6cccc|#e38690|Rabbitz is very awesome}}

Rabbitz is very awesome

Font

Markup Renders as
{{font|Rabbitz is very awesome|font=Georgia}}

Rabbitz is very awesome

Superscript and subscript

Markup Renders as
Rabbitz is very <sup>awesome</sup>

Rabbitz is very awesome

Rabbitz is <sub>awesome</sub>

Rabbitz is awesome

Headings

Headings are surrounded with equal signs (=). Heading 1, with one equals sign, is used for article titles and should not be used within articles. A table of contents will be generated automatically if there are four or more headings.

Markup Renders as
= Heading 1 =
== Heading 2 ==
=== Heading 3 ===
==== Heading 4 ====
===== Heading 5 =====
====== Heading 6 ======
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

Newlines

Single newlines are ignored. To produce a new line in the article, you need to enter two newline characters in wikitext:

Markup Renders as
This is a

new line

This is a

new line

This is not a
new line

This is not a new line

Invisible text (comments)

Comments are notes that are visible in the wikitext editor, but not in the "rendered" article that is visible to readers.

This may be useful, for example, to alert other editors to common mistakes, or to hide a section of a work-in-progress article but keep your wikitext, so it won't be lost forever.

The hidden text should be surrounded with <!-- and -->. For example: <!-- this text will be hidden except in 'edit' mode -->

Comments can also cover multiple lines. For example:

<!-- This comment covers
multiple lines -->

Nesting comments inside of each other can produce odd results. If you somehow find a need for that, you can also use the {{Void}} template, which can be abbreviated as {{^}}.

Links

Wikilinks

To link to another article, surround the name of the article in two square brackets. You can also change the text displayed.

Markup Renders as
[[the South Pacific]]
[[the South Pacific|TSP]]

TSP

If you are editing roleplay pages, you may commonly use this to hide the canon from article names. For Pacifica, you may find it more convenient to use the template {{Pacifica}}, which can be abbreviated as {{Pa}}. (You can click on the name of the template to view its documentation page, which explains how to use it.)

You can link to a section of a page with [[page name#section name]].

A red link indicates that the linked page does not exist yet.

External links

To link to a page outside of the wiki, use single square brackets. The text to be displayed is separated from the URL by a space.

Markup Renders as
[https://tspforums.xyz TSP Forums]

If you are creating an external link to NationStates, you may find it more convenient to use the templates {{Nation}} for nation links or {{Region}} for region links. (You can click on the name of the template to view its documentation page, which explains how to use it.)

Wikipedia links

To link to a Wikipedia page, you can add the prefix Wikipedia: before the link:

Markup Renders as
[[wikipedia:NationStates]]
[[wikipedia:NationStates|NationStates]]

Images

The basic markup for inserting an image is [[File:Example.jpg|thumb|Caption text]]. Other ways include:

Markup Renders as
[[File:Example.jpg|thumb|Caption text|alt=alternative text]]
alternative text
Caption text
[[File:Example.jpg|50 px]]

[[:File:Example.jpg]]
  • Alternative text should contain a textual description of the image. It is used when the image is unavailable, loaded in a text-only browser, or spoken aloud. This is very helpful for making the webpage more accessible.
  • All images from Wikimedia Commons are already available. To use other images, you'll need to upload them. Please make sure you have the rights to use the image.
  • A more complete list of less common ways to display images can be found here.