Formatting – Bohemia Interactive Community
m (Text replacement - "{{Inline code|" to "{{ic|") |
|||
(44 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Community Wiki]]<br clear="all"> | |||
[[File:BIKI Editor Help.PNG|thumb|The text editor comes with some basic text formatting tips|500px]] | |||
== Text formatting markup == | |||
== Text formatting markup == | |||
{| class="wikitable" | {| class="wikitable" | ||
! Description | ! Description | ||
! width="40%" | | ! width="40%" | You type | ||
! width="40%" | | ! width="40%" | You get | ||
|- | |- | ||
! colspan="3" style="background: #ABE" | | ! colspan="3" style="background: #ABE" | Character (inline) formatting – ''applies anywhere'' | ||
|- | |- | ||
| Italic text | | Italic text | ||
Line 31: | Line 31: | ||
| | | | ||
'''''bold & italic''''' | '''''bold & italic''''' | ||
|- | |||
| Colored text | |||
| <pre> | |||
<span style="color: red;">Colour</span> | |||
</pre> | |||
| | |||
<span style="color: red;">Colour</span> | |||
|- | |||
| Spoiler | |||
| <pre> | |||
<spoiler text="Click me!">spoiler</spoiler> | |||
</pre> | |||
| | |||
<spoiler text="Click me!">spoiler</spoiler> | |||
|- | |- | ||
| Escape wiki markup | | Escape wiki markup | ||
Line 57: | Line 71: | ||
</pre> | </pre> | ||
|Text can be made <big>bigger like this</big> | |Text can be made <big>bigger like this</big> | ||
|- | |||
|Teletype | |||
|<pre> | |||
Highlight <tt>TAG_someVariable</tt> in a text | |||
</pre> | |||
|Highlight <tt>TAG_someVariable</tt> in a text | |||
|- | |- | ||
! colspan="3" style="background: #ABE" | Section formatting – ''only at the beginning of the line'' | ! colspan="3" style="background: #ABE" | Section formatting – ''only at the beginning of the line'' | ||
|- | |- | ||
| Section Headings of different levels | | Section Headings of different levels | ||
| <pre> | | <pre> | ||
== Level 2 == | == Level 2 == | ||
=== Level 3 === | === Level 3 === | ||
==== Level 4 ==== | ==== Level 4 ==== | ||
===== Level 5 ===== | ===== Level 5 ===== | ||
====== Level 6 ====== | ====== Level 6 ====== | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|important| | ||
* Do not put any text on the same line after the ending equal signs. | * Do not put any text on the same line after the ending equal signs. | ||
* An article with 4 or more headings automatically creates a | * An article with 4 or more headings automatically creates a '''T'''able '''o'''f '''C'''ontents (ToC) - unless setting the magic word <tt><nowiki>__NOTOC__</nowiki></tt>. | ||
* You can use a right-side ToC with the [[Template:TOC|{{<nowiki/>TOC|side}} template]]. | |||
* Recommended spacing: | |||
** Add spaces between the title itself and the equal signs | |||
** '''Two''' empty lines before a '''Level 2''' title, one after | |||
** '''One''' empty line before a '''Level 3''' title, one after | |||
** '''One''' empty line before a '''Level 4..6''' title, '''none''' after. | |||
}} | }} | ||
| | | | ||
Line 95: | Line 121: | ||
---- | ---- | ||
|- | |- | ||
| | | Horizontal rule | ||
| <pre> | | <pre> | ||
Text before | Text before | ||
Line 122: | Line 148: | ||
like this. | like this. | ||
|- | |- | ||
| | | Indent text | ||
| <pre> | | <pre> | ||
: Single indent | : Single indent | ||
Line 239: | Line 155: | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|Informative|This workaround may harm accessibility.}} | ||
| | | | ||
Line 247: | Line 163: | ||
|- | |- | ||
| | | Mixture of different types of list | ||
| | | | ||
<pre> | <pre> | ||
Line 268: | Line 184: | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|Informative|The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also harm accessibility.}} | ||
| | | | ||
Line 289: | Line 205: | ||
|- | |- | ||
| | | Preformatted text | ||
| <pre> | | <pre> | ||
Start each line with a space. | Start each line with a space. | ||
Line 296: | Line 212: | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|Informative|This way of preformatting only applies to section formatting. Character formatting markups are still effective.}} | ||
| | | | ||
Start each line with a space. | Start each line with a space. | ||
Line 303: | Line 219: | ||
|- | |- | ||
| | | Preformatted text blocks | ||
| <pre> <nowiki> | | <pre> <nowiki> | ||
Start with a space in the first column, | Start with a space in the first column, | ||
Line 347: | Line 263: | ||
|} | |} | ||
== HTML tags == | |||
== HTML tags == | |||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Description | ||
! width="40%" | | ! width="40%" | You type | ||
! width="40%" | | ! width="40%" | You get | ||
|- | |- | ||
| | | Inserted <br />(Displays as underline in most browsers) | ||
| <pre> | | <pre> | ||
<ins> Inserted</ins> | <ins> Inserted</ins> | ||
Line 377: | Line 284: | ||
<u> Underline</u> | <u> Underline</u> | ||
|- | |- | ||
| | | Deleted <br />(Displays as strikethrough in most browsers) | ||
| <pre> | | <pre> | ||
<s> Struck out</s> | <s> Struck out</s> | ||
Line 393: | Line 300: | ||
<del> Deleted</del> | <del> Deleted</del> | ||
|- | |- | ||
| | | Blockquotes | ||
| <pre> | | <pre> | ||
Text before | Text before | ||
Line 419: | Line 311: | ||
Text after | Text after | ||
|- | |- | ||
| | | Quotes | ||
| <pre><q> This is a quotation</q></pre> | | <pre><q> This is a quotation</q></pre> | ||
{{ | {{Feature|important|The q element '''must not''' be used in place of quotation marks that do not represent quotes; for example, it is inappropriate to use the q element for marking up sarcastic statements.<ref>[https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element HTML Living Standard—The <'''q'''> element]</ref>}} | ||
| <q> This is a quotation</q> | | <q> This is a quotation</q> | ||
|- | |- | ||
| | | Comment | ||
| <pre> | | <pre> | ||
<!-- This is a comment --> | <!-- This is a comment --> | ||
Comments are visible only | Comments are visible only | ||
in the edit zone. | in the edit zone. | ||
</pre> | </pre> | ||
| | | | ||
<!-- This is a comment -->Comments are visible only | <!-- This is a comment -->Comments are visible only | ||
in the edit zone. | in the edit zone. | ||
|- | |- | ||
| | | Completely preformatted text | ||
| <pre> | | <pre> | ||
<pre> | <pre> | ||
Text is '''preformatted''' and | Text is '''preformatted''' and | ||
''markups'' '''''cannot''''' be done</pre> | ''markups'' '''''cannot''''' be done</pre> | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|Informative|For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.}} | ||
| | | | ||
<pre> | <pre> | ||
Text is '''preformatted''' and | Text is '''preformatted''' and | ||
''markups'' '''''cannot''''' be done | ''markups'' '''''cannot''''' be done | ||
</pre> | </pre> | ||
|- | |- | ||
| | | '''Customized''' preformatted text | ||
| <pre> | | <pre> | ||
<pre style="color: red"> | <pre style="color: red"> | ||
Text is '''preformatted''' | Text is '''preformatted''' | ||
with a style and | with a style and | ||
''markups'' '''''cannot''''' be done | ''markups'' '''''cannot''''' be done | ||
</pre> | </pre> | ||
</pre> | </pre> | ||
---- | ---- | ||
{{ | {{Feature|Informative|A CSS style can be defined within the <code>style</code> attribute.}} | ||
| | | | ||
<pre style="color: red"> | <pre style="color: red"> | ||
Text is '''preformatted''' | Text is '''preformatted''' | ||
with a style and | with a style and | ||
''markups'' '''''cannot''''' be done | ''markups'' '''''cannot''''' be done | ||
</pre> | </pre> | ||
Line 474: | Line 366: | ||
continued: | continued: | ||
{| class="wikitable" style="table-layout: fixed; width: 100%" | | {| class="wikitable" style="table-layout: fixed; width: 100%" | | ||
! | ! Description | ||
! width="40%" | | ! width="40%" | You type | ||
! width="40%" | | ! width="40%" | You get | ||
|- | |- | ||
| | | '''Default''' preformatted text has a CSS attribute (<code>white-space: pre-wrap;</code>) to wrap the text according to available width | ||
| <pre> | | <pre> | ||
<pre> | <pre> | ||
Line 489: | Line 381: | ||
</pre> | </pre> | ||
|- | |- | ||
| | | '''Customized''' preformatted text with '''disabled''' text wrapping | ||
| <pre> | | <pre> | ||
<pre style="white-space: pre;"> | <pre style="white-space: pre;"> | ||
Line 501: | Line 393: | ||
|} | |} | ||
== Inserting symbols == | == Inserting symbols == | ||
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. | |||
Many [http://www.howtogeek.com/210824/how-to-quickly-type-special-characters-on-any-computer-smartphone-or-tablet/ Operating Systems and browsers] allow you to insert special characters through a menu option or Operating System panel. | |||
As a last resort, you can use a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) '''&rarr;''' when inserted will be shown as <ins>right arrow</ins> HTML symbol → and '''&mdash;''' when inserted will be shown as an <ins>em dash</ins> HTML symbol —. | |||
As a last resort, you can use a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) '''&rarr;''' when inserted will be shown as <ins>right arrow</ins> HTML symbol → and '''&mdash;''' when inserted will be shown as an <ins>em dash</ins> HTML symbol —. | |||
---- | ---- | ||
{{ | {{Feature|Informative|Hover over any character to find out the symbol that it produces. Some symbols not available in the current font will appear as empty squares.}} | ||
{| class="wikitable" width="100%" align="center" | {| class="wikitable" width="100%" align="center" | ||
Line 776: | Line 668: | ||
{| class="wikitable" | {| class="wikitable" | ||
! | ! Description | ||
! width="40%" | | ! width="40%" | You type | ||
! width="40%" | | ! width="40%" | You get | ||
|- | |- | ||
| | | Copyright symbol | ||
| class="mw-code" | &copy; | | class="mw-code" | &copy; | ||
| | | | ||
:::'''©''' | :::'''©''' | ||
|- | |- | ||
| | | Greek delta letter symbol | ||
| class="mw-code" |&delta; | | class="mw-code" |&delta; | ||
| | | | ||
:::'''δ''' | :::'''δ''' | ||
|- | |- | ||
| | | Euro currency symbol | ||
| class="mw-code" |&euro; | | class="mw-code" |&euro; | ||
| | | | ||
Line 796: | Line 688: | ||
|} | |} | ||
== HTML tags and symbol entities displayed themselves (with and without interpreting them) == | |||
== HTML tags and symbol entities displayed themselves (with and without interpreting them) == | |||
:<code>&amp;euro;</code> → '''&euro;''' | :<code>&amp;euro;</code> → '''&euro;''' | ||
Line 806: | Line 696: | ||
:<code> <nowiki>&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></code> → '''<span style="color: red; text-decoration: line-through;"> Typo to be corrected</span>''' | :<code> <nowiki>&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></code> → '''<span style="color: red; text-decoration: line-through;"> Typo to be corrected</span>''' | ||
=== Nowiki for HTML === | === Nowiki for HTML === | ||
<<nowiki/>nowiki /> | <<nowiki/>nowiki /> can prohibit (HTML) tags: | ||
* <nowiki><<</nowiki>nowiki />pre> → <<nowiki/>pre> | * <nowiki><<</nowiki>nowiki />pre> → <<nowiki/>pre> | ||
But ''not'' & symbol escapes: | But ''not'' & symbol escapes: | ||
Line 815: | Line 705: | ||
To print & symbol escapes as text, use "<code>&amp;</code>" to replace the "&" character (eg. type "<code>&amp;nbsp;</code>", which results in "<code>&nbsp;</code>") | To print & symbol escapes as text, use "<code>&amp;</code>" to replace the "&" character (eg. type "<code>&amp;nbsp;</code>", which results in "<code>&nbsp;</code>") | ||
---- | == Code Formatting == | ||
* Use <tt>syntaxhighlight</tt> with option "cpp" to highlight Config (see example below) | |||
* Use '''tab alignment''' in Config - '''not''' spaces | |||
* Keep some space in Config, e.g: <syntaxhighlight lang="cpp"> | |||
class exampleClass | |||
{ | |||
stringValue="value"; // bad | |||
stringValue = "value"; // good | |||
arrayValue = {0,0.5,0,1}; // bad | |||
arrayValue = { 0, 0.5, 0, 1 }; // good | |||
}; | |||
</syntaxhighlight> | |||
** Before and after <tt>=</tt> | |||
** In Array definitions | |||
** Try to align a batch of comments together ('''with tabs''') | |||
{{Feature | Informative | If you have to put an equal sign (<tt>{{=}}</tt>) inside a template (<tt>{{ }}</tt>), use the [[Template:=|equal template]]: <tt><nowiki>{{=}}</nowiki></tt>.}} | |||
{| class="wikitable" width = "100%" | |||
|- | |||
! Description !! You type !! You get | |||
|- | |||
| Inline Code || <pre>{{ic|Inline code}}</pre> || {{ic|Inline code}} | |||
|- | |||
| Code || <pre><code>Code</code></pre> || <code>Code</code> | |||
|- | |||
| One-line Code Comment || <pre>{{cc|Code comment}}</pre> || {{cc|Code comment}} | |||
|- | |||
| Code Comment || <pre>{{codecomment|Code comment}}</pre> || {{codecomment|Code comment}} | |||
|- | |||
| Syntaxhighlight<br>"cpp" = C++ highlight || <pre><syntaxhighlight lang="cpp"> | |||
class exampleClass | |||
{ | |||
value1 = 1; | |||
value2 = "value2"; | |||
}; | |||
</syntaxhighlight></pre> | |||
| <syntaxhighlight lang="cpp"> | |||
class exampleClass | |||
{ | |||
value1 = 1; | |||
value2 = "value2"; | |||
}; | |||
</syntaxhighlight> | |||
|} | |||
== Lists == | |||
Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list. | Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list. | ||
===Unordered lists=== | === Unordered lists === | ||
<table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | <table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | ||
<th scope="col" style="width:50%;">Markup</th> | <th scope="col" style="width:50%;">Markup</th> | ||
<th scope="col" style="width:50%;">Renders as | <th scope="col" style="width:50%;">Renders as | ||
</th></tr> | </th></tr> | ||
<tr> | <tr> | ||
Line 856: | Line 793: | ||
<td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | <td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | ||
=== | ==== Unordered, multi column, list ==== | ||
<table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | <table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | ||
<th scope="col" style="width:50%;">Markup</th> | <th scope="col" style="width:50%;">Markup</th> | ||
<th scope="col" style="width:50%;">Renders as | <th scope="col" style="width:50%;">Renders as | ||
</th></tr> | |||
<tr> | |||
<td style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"><pre style="margin:0;border:none;padding:0; word-wrap:break-word; white-space:-moz-pre-wrap;white-space:-o-pre-wrap;white-space:-pre-wrap;white-space:pre-wrap;"> | |||
<div style="columns: 3"> | |||
* {{arma3}} | |||
* {{arma2}} | |||
* {{arma1}} | |||
* {{ofp}} | |||
</div></pre> | |||
</td> | |||
<td style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid solid none solid;border-color:#ddd; padding:5px; vertical-align:top;"><div style=""> | |||
<p></p> | |||
<div style="columns: 3"> | |||
* {{arma3}} | |||
* {{arma2}} | |||
* {{arma1}} | |||
* {{ofp}} | |||
</div> | |||
</td></tr> | |||
<tr> | |||
<td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td> | |||
<td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | |||
=== Ordered lists === | |||
<table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | |||
<th scope="col" style="width:50%;">Markup</th> | |||
<th scope="col" style="width:50%;">Renders as | |||
</th></tr> | </th></tr> | ||
<tr> | <tr> | ||
Line 891: | Line 856: | ||
<td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | <td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | ||
=== | === Description lists === | ||
To list terms and definitions, start a new line with a semicolon (;) followed by the term. Then, type a colon (:) followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc. | To list terms and definitions, start a new line with a semicolon (;) followed by the term. Then, type a colon (:) followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc. | ||
Line 900: | Line 866: | ||
<table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | <table style="table-layout:fixed; width:100%; margin-top:0;margin-left:0; border-width:medium; padding:0;"><tr> | ||
<th scope="col" style="width:50%;">Markup</th> | <th scope="col" style="width:50%;">Markup</th> | ||
<th scope="col" style="width:50%;">Renders as | <th scope="col" style="width:50%;">Renders as | ||
</th></tr> | </th></tr> | ||
<tr> | <tr> | ||
Line 909: | Line 875: | ||
<dl><dt>Term </dt> | <dl><dt>Term </dt> | ||
<dd>Definition1</dd></dl> | <dd>Definition1</dd></dl> | ||
</div> | </div> | ||
</td></tr> | </td></tr> | ||
<tr> | <tr> | ||
Line 931: | Line 897: | ||
<td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | <td style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"></td></tr></table> | ||
HTML equivalent: | HTML equivalent: <nowiki><dl>, <dt> <dd>, <dl></nowiki> | ||
== Links == | |||
=== Internal Links === | |||
In most wikis, internal links are used in wikitext markup instead of regular urls to simplify linking and reading | In most wikis, internal links are used in wikitext markup instead of regular urls to simplify linking and reading | ||
{| class="wikitable" | {| class="wikitable" width = "100%" | ||
! Description | ! Description | ||
! width="40%" | | ! width="40%" | You type | ||
! width="40%" | | ! width="40%" | You get | ||
|- | |- | ||
| Internal link | | Internal link | ||
| <pre>Arma is made by | | <pre>Arma is made by [[Bohemia Interactive]].</pre> | ||
| Arma is made by [[Bohemia Interactive]]. | | Arma is made by [[Bohemia Interactive]]. | ||
|- | |- | ||
Line 978: | Line 947: | ||
|} | |} | ||
====Link to a section of a page==== | ==== Link to a section of a page ==== | ||
You can add the specific section you want to link by adding the seciton title to the link after a # (hash). | You can add the specific section you want to link by adding the seciton title to the link after a # (hash). | ||
{| class="wikitable" | {| class="wikitable" width = "100%" | ||
!Description !! You type !! You get | |||
! | |||
|- | |- | ||
| <pre>[[Wikipedia:Manual of Style#Italics]] | | Link to a section within another page | ||
| [[Wikipedia:Manual of Style#Italics]] | | <pre>[[Wikipedia:Manual of Style#Italics]]</pre> | ||
| [[Wikipedia:Manual of Style#Italics]] | |||
|- | |- | ||
| <pre>[[Wikipedia:Manual of Style#Italics|Italics]] | | Piped link to a section within another page. | ||
| [[Wikipedia:Manual of Style#Italics|Italics]] | | <pre>[[Wikipedia:Manual of Style#Italics|Italics]]</pre> | ||
| [[Wikipedia:Manual of Style#Italics|Italics]]. | |||
|- | |- | ||
|} | |} | ||
====Blended links==== | ==== Blended links ==== | ||
{| class="wikitable" | {| class="wikitable" width = "100%" | ||
! Desctiption !! You type !! You get | |||
! | |||
|- | |- | ||
| Blending active | | Blending active | ||
Line 1,008: | Line 976: | ||
|} | |} | ||
===Redirects=== | === Redirects === | ||
Redirects are used to redirect specific pages to another page. | Redirects are used to redirect specific pages to another page. | ||
{| class="wikitable" | {| class="wikitable" width = "100%" | ||
!Description | ! Description !! You type | ||
! | |||
|- | |- | ||
| | |Redirect to an article | ||
Redirect to an article | |<code><nowiki>#REDIRECT [[United States]] </nowiki></code> | ||
| | |||
<code><nowiki>#REDIRECT [[United States]] </nowiki></code> | |||
|- | |- | ||
| | |Redirect to a section | ||
Redirect to a section | |<code><nowiki>#REDIRECT [[United States#History]]</nowiki></code> | ||
| | |||
<code><nowiki>#REDIRECT [[United States#History]]</nowiki></code> | |||
|} | |} | ||
===Link to another namespace=== | |||
{| class="wikitable" | === Link to another namespace === | ||
{| class="wikitable" width = "100%" | |||
!What you type | !What you type | ||
!What it looks like | !What it looks like | ||
Line 1,034: | Line 1,000: | ||
See the [[Wikipedia:Manual of Style]]. | See the [[Wikipedia:Manual of Style]]. | ||
|} | |} | ||
===Categories=== | |||
=== Categories === | |||
{| class="wikitable" | |||
{| class="wikitable" width = "100%" | |||
!Description | !Description | ||
! | !You type | ||
! | !You get | ||
|- | |- | ||
| Add article to category | | Add article to category | ||
Line 1,053: | Line 1,020: | ||
| [[:Category:Character sets|Character sets]] | | [[:Category:Character sets|Character sets]] | ||
|} | |} | ||
{| class="wikitable" | === External links === | ||
External links link to external websites other than the Biki. These links are in url format. | |||
{| class="wikitable" width = "100%" | |||
!Description | !Description | ||
! | !You type | ||
! | !You get | ||
|- | |- | ||
| Named link with an external link icon | | Named link with an external link icon | ||
Line 1,075: | Line 1,044: | ||
| Bare URL | | Bare URL | ||
(Bad style) | (Bad style) | ||
use <nowiki><nowiki></nowiki></nowiki> to keep this bad style from showing | use <nowiki><nowiki></nowiki></nowiki> to keep this bad style from showing | ||
Line 1,093: | Line 1,062: | ||
|} | |} | ||
==Images== | == Images == | ||
{| class="wikitable" | {| class="wikitable" width = "100%" | ||
! | !Description | ||
! | !You type | ||
!You get | |||
|- | |- | ||
| <code><nowiki>[[Image: | | Simple image without description | ||
| [[Image: | | <code><nowiki>[[Image:Logo_A3_black.png]] or [File:Logo_A3_black.png]]</nowiki> </code> | ||
| [[Image:Logo_A3_black.png]] | |||
|- | |- | ||
| <code><nowiki>[[ | | Thumb image with description, defined size and aligned right. Size can by any number. Alignment can be (left, right and center) | ||
| [[ | | <code><nowiki>[[Image:Logo_A3_black.png|thumb|right|100px|Some description]]</nowiki></code> | ||
| [[Image:Logo_A3_black.png|thumb|right|100px|Some description]] | |||
|} | |} | ||
== Tables == | == Tables == | ||
There are multiple ways to make tables in wikitext. Recommended are: | |||
* Table tool in the text editor | |||
* [https://www.tablesgenerator.com/mediawiki_tables Table Generator] | |||
{{Feature|Informative|Make sure the raw text is well formatted so it is easier to edit later.}} | |||
== Useful templates == | |||
{{Feature|Informative|Visit [[:Category:Templates]], to see a complete list of available templates.}} | |||
{| class="wikitable" width = "100%" | |||
! Template || Code || Result | |||
|- | |||
| rowspan="4" | [[Template:Wiki]] | |||
| <pre>{{Wiki|delete|reason}}</pre> | |||
| {{Messagebox|'''This article has been submitted for''' <big>deletion</big>'''.''' '''The reason given was:''' reason'''.'''|🗙|#F00}} | |||
|- | |||
| <pre>{{Wiki|merge}}</pre> | |||
| {{Messagebox|This article has been proposed to merge with [[Main Page]].|<div style{{=}}"font-size: .75em; line-height: .6em">↘<br>↗</div><!--↣-->|blueviolet}} | |||
|- | |||
| <pre>{{Wiki|stub}}</pre> | |||
| <div class="notice metadata" id="stub">''This article is a [[:Category:Stubs|Stub]]. You can help BI Community Wiki by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]</span>.''</div> | |||
|- | |||
| <pre>{{Wiki|WIP}}</pre> | |||
| {{Messagebox|This article is a '''work in progress'''!|🏗|dodgerblue}} | |||
|- | |||
| rowspan="6" | [[Template:Feature]]<br>See {{Template|Feature}} for all the available types. | |||
| <pre>{{Feature|arma3|text}}</pre> | |||
| {{Feature|arma3|text}} | |||
|- | |||
| <pre>{{Feature|informative|text}}</pre> | |||
| {{Feature|Informative|text}} | |||
|- | |||
| <pre>{{Feature|important|important text}}</pre> | |||
| {{Feature|important|text}} | |||
|- | |||
| <pre>{{Feature|warning|text}}</pre> | |||
| {{Feature|warning|text}} | |||
|- | |||
| <pre>{{Feature|obsolete}}</pre> | |||
| {{Feature|obsolete}} | |||
|- | |||
| <pre>{{Feature|quote|Gastovski, out!|James Gastovski | |||
|https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}}</pre> | |||
| {{Feature|quote|Gastovski, out!|James Gastovski|https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}} | |||
|- | |||
| [[Template:GVI]] | |||
| <pre>{{GVI|arma3|version}}</pre> | |||
| {{GVI|arma3|1.96}} | |||
|- | |||
| [[Template:cn]] | |||
| <pre>{{cn}}</pre> | |||
<pre>{{cn|Miller is a nice guy}}</pre> | |||
| {{cn}}<br> | |||
{{cn|Miller is a nice guy}} | |||
|- | |||
| [[Template:Icon]] | |||
| <pre>{{Icon|serverExec|32}} | |||
{{Icon|globalArgument|32}} | |||
{{Icon|localArgument|32}} | |||
{{Icon|globalEffect|32}} | |||
{{Icon|localEffect|32}}</pre> | |||
| | |||
{{Icon|serverExec|32}} | |||
{{Icon|globalArgument|32}} | |||
{{Icon|localArgument|32}} | |||
{{Icon|globalEffect|32}} | |||
{{Icon|localEffect|32}} | |||
|} | |||
[[Category:Community Wiki]] |
Revision as of 19:12, 27 February 2021
Text formatting markup
Description | You type | You get |
---|---|---|
Character (inline) formatting – applies anywhere | ||
Italic text | ''italic'' |
italic |
Bold text | '''bold''' |
bold |
Bold and italic | '''''bold & italic''''' |
bold & italic |
Colored text | <span style="color: red;">Colour</span> |
Colour |
Spoiler | <spoiler text="Click me!">spoiler</spoiler> |
spoiler |
Escape wiki markup | <nowiki> no ''markup''</nowiki> |
no ''markup'' |
Small chunks of source code within a line of normal text.
Code is displayed in a monospace font. |
function <code>int m2()</code> is nice. |
function int m2() is nice.
|
Small text | Text can be made <small>smaller like this</small> |
Text can be made smaller like this |
Big text | Text can be made <big>bigger like this</big> |
Text can be made bigger like this |
Teletype | Highlight <tt>TAG_someVariable</tt> in a text |
Highlight TAG_someVariable in a text |
Section formatting – only at the beginning of the line | ||
Section Headings of different levels | == Level 2 == === Level 3 === ==== Level 4 ==== ===== Level 5 ===== ====== Level 6 ====== |
Level 2
Level 4 Level 5 Level 6 |
Horizontal rule | Text before ---- Text after |
Text before Text after |
Line Breaks | A single newline here has no effect on the layout. But an empty line starts a new paragraph, or ends a list or an indented part. Lines can be forced to break <br> like this. |
A single newline here has no effect on the layout.
But an empty line starts a new paragraph, or ends a list or an indented part. Lines can be forced to break like this. |
Indent text | : Single indent :: Double indent ::::: Multiple indent |
|
Mixture of different types of list |
# one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead <br />of <nowiki><br /></nowiki> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2 |
|
Preformatted text | Start each line with a space. Text is '''preformatted''' and ''markups'' '''''can''''' be done. |
Start each line with a space. Text is preformatted and markups can be done. |
Preformatted text blocks | <nowiki> Start with a space in the first column, (before the <tvar|1><nowiki></>). Then your block format will be maintained. This is good for copying in code blocks: def function(): """ documentation string""" if True: print True else: print False<nowiki> |
Start with a space in the first column, (before the <nowiki>). Then your block format will be maintained. This is good for copying in code blocks: def function(): """ documentation string""" if True: print True else: print False |
HTML tags
Description | You type | You get |
---|---|---|
Inserted (Displays as underline in most browsers) |
<ins> Inserted</ins> or <u> Underline</u> |
Inserted or Underline |
Deleted (Displays as strikethrough in most browsers) |
<s> Struck out</s> or <del> Deleted</del> |
or
|
Blockquotes | Text before <blockquote> Blockquote</blockquote> Text after |
Text before
Text after |
Quotes | <q> This is a quotation</q> |
This is a quotation |
Comment | <!-- This is a comment --> Comments are visible only in the edit zone. |
Comments are visible only in the edit zone. |
Completely preformatted text | <pre> Text is '''preformatted''' and ''markups'' '''''cannot''''' be done</pre> |
Text is '''preformatted''' and ''markups'' '''''cannot''''' be done |
Customized preformatted text | <pre style="color: red"> Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done </pre> |
Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done |
continued:
Description | You type | You get |
---|---|---|
Default preformatted text has a CSS attribute (white-space: pre-wrap; ) to wrap the text according to available width
|
<pre> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. </pre> |
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. |
Customized preformatted text with disabled text wrapping | <pre style="white-space: pre;"> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. </pre> |
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. |
Inserting symbols
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. Many Operating Systems and browsers allow you to insert special characters through a menu option or Operating System panel.
As a last resort, you can use a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) → when inserted will be shown as right arrow HTML symbol → and — when inserted will be shown as an em dash HTML symbol —.
HTML symbol entities | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Á | á | Â | â | ´ | Æ | æ | À | à | ℵ | Α | α | & | ∧ | ∠ | Å | å | ≈ | Ã | ã | Ä | ä | „ | Β | β | ¦ | • | ∩ | Ç | ç | ¸ | ¢ |
Χ | χ | ˆ | ♣ | ≅ | © | ↵ | ∪ | ¤ | † | ‡ | ↓ | ⇓ | ° | Δ | δ | ♦ | ÷ | É | é | Ê | ê | È | è | ∅ | Ε | ε | ≡ | Η | η | ||
Ð | ð | Ë | ë | € | ∃ | ƒ | ∀ | ½ | ¼ | ¾ | ⁄ | Γ | γ | ≥ | > | ↔ | ⇔ | ♥ | … | Í | í | Î | î | ¡ | Ì | ì | ℑ | ∞ | ∫ | Ι | ι |
¿ | ∈ | Ï | ï | Κ | κ | Λ | λ | ⟨ | « | ← | ⇐ | ⌈ | “ | ≤ | ⌊ | ∗ | ◊ | | ‹ | ‘ | < | ¯ | — | µ | · | − | Μ | μ | ∇ | – | |
≠ | ∋ | ¬ | ∉ | ⊄ | Ñ | ñ | Ν | ν | Ó | ó | Ô | ô | Œ | œ | Ò | ò | ‾ | Ω | ω | Ο | ο | ⊕ | ∨ | ª | º | Ø | ø | Õ | õ | ⊗ | Ö |
ö | ¶ | ∂ | ‰ | ⊥ | Φ | φ | Π | π | ϖ | ± | £ | ′ | ″ | ∏ | ∝ | Ψ | ψ | " | √ | ⟩ | » | → | ⇒ | ⌉ | ” | ℜ | ® | ⌋ | Ρ | ρ | |
› | ’ | ‚ | Š | š | ⋅ | § | | Σ | σ | ς | ∼ | ♠ | ⊂ | ⊆ | ∑ | ⊃ | ¹ | ² | ³ | ⊇ | ß | Τ | τ | ∴ | Θ | θ | ϑ | Þ | þ | ˜ | |
× | ™ | Ú | ú | ↑ | ⇑ | Û | û | Ù | ù | ¨ | ϒ | Υ | υ | Ü | ü | ℘ | Ξ | ξ | Ý | ý | ¥ | ÿ | Ÿ | Ζ | ζ | | |
Description | You type | You get |
---|---|---|
Copyright symbol | © |
|
Greek delta letter symbol | δ |
|
Euro currency symbol | € |
|
HTML tags and symbol entities displayed themselves (with and without interpreting them)
&euro;
→ €
<span style="color: red; text-decoration: line-through;"> Typo to be corrected</span>
→ Typo to be corrected
<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>
→ <span style="color: red; text-decoration: line-through;"> Typo to be corrected</span>
Nowiki for HTML
<nowiki /> can prohibit (HTML) tags:
- <<nowiki />pre> → <pre>
But not & symbol escapes:
- &<nowiki />amp; → &
To print & symbol escapes as text, use "&
" to replace the "&" character (eg. type "&nbsp;
", which results in "
")
Code Formatting
- Use syntaxhighlight with option "cpp" to highlight Config (see example below)
- Use tab alignment in Config - not spaces
- Keep some space in Config, e.g:
class exampleClass { stringValue="value"; // bad stringValue = "value"; // good arrayValue = {0,0.5,0,1}; // bad arrayValue = { 0, 0.5, 0, 1 }; // good };
- Before and after =
- In Array definitions
- Try to align a batch of comments together (with tabs)
Description | You type | You get |
---|---|---|
Inline Code | {{ic|Inline code}} |
Inline code
|
Code | <code>Code</code> |
Code
|
One-line Code Comment | {{cc|Code comment}} |
// Code comment |
Code Comment | {{codecomment|Code comment}} |
Code comment |
Syntaxhighlight "cpp" = C++ highlight |
<syntaxhighlight lang="cpp"> class exampleClass { value1 = 1; value2 = "value2"; }; </syntaxhighlight> |
class exampleClass
{
value1 = 1;
value2 = "value2";
};
|
Lists
Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list.
Unordered lists
Markup | Renders as |
---|---|
* Item1 * Item2 * Item3 * Item4 ** Sub-item 4 a) *** Sub-item 4 a) 1. **** Sub-item 4 a) 1. i) **** Sub-item 4 a) 1. ii) ** Sub-item 4 b) * Item5 |
|
Unordered, multi column, list
Markup | Renders as |
---|---|
<div style="columns: 3"> * {{arma3}} * {{arma2}} * {{arma1}} * {{ofp}} </div> |
|
Ordered lists
Markup | Renders as |
---|---|
# Item1 # Item2 # Item3 # Item4 ## Sub-item 1 ### Sub-sub-item #### Sub-sub-sub-item ## Sub-item 2 # Item5 |
|
Description lists
To list terms and definitions, start a new line with a semicolon (;) followed by the term. Then, type a colon (:) followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc.
Description lists (formerly definition lists, and a.k.a. association lists) consist of group names corresponding to values. Group names (terms) are in bold. Values (definitions) are indented. Each group must include one or more definitions. For a single or first value, the :
can be placed on the same line after ;
– but subsequent values must be placed on separate lines.
Do not use a semicolon (;) simply to bold a line without defining a value using a colon (:). This usage renders invalid HTML5 and creates issues with screen readers.
Markup | Renders as |
---|---|
; Term : Definition1 |
|
; Term : Definition1 : Definition2 : Definition3 : Definition4 |
|
HTML equivalent: <dl>, <dt> <dd>, <dl>
Links
Internal Links
In most wikis, internal links are used in wikitext markup instead of regular urls to simplify linking and reading
Description | You type | You get |
---|---|---|
Internal link | Arma is made by [[Bohemia Interactive]]. |
Arma is made by Bohemia Interactive. |
Renamed link | Ylands is also made by [[Bohemia Interactive|BI]]. |
Ylands is also made by BI. |
Auto renamed links (pipe trick) | ||
Auto renamed link (pipe trick) | [[createTrigger (VBS1)|]] |
createTrigger |
Automatically hide stuff in parentheses | [[createTrigger (VBS1)|]] |
createTrigger |
Automatically hide the comma and following text | [[Seattle, Washington|]] |
Seattle |
Automatically hide namespace | [[Wikipedia:Village pump|]] |
Village pump |
Or both | [[Wikipedia:Manual of Style (headings)|]] |
Manual of Style |
Does not work for section links | [[Wikipedia:Manual of Style#Links|]] |
[[Wikipedia:Manual of Style#Links|]] |
Link to a section of a page
You can add the specific section you want to link by adding the seciton title to the link after a # (hash).
Description | You type | You get |
---|---|---|
Link to a section within another page | [[Wikipedia:Manual of Style#Italics]] |
Wikipedia:Manual of Style#Italics |
Piped link to a section within another page. | [[Wikipedia:Manual of Style#Italics|Italics]] |
Italics. |
Blended links
Desctiption | You type | You get |
---|---|---|
Blending active | San Francisco also has [[public transport]]ation. Examples include [[bus]]es, [[taxicab]]s, and [[tram]]s. |
San Francisco also has public transportation. Examples include buses, taxicabs, and trams. |
Blending supressed | A [[micro-]]<nowiki />second. |
A micro-second. |
Redirects
Redirects are used to redirect specific pages to another page.
Description | You type |
---|---|
Redirect to an article | #REDIRECT [[United States]]
|
Redirect to a section | #REDIRECT [[United States#History]]
|
Link to another namespace
What you type | What it looks like |
---|---|
|
See the Wikipedia:Manual of Style. |
Categories
Description | You type | You get |
---|---|---|
Add article to category | [[Category:Character sets]]
|
|
Link to a category | [[:Category:Character sets]]
|
Category:Character sets |
Without prefix. | [[:Category:Character sets|]]
|
Character sets |
External links
External links link to external websites other than the Biki. These links are in url format.
Description | You type | You get |
---|---|---|
Named link with an external link icon | [http://www.wikipedia.org Wikipedia]
|
Wikipedia |
Unnamed link
(Used only within article body for footnotes) |
|
|
Bare URL
(Bad style) use <nowiki></nowiki> to keep this bad style from showing |
|
|
Link without arrow (Not often used) |
|
Images
Tables
There are multiple ways to make tables in wikitext. Recommended are:
- Table tool in the text editor
- Table Generator
Useful templates
Template | Code | Result |
---|---|---|
Template:Wiki | {{Wiki|delete|reason}} |
|
{{Wiki|merge}} |
||
{{Wiki|stub}} |
||
{{Wiki|WIP}} |
||
Template:Feature See {{Feature}} for all the available types. |
{{Feature|arma3|text}} |
|
{{Feature|informative|text}} |
||
{{Feature|important|important text}} |
||
{{Feature|warning|text}} |
||
{{Feature|obsolete}} |
||
{{Feature|quote|Gastovski, out!|James Gastovski |https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}} |
||
Template:GVI | {{GVI|arma3|version}} |
1.96 |
Template:cn | {{cn}} {{cn|Miller is a nice guy}} |
[citation needed] Miller is a nice guy [citation needed] |
Template:Icon | {{Icon|serverExec|32}} {{Icon|globalArgument|32}} {{Icon|localArgument|32}} {{Icon|globalEffect|32}} {{Icon|localEffect|32}} |