Wikitext cheat sheet: Difference between revisions

From RetroWikipedia
Jump to navigation Jump to search
Created page with "= Wikitext Cheat Sheet = == Text Formatting == * ''Italic'' → 2 apostrophes: <code>''Italic''</code> * '''Bold''' → 3 apostrophes: <code>'''Bold'''</code> * '''''Bold Italic''''' → 5 apostrophes: <code>'''''Bold Italic'''''</code> * <nowiki><nowiki>Text</nowiki></nowiki> → Renders raw wikitext * <code><nowiki>Code</nowiki></code> → For inline code (use <nowiki><syntaxhighlight></nowiki> for blocks) == Headings == Use equal signs (=) around text: <pre> = Headi..."
 
m Protected "Wikitext cheat sheet" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Wikitext Cheat Sheet =
= Wikitext Cheat Sheet =
== Introduction ==
This cheat sheet summarizes standard wiki markup used on RetroWikipedia. Articles should follow clear structure, neutral tone, and consistent style. For citations, use reliable secondary sources when applicable.


== Text Formatting ==
== Text Formatting ==
* ''Italic'' → 2 apostrophes: <code>''Italic''</code>
* Italic: <code>''italic''</code>
* '''Bold''' → 3 apostrophes: <code>'''Bold'''</code>
* Bold (first mention only): <code>'''bold'''</code>
* '''''Bold Italic''''' → 5 apostrophes: <code>'''''Bold Italic'''''</code>
* Bold italic (rare): <code>'''''bold italic'''''</code>
* <nowiki><nowiki>Text</nowiki></nowiki> → Renders raw wikitext
* Code or literals: <code><code>example</code></code>
* <code><nowiki>Code</nowiki></code> → For inline code (use <nowiki><syntaxhighlight></nowiki> for blocks)
* Escape wikitext: <code><nowiki>[[Not a link]]</nowiki></code>


== Headings ==
== Headings ==
Use equal signs (=) around text:
Use sentence case for section titles. Don’t skip heading levels.
 
<pre>
<pre>
= Heading 1 =
= Page title =       ← not shown in body, handled by the software
== Heading 2 ==
== Overview ==
=== Heading 3 ===
=== Subsection ===
==== Deeper subsection ====
</pre>
</pre>
== Lists ==
* Unordered list: <code>* Item</code>
* Nested list: <code>** Sub-item</code>
# Ordered list: <code># Step 1</code>
#* Mixed list: <code>#* Sub-step</code>


== Links ==
== Links ==
* Internal page: <code>[[PageName]]</code>
* Internal: <code>[[RetroComputing]]</code>
* Custom text: <code>[[PageName|Display Text]]</code>
* Custom label: <code>[[RetroComputing|retro tech]]</code>
* Section link: <code>[[PageName#Section]]</code>
* Section link: <code>[[Apple II#Expansion cards]]</code>
* External link: <code>[https://example.com]</code>
* External: <code>[https://example.com Example]</code>
* External w/ text: <code>[https://example.com Label]</code>
* Avoid overlinking the same term more than once per section.


== Media ==
== Lists ==
* Image: <code>[[File:Image.jpg|thumb|Caption]]</code>
* Bulleted: <code>* Item</code>
* Audio: <code>[[File:Audio.ogg]]</code>
* Numbered: <code># Step</code>
* Video: <code>[[File:Video.webm]]</code>
* Nested:
 
== Tables ==
<pre>
<pre>
{| class="wikitable"
* Item
! Header 1 !! Header 2
** Sub-item
|-
# Step
| Row 1, Cell 1 || Row 1, Cell 2
## Sub-step
|-
| Row 2, Cell 1 || Row 2, Cell 2
|}
</pre>
</pre>
== Templates ==
* Use a template: <code>{{TemplateName}}</code>
* With parameters: <code>{{TemplateName|param1|param2=value}}</code>


== Block Elements ==
== Block Elements ==
* Indent: <code>:</code> for discussion/talk pages only
* Horizontal rule: <code>----</code>
* Horizontal rule: <code>----</code>
* Indent text: <code>:</code> at the start of a line
* Definition list:
* Definition list:
<pre>
<pre>
Line 58: Line 48:
</pre>
</pre>


== Code Highlighting ==
== Templates ==
Use syntax highlighting for code blocks:
* Call template: <code>{{Infobox computer}}</code>
* With parameters: <code>{{Infobox computer | name = Apple II }}</code>
* Place templates above the lead (e.g., hatnotes, infoboxes)
 
== Categories ==
* At the bottom of the page:
<code>[[Category:Vintage Computing]]</code>
* One category per line. Use the most specific appropriate category.
 
== Code and Syntax Highlighting ==
Use only for technical material (e.g., BASIC, assembly):
 
<pre>
<pre>
<syntaxhighlight lang="c">
<syntaxhighlight lang="basic">
int main() {
10 PRINT "HELLO WORLD"
    return 0;
20 GOTO 10
}
</syntaxhighlight>
</syntaxhighlight>
</pre>
</pre>
== Tables ==
Use only when data is better presented in rows/columns:
<pre>
{| class="wikitable"
! Model !! Release Year
|-
| Commodore 64 || 1982
|-
| Amiga 500 || 1987
|}
</pre>
== Images and Media ==
<pre>
[[File:Example.jpg|thumb|Alt text for accessibility|Caption]]
</pre>
* Always include alt text or descriptive captions.
* Default image alignment is right (`thumb` implies it).
* Do not overload pages with decorative images.


== Magic Words ==
== Magic Words ==
* Hide Table of Contents: <code>__NOTOC__</code>
* Hide TOC: <code>__NOTOC__</code>
* Force TOC: <code>__FORCETOC__</code>
* Force TOC: <code>__FORCETOC__</code>
* Current page name: <code>{{PAGENAME}}</code>
* Page name: <code>{{PAGENAME}}</code>
* Current user: <code>{{USER}}</code>


== Category Tags ==
== Best Practices ==
Add pages to categories:
* Use proper punctuation and grammar.
<code>[[Category:Retro Computers]]</code>
* Write in neutral, encyclopedic tone.
 
* Avoid first-person or promotional language.
== Useful HTML Tags ==
* Structure articles consistently:
Allowed: <code>&lt;div&gt;</code>, <code>&lt;span&gt;</code>, <code>&lt;br /&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;small&gt;</code>, <code>&lt;sub&gt;</code>, <code>&lt;sup&gt;</code>
<pre>
 
== Overview ==
== Tips ==
== History ==
* Use <nowiki><nowiki></nowiki></nowiki> to display literal wiki markup
== Features ==
* Combine templates with parser functions for dynamic content
== Reception ==
* Use the Preview button before saving!
== References ==
== External links ==
</pre>
* Use the Preview button before saving.


----
----
''This cheat sheet is for contributors helping preserve digital history on RetroWikipedia.''
''This guide helps contributors follow consistent style and formatting on RetroWikipedia. For help, see the community portal or editing guidelines.''

Latest revision as of 16:24, 3 August 2025

Wikitext Cheat Sheet

Introduction

This cheat sheet summarizes standard wiki markup used on RetroWikipedia. Articles should follow clear structure, neutral tone, and consistent style. For citations, use reliable secondary sources when applicable.

Text Formatting

  • Italic: italic
  • Bold (first mention only): bold
  • Bold italic (rare): bold italic
  • Code or literals: example
  • Escape wikitext: [[Not a link]]

Headings

Use sentence case for section titles. Don’t skip heading levels.

= Page title =        ← not shown in body, handled by the software
== Overview ==
=== Subsection ===
==== Deeper subsection ====

Links

Lists

  • Bulleted: * Item
  • Numbered: # Step
  • Nested:
* Item
** Sub-item
# Step
## Sub-step

Block Elements

  • Indent: : for discussion/talk pages only
  • Horizontal rule: ----
  • Definition list:
; Term
: Definition

Templates

  • Call template:
    Wikitext cheat sheet
  • With parameters:
    Apple II
  • Place templates above the lead (e.g., hatnotes, infoboxes)

Categories

  • At the bottom of the page:

  • One category per line. Use the most specific appropriate category.

Code and Syntax Highlighting

Use only for technical material (e.g., BASIC, assembly):

<syntaxhighlight lang="basic">
10 PRINT "HELLO WORLD"
20 GOTO 10
</syntaxhighlight>

Tables

Use only when data is better presented in rows/columns:

{| class="wikitable"
! Model !! Release Year
|-
| Commodore 64 || 1982
|-
| Amiga 500 || 1987
|}

Images and Media

[[File:Example.jpg|thumb|Alt text for accessibility|Caption]]
  • Always include alt text or descriptive captions.
  • Default image alignment is right (`thumb` implies it).
  • Do not overload pages with decorative images.

Magic Words

  • Hide TOC:
  • Force TOC:
  • Page name: Wikitext cheat sheet

Best Practices

  • Use proper punctuation and grammar.
  • Write in neutral, encyclopedic tone.
  • Avoid first-person or promotional language.
  • Structure articles consistently:
== Overview ==
== History ==
== Features ==
== Reception ==
== References ==
== External links ==
  • Use the Preview button before saving.

This guide helps contributors follow consistent style and formatting on RetroWikipedia. For help, see the community portal or editing guidelines.