Formatting – Bohemia Interactive Community
Lou Montana (talk | contribs) m (Text replacement - "{{merge" to "{{Merge") |
Lou Montana (talk | contribs) m (Fix template usage) |
||
Line 1,132: | Line 1,132: | ||
| <sup><nowiki>[</nowiki>''[[Template:cn|citation needed]]''<nowiki>]</nowiki></sup> | | <sup><nowiki>[</nowiki>''[[Template:cn|citation needed]]''<nowiki>]</nowiki></sup> | ||
|- | |- | ||
| [[Template: | | [[Template:Merge]] | ||
| <pre>{{Merge|article}}</pre> | | <pre>{{Merge|article}}</pre> | ||
| {{Messagebox|This article has been proposed to merge with [[article]].|⇄|blueviolet}} | | {{Messagebox|This article has been proposed to merge with [[article]].|⇄|blueviolet}} | ||
Line 1,149: | Line 1,149: | ||
| <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> | | <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> | ||
|- | |- | ||
| [[Template: | | [[Template:Quote]] | ||
| <pre>{{Quote|Gastovski, out!|James Gastovski | | <pre>{{Quote|Gastovski, out!|James Gastovski | ||
|https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}}</pre> | |https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}}</pre> |
Revision as of 23:20, 11 January 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 | {{Inline code|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:errors | {{errors|reason}} |
|
Template:Delete | {{Delete|reason}} |
|
Template:Feature | {{Feature|arma3|text}} |
|
Template:GVI | {{GVI|arma3|version}} |
DEV |
Template:Informative | {{Informative|text}} |
|
Template:Important | {{Important|important text!}} |
|
Template:Warning | {{Warning|text}} |
|
Template:cn | {{cn}} |
[citation needed] |
Template:Merge | {{Merge|article}} |
|
Template:WIP | {{WIP}} |
|
Template:AnswerMe | {{AnswerMe|question}} |
|
Template:Stub | {{Stub}} |
|
Template:Quote | {{Quote|Gastovski, out!|James Gastovski |https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}} |
Template:Quote |
Template:ServerExec | {{ServerExec}} |
Template:ServerExec |
Template:Outdated | {{Outdated}} |
Template:Outdated |