User:Jasonkwe/Useful-syntax
Copy of wiki syntax that I often forget and have to look up
Basic webpage citation format <ref name="adfas">{{cite web |last1= |first1= |title= |url= |website= |access-date= |archive-url= |archive-date= |date=}}</ref>
{{convert|2.54|kg|lb|abbr=on}}
{{convert|680|mm|in|abbr=on}}
{{convert|2|-|5|km|mi|2|abbr=on}} → 2–5 km (1.24–3.11 mi)
{{convert|2|x|6|x|9|cm|in|2|abbr=on}} ->
*{{convert|920|g|oz|abbr=on}} w/ battery (PVS-17A/B)
*{{convert|26|x|15|x|10|cm|in|1|abbr=on}} (PVS-17A/B)
A forced line break <br>
When linking, the real article's name always goes first
[[United States Special Operations Command|USSOCOM]]
So it renders as USSOCOM
Citing a source multiple times but with different pages, best to use shortened footnotes and place the book in "Sources" within the References section
blah blah blah.{{sfn|Elk|1972|p=5}
==References==
{{reflist|refs=
<ref>{{Cite web |last=Murphy |first=Jack |date=22 June 2013 |title=Evolution of the 75th Ranger Regiment: RRD |url=https://thenewsrep.com/21408/75th-ranger-regiment-regimental-reconnaissance-detachment/ |archive-url=https://web.archive.org/web/20181113210615/https://thenewsrep.com/21408/75th-ranger-regiment-regimental-reconnaissance-detachment/ |archive-date=13 November 2018 |website=TheNewsRep |accessdate=13 November 2018}}</ref>
}}
===Sources===
{{refbegin}}
* {{cite book |last=Elk |first=Anne |title=[[Anne Elk's Theory on Brontosauruses]] |date=November 16, 1972}}
{{refend}}
Text blah blah.<ref name="example ref"/>
More text blah.<ref name="another ref example"/>
==References==
{{Reflist|refs=
<ref name="example ref">the reference itself</ref>
<ref name="another ref example">the reference itself</ref>
}}
Renders as
References
[edit]
For footnotes that read "Note 1", "Note 2", "Note 3", etc, use NoteTag and NoteFoot
{{NoteTag|name=fn1|This is the first note}} {{NoteTag|name=fn2|A second note}}
{{NoteFoot|refs=
}}
Notes
[edit]
For footnotes alongside references (Caution: don't use quotes around the footnote names. Just use {{efn|name=fn1|blah blah}}, not {{efn|name="fnote-1"|blah blah}} )
NOTE: Do not try to nest list-defined references within list-defined footnotes. It will not work and will only cause misery. Instead, just place the efn right next to the text, keep the list-defined references (for citations) since they're the more annoying
Text blah blah.<ref name="example ref1"/>{{notetag||group=note|name=fn1}}
Some more text example.<ref name="another ref example1"/>
Text with just a footnote alone.{{notetag|name=fn2}}
==References==
{{Reflist|refs=
<ref name="example ref1">the first reference itself</ref>
<ref name="another ref example1">the second reference itself</ref>
}}
==Notes==
{{notefoot|refs=
{{notetag|name=fn1|Footnote #1's text here}}
{{notetag|name=fn2|Footnote #2's text here; this would show up after the third sentence up above}}
}}
Renders as
Text blah blah.[1][a]
Some more text example.[2]
Text with just a footnote alone.[b]
References
[edit]
Notes
[edit]
Can also anchor a shortened footnote (sfn) with a specific name by using "SfnRef", especially if the source lacks an author which sfn could latch onto
{{sfn|RS 500|2004}}
{{cite news |work=[[Rolling Stone]] |title=The RS 500 Greatest Songs of All Time |ref={{SfnRef|RS500|2004}} |date=December 2004}}
For escaping wikitext parser (ie. making sure that a portion of text is not interpreted as wikitext code)
<nowiki>[[Example]] </nowiki>
<blockquote>
Text that is being blockquoted
</blockquote>
For adding a single indent (tab)
{{pad|4.0em}}
{{reply to|Username}}
For indenting (nested) (usually used on talk pages)
Use the colons to add successive layers of indents
:Like here
::Use an extra colon for each response (inserts an extra indent)
Renders as
Use the colons to add successive layers of indents
- Like here
- Use an extra colon for each response (inserts an extra indent)
To purge a page's cache on wiki servers and force it to update
?action=purge