20,473
edits
m (link fix) |
(lots of formatting and wording touch-ups, plus a few factual corrections) |
||
| Line 4: | Line 4: | ||
==Text formatting== | ==Text formatting== | ||
===Common formatting=== | ===Common formatting=== | ||
The most common way to emphasize or set apart some text in a line is to use apostrophes to create italicized and bold text:<br | The most common way to emphasize or set apart some text in a line is to use apostrophes to create italicized and bold text:<br> | ||
<code><nowiki>''Using two''</nowiki></code> will give you ''italics''.<br | <code><nowiki>''Using two''</nowiki></code> will give you ''italics''.<br> | ||
<code><nowiki>'''Using three'''</nowiki></code> will give you '''bold'''. | <code><nowiki>'''Using three'''</nowiki></code> will give you '''bold'''. | ||
Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br | Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br> | ||
<code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>. | <code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>. | ||
===Monospace and unformatted text=== | ===Monospace and unformatted text=== | ||
This line actually starts with a " " character. | This line actually starts with a " " character. This places it inside a box with a fixed-size font. Keep doing this for consecutive lines to set apart a whole block of text (e.g. programming code). | ||
The previous line is only empty in the rendered box; if you edit this page, you'll see the " " character in the wiki markup. | The previous line is only empty in the rendered box; if you edit this page, you'll see the " " character in the wiki markup. This prevents the box from ending whenever there is an empty line in your block of text. The next line is empty; notice how the box ends and a new one starts with the next space-prefixed line. | ||
You can still put text in ''italics'', '''bold''', or '''''bold italics'''''. | You can still put code block text in ''italics'', '''bold''', or '''''bold italics'''''. | ||
There are several other formatting options – the <nowiki><pre></nowiki>, <nowiki><tt></nowiki>, <nowiki><code></nowiki>, and <nowiki><nowiki></nowiki> tags – which will not be discussed in-depth here, but play around with them to see how they behave slightly differently from each other. | |||
There are several other options | |||
==Line formatting== | ==Line formatting== | ||
Everyone likes lists. Below are four methods for listing items. | Everyone likes lists. Below are four methods for listing items. | ||
'''Normal newlines'''<br | '''Normal newlines'''<br> | ||
A quirk of wiki markup is that two consecutive lines will be displayed as one line. In other words, a single newline is ignored. This actually goes back to the fact that wiki markup is based on HTML | A quirk of wiki markup is that two consecutive lines will be displayed as one line. In other words, a single newline is ignored. This actually goes back to the fact that wiki markup is based on HTML which behaves the same way. Instead of hitting Return once to start a new line, you need to hit it twice. Alternately, you can force a linebreak at any time with the <nowiki><br></nowiki> tag. | ||
'''Numbered lists'''<br | '''Numbered lists'''<br> | ||
#This line | #This line's markup begins with a "#" character. | ||
##This line | ##This line begins with two "#" characters. | ||
##So does this one. | ##So does this one. | ||
#Here's the next single-"#" line. | #Here's the next single-"#" line. | ||
'''Bulleted lists'''<br | '''Bulleted lists'''<br> | ||
*This line | *This line's markup begins with a "*" character. | ||
**This line begins with two "*" | **This line begins with two "*"s. | ||
'''Indented paragraphs'''<br | '''Indented paragraphs'''<br> | ||
:This line begins with a ":" character. The whole paragraph will | :This line begins with a ":" character. The whole paragraph will use this indentation. | ||
:When starting a second indented line, you don't need to put an extra newline after the previous line like you normally would. | :When starting a second indented line, you don't need to put an extra newline after the previous line like you normally would. | ||
::The more ":"s you put at the start of the line, the more indentation you get. | ::The more ":"s you put at the start of the line, the more indentation you get. | ||
'''Titled paragraphs'''<br | '''Titled paragraphs'''<br> | ||
;This line starts with a ";" | ;This line starts with a ";" | ||
:Starting the next line with a ":" creates the impression of a paragraph under a title, useful for typesetting word definitions, dialogue lines, etc. | :Starting the next line after a ";" line with a ":" creates the impression of a paragraph under a title, useful for typesetting word definitions, dialogue lines, etc. | ||
==Links== | ==Links== | ||
Basically, there are thee types of links: (1) links to external pages and files, (2) intrawiki links to other pages on the wiki, and (3) interwiki links. | Basically, there are thee types of links: (1) links to external pages and files, (2) intrawiki links to other pages on the wiki, and (3) interwiki links to other wiki projects. | ||
===External links=== | ===External links=== | ||
;Labeled links | |||
Write the following to get some text acting as an ''outgoing'' hyperlink. | |||
'''['''<nowiki>https://discord.com/invite/eqDMnkD here is our Discord server</nowiki>''']''' | '''['''<nowiki>https://discord.com/invite/eqDMnkD here is our Discord server</nowiki>''']''' | ||
The result is: [https://discord.com/invite/eqDMnkD here is our Discord server] | The result is: [https://discord.com/invite/eqDMnkD here is our Discord server] | ||
;Unlabeled links | |||
If you omit the label text, the result will be different: | |||
here '''['''<nowiki>https://discord.com/invite/eqDMnkD</nowiki>''']''' is our Discord server | here '''['''<nowiki>https://discord.com/invite/eqDMnkD</nowiki>''']''' is our Discord server | ||
The result is: here [https://discord.com/invite/eqDMnkD] is our Discord server. However, this is not our usual style on this wiki; you should always label your links. | The result is: here [https://discord.com/invite/eqDMnkD] is our Discord server. | ||
However, this is not our usual style on this wiki; you should always label your links. | |||
;Bare links | |||
You can also use bare naked URLs without any markup like this: | |||
here is our Discord server: <nowiki>https://discord.com/invite/eqDMnkD</nowiki> | |||
The result is: here is our Discord server: https://discord.com/invite/eqDMnkD | |||
This is generally considered ugly in comparison to a labeled link. However you can embed external images inline if you use their bare URL like this. | |||
===Intrawiki links=== | ===Intrawiki links=== | ||
"Intrawiki" refers to links to other pages on | "Intrawiki" refers to links to other pages on the same wiki. Simply write the following to get an intrawiki link: | ||
<nowiki>[[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]</nowiki> | <nowiki>[[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]</nowiki> | ||
| Line 79: | Line 76: | ||
The result is this: [[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]] | The result is this: [[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]] | ||
Write the following to get an intrawiki link which is labeled with some text: | |||
<nowiki>[[OniSplit#Download_links|You can download OniSplit here]]</nowiki> | <nowiki>[[OniSplit#Download_links|You can download OniSplit here]]</nowiki> | ||
| Line 85: | Line 82: | ||
The result is this: [[OniSplit#Download_links|You can download OniSplit here]] | The result is this: [[OniSplit#Download_links|You can download OniSplit here]] | ||
You should never place full URLs to pages on this wiki, e.g. <nowiki>http://wiki.oni2.net/</nowiki>OniSplit#Download_links, because intrawiki links allow various features of the wiki to work properly such as "What links here" and the [[Special:LonelyPages|orphaned pages]] list. | |||
===Interwiki links=== | ===Interwiki links=== | ||
You can link to pages on wikis in the Wikimedia family, e.g. [[wikt:Wiktionary:Main_Page|Wiktionary]], [[wp:Main_Page|Wikipedia]] and [[metawikimedia:Main_Page|Meta-Wiki]], as if they were pages of our own wiki by adding the shortcuts '''<nowiki>wiktionary:</nowiki>''', '''<nowiki>wikipedia:</nowiki>''' and '''<nowiki>metawikimedia:</nowiki>''' within double brackets. When you make an interwiki link, the outbound link icon changes from | You can link to pages on wikis in the Wikimedia family, e.g. [[wikt:Wiktionary:Main_Page|Wiktionary]], [[wp:Main_Page|Wikipedia]] and [[metawikimedia:Main_Page|Meta-Wiki]], as if they were pages of our own wiki by adding the shortcuts '''<nowiki>wiktionary:</nowiki>''', '''<nowiki>wikipedia:</nowiki>''' and '''<nowiki>metawikimedia:</nowiki>''' within double brackets. When you make an interwiki link, the outbound link icon changes from a blue arrow to a green arrow to show that you are linking to a fellow wiki, not some random web site. | ||
An example of using an interwiki prefix would be | An example of using an interwiki prefix would be <code><nowiki>[[wikipedia:Test]]</nowiki></code>, which produces [[wikipedia:Test]]. You can supply label text using the syntax <code><nowiki>[[wikipedia:Test|Test]]</nowiki></code> to get rid of that pesky prefix in the final markup: [[wikipedia:Test|Test]]. These prefixes accept language codes, so you could use the markup <code><nowiki>[[wikipedia:de:Test|Test]]</nowiki></code> to link to the German article [[wikipedia:de:Test|Test]]. | ||
All of the Wikimedia Foundation's projects have prefixes available for linking to them. Also note that we have handy shortcuts for the two most-used prefixes; '''wikipedia:''' can be shortened to '''wp:''' and '''wiktionary:''' can be shortened to '''wikt:'''. The complete list of currently supported interwiki links can be obtained by clicking [https://wiki.oni2.net/w/api.php?action=query&meta=siteinfo&siprop=interwikimap here]. | All of the Wikimedia Foundation's projects have prefixes available for linking to them. Also note that we have handy shortcuts for the two most-used prefixes; '''wikipedia:''' can be shortened to '''wp:''' and '''wiktionary:''' can be shortened to '''wikt:'''. The complete list of currently supported interwiki links can be obtained by clicking [https://wiki.oni2.net/w/api.php?action=query&meta=siteinfo&siprop=interwikimap here]. | ||
Looking at the list, you'll see that some prefixes are not actually for other wikis | Looking at the list, you'll see that some prefixes are not actually for other wikis but general web shortcuts; '''google:''' produces a Google search query for the provided search term, and '''cache:''' produces a Google page cache query for the provided URL. | ||
==Images and categories== | ==Images and categories== | ||
To place an image, you type its name inside of double brackets preceded by "Image:", e.g. <code><nowiki>[[Image:TXMPPOSTER3.png]]</nowiki></code>. This markup will be replaced by the named image. If you only want to link to an image, not display it, you type <code><nowiki>[[:Image:TXMPPOSTER3.png]]</nowiki></code> to get [[:Image:TXMPPOSTER3.png]]. | To place an image which has been uploaded to the wiki, you type its name inside of double brackets preceded by "Image:", e.g. <code><nowiki>[[Image:TXMPPOSTER3.png]]</nowiki></code>. This markup will be replaced by the named image. If you only want to link to an image, not display it, you type <code><nowiki>[[:Image:TXMPPOSTER3.png]]</nowiki></code> to get [[:Image:TXMPPOSTER3.png]]. | ||
Categories work the same way. Every page on the wiki should be placed into at least one category using this kind of markup, placed at the end of the page: <code><nowiki>[[Category:Policies and documentation]]</nowiki></code>. This will cause the name of the category to appear at the bottom of the page. However, if you only want to link to a category page, not place the current page into that category, you use the same technique as linking to an image page: <code><nowiki>[[:Category:Policies and documentation]]</nowiki></code> gives you [[:Category:Policies and documentation]]. To see what categories are available, you can look at the [[Site Map]]. | Categories work the same way. Every page on the wiki should be placed into at least one category using this kind of markup, placed at the end of the page: <code><nowiki>[[Category:Policies and documentation]]</nowiki></code>. This will cause the name of the category to appear at the bottom of the page. However, if you only want to link to a category page, not place the current page into that category, you use the same technique as linking to an image page: <code><nowiki>[[:Category:Policies and documentation]]</nowiki></code> gives you [[:Category:Policies and documentation]]. To see what categories are available, you can look at the [[Site Map]]. | ||
==Templates and transclusion== | ==Templates and transclusion== | ||
Text can be "transcluded" from one place on the wiki to another using <nowiki>{{ | Text can be "transcluded" from one place on the wiki to another using this markup: <code><nowiki>{{:Quotes/Consoles/level_1h}}</nowiki></code>. Transclusion means that whenever the original text is updated, so is the text wherever the transclusion is performed. Transclusion is most commonly used in order to invoke templates, which can perform various handy functions. However when you transclude a template you can leave off the leading colon and the namespace; that is, instead of <code><nowiki>{{:Template:SomeTemplate|some parameter}}</nowiki></code> you only need to write <code><nowiki>{{SomeTemplate:some parameter}}</nowiki></code>. [[:Category:Templates|Here's a list]] of our wiki's templates. Click on one and then click on "What links here": you should see a list of pages, each one probably followed by "{{nbwj}}(transclusion)". Look at the wiki markup for those pages to see how the template was utilized on the page. | ||
Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded, and which often use magic words (terms with special meaning to the MediaWiki parser) to provide logic (but again, this logic can be used on any page). Templates usually provide a standardized format for something like a table, header or footer, e.g. [[:Template:OBD File Footer]]. You should familiarize yourself with our templates if you plan to do a decent amount of editing; they are not only time-savers but they also help editors make their edits fit in with OniGalore standards | Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded, and which often use magic words (terms with special meaning to the MediaWiki parser) to provide logic (but again, this logic can be used on any page). Templates usually provide a standardized format for something like a table, header or footer, e.g. [[:Template:OBD File Footer]]. You should familiarize yourself with our templates if you plan to do a decent amount of editing; they are not only time-savers but they also help editors make their edits fit in with OniGalore standards and can make it easier to update large amounts of wiki text at once. | ||
==Tables== | ==Tables== | ||
| Line 134: | Line 131: | ||
Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables). | Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables). | ||
To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code>{| style=" | To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code><nowiki>{| style="{{center}}"</nowiki></code>. To right-align it, use <code>"float:right;"</code> instead. | ||
You can add styling directives to individual columns, rows and cells like this: | You can add styling directives to individual columns, rows and cells like this: | ||
| Line 166: | Line 163: | ||
Some of these "tricks" are very simple in practice, but hard to remember. This is basically a list of bookmarks to helpful examples around the wiki. Remember to also look at our [[templates]], which perform additional tricks that are not all documented below. | Some of these "tricks" are very simple in practice, but hard to remember. This is basically a list of bookmarks to helpful examples around the wiki. Remember to also look at our [[templates]], which perform additional tricks that are not all documented below. | ||
*Alphabetic footnotes: [[Quotes/Manual]] | *Alphabetic footnotes: [[Quotes/Manual]] | ||
*Indenting wrapped | *Indenting wrapped lines: [[Walkthrough]] | ||
*Justified text: [[Oni2:Aftermath]] | *Justified text: [[Oni2:Aftermath]] | ||
*Math extension usage: [[OBD:SNDD]], [[XML:OBAN]] | *Math extension usage: [[OBD:SNDD]], [[XML:OBAN]] | ||