User:Netjeff/Cheatsheet about editing
From Wikipedia, the free encyclopedia
This is my cheatsheet about editing Wikipedia pages.
Wikipedia's Manual of Style
Citations/refs in general
For footnotes using inline citation/ref use <ref>...</ref>, with optional <ref name="...">. Then towards end of page use template {{RefList}} once.
See Help:Footnotes for general guidance & recommendations.
The most freeform is "naked" use of <ref name="...">...</ref>
Use a template inside of <ref> to give more structure and automatic formatting.
One of the most generic is template {{Citation}}. This is known as "Citation Style 1" aka "CS1".
There are "children" of {{Citation}}.
- "General use" citations, including {{Cite web}} and {{Cite news}}
- "Specific source" citations, including
{{Cite IETF}} - Templates that "wrap other CS1 templates", including
- {{Cite tweet}} that wraps {{Cite web}}
- {{OpenStreetMap maps}} that wraps {{Cite map}}
All the "children" can use all of the params of general {{Citation}}.
Citation to short story "Moriarty by Modem" in the anthology Sherlock Holmes in Orbit
Using {{Cite book}} with chapter=story |chapter-url=storyurl, then title=anthology. If there was an url for the overall anthology, I would have added a url=anthologyurl. FYI, I added/updated this citation on Analytical engine.
- Nimersheim, Jack (1995). "Moriarty by Modem". Sherlock Holmes in Orbit. DAW Books. pp. 287–302. ISBN 9780886776367. Archived from the original on 2003-06-20. Retrieved 2023-11-11.
Citations to printed material with page numbers
Coming soon: Sub-referencing
This is a citation to an entire paper, where the citation does not include any page numbers [1].
This is a citation to same paper, where the citation itself contains ref to pages 7 and 8[2].
This is reusing the citation containing pages 7 and 8[2]
This is a citation to same paper, but page 14 inside the citation [3].
When a single article has multiple refs to same source differing in only page numbers, see templates {{harvp}} & {{sfn}}. Then a typical "References" section at end divided into subsections "Citations" containing {{Reflist}}, and subsection "Sources" with {{refbegin}} & {{refend}} containing bullet list of naked {{Citation}}. The "Citations" {{Reflist}} is populated from the {{harvp}}/{{sfn}} templates, which in turn link into the "Sources". For example pages that use these, see Starship Troopers and Happy Birthday to You. For additional advanced usage, see use of {{harvid}} in conjunction with {{harvp}} in my edits to 2018 Rome escalator accident in Sept 2025.
Template {{Rp}} provides visual-only pages markup, with a cite is to the entire paper.[1]: 7–8
Explanatory footnotes
Use template {{efn}} for "explanatory footnotes" aka "notes".
Inline links to RFC
Use template {{IETF RFC}} like this: {{IETF RFC|7095}} → RFC 7095
Use special syntax [[rfc:3261]] like this, rfc:3261
- This is known as "Interwiki linking" with complete list at MetaWiki:Interwiki_map
- You can customize the link as usual with
[[rfc:3261|RFC 3261]]like this, RFC 3261 - You can deep link with
[[rfc:3261#section-21.4.18|rfc-3261 §21.4.18]]like this, rfc-3261 §21.4.18
Citations to RFC
Use template {{Ref RFC}} for an all-in-one <ref>...</ref> plus cite
{{Ref RFC|3261}}→ [4]- See docs for variations on section name, pages, etc
Use template {{Cite IETF}} within a <ref>...</ref>
- shallow[5]
<ref name="rfc9110_shallow">{{cite ietf |rfc=9110 |title=HTTP Semantics |date=June 2022}}</ref>
- deep[6]
<ref>{{cite ietf |rfc=9110 |title=HTTP Semantics |section=5.6.5 |date=June 2022}}</ref>
- deep w/sectionname[7]
<ref>{{cite ietf |rfc=9110 |title=HTTP Semantics |section=5.6.5 |sectionname=Comments |date=June 2022}}</ref>
- shallow with section.[5]: §5.6.5 This uses
{{Rp}}for visual-only section number, combined with{{cite ietf}}to the entire RFC.
<ref name="rfc9110_shallow"/>{{rp|at=§5.6.5}}
- deep with appendix name[8]
<ref name="7231_appendixB">{{cite ietf |rfc=7231 |title=Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |appendix=B |sectionname=Changes from RFC 2616 |date=June 2014}}</ref>
For fine-grained control use generic template {{Cite web}} like this.[9]
<ref>{{cite web |date=June 2022 |url=https://www.rfc-editor.org/rfc/rfc9110#section-5.6.5 |title=RFC 9110: HTTP Semantics, Section 5.6.5 |publisher=[[IETF]]}}</ref>
Note that template {{Citation}} is the basis of both {{Cite web}} and {{Cite IETF}}. So you can also use all params from {{Citation}}.
When a single article has multiple refs to same rfc differing in only section/page numbers, see discussion about templates {{sfn}} and {{harvp}} above.
{{Citation needed}} and related verifiability templates
See Wikipedia:Citation needed for guidelines on when to (not) use the {{Citation needed}} template
See Template:Inline cleanup tags for an exhaustive list of related templates
When citation is present but questionable,
- {{Specify}} : Used to tag statements that seem to be sourced but lack sufficient specificity as to what exactly is being drawn from the source. This situation most often arises when sources are over-summarized to an excessive level, without sufficient care for whether the result has a clear enough meaning to be properly verifiable.
- {{Verify source}} : Used to request that someone verify that the cited source supports the material in the passage, only after you have made a good faith attempt to verify the information yourself, and you still have good reason to question whether the source is correct
Dollar amounts
{{US$}}:
- The movie cost $82,604,699 in 1979.[10]
{{US$}} with |1979 based on CPI and |round=-7, plus {{Inflation/fn|US}} for cite about inflation calculation:
{{Inflation|US}} used manually based on CPI with |r=-7:
{{Inflation|US-GDP}} used manually based on GDP with |r=-7:
{{Format price}} with manual {{Inflation|US-GDP}} with |r=-7:
Numeric values
{{val}}: Formatting, layout (no wrap, etc), sortability, and unit wikilinking.
{{val|fmt=commas|123456.78901}}→ 123,456.78901{{val|e=5}}→ 105{{val|1.234|e=5}}→ 1.234×105{{val|1.234e5}}→ 1.234×105{{val|1.234|u=m2}}→ 1.234 m2{{val|1.234|ul=m2}}→ 1.234 m2 (with units wikilinked, when available){{val|1.234e5|ul=m2}}→ 1.234×105 m2{{val|2|and|5|ul=m2}}→ 2 and 5 m2 (in gui editor, 'and' is 'Uncertainty", '5' is 'Asymmetric uncertainty'{{val|p=Δ|12.34}}→ Δ12.34{{val|p=Δ |12.34}}→ Δ 12.34{{val|p=≅|12.34|u=%}}→ ≅12.34%{{val|12.34|0.25|s=%}}→ 12.34±0.25%{{val|1.234|e=7|u=W|up=m2}}→ 1.234×107 W/m2 (for|up=, read the 'p' as in "per" as in "per unit"){{val|1.234|e=7|ul=au|upl=M_Earth}}→ 1.234×107 au/M🜨{{val|1.234|e=7|u=AU<sup>1.5</sup>|up=''M''<sub>E</sub><sup>2</sup>}}→ 1.234×107 (AU1.5)/(ME2)- etc etc etc
{{convert}} to show the same numeric value in different units
{{convert|20|C|F}}→ 20 °C (68 °F){{convert|300|K|C F|lk=on}}→ 300 K (27 °C; 80 °F){{convert|2|and|5|km|mi}}→ 2 and 5 kilometres (1.2 and 3.1 mi){{convert|3|-|6|ft}}→ 3–6 feet (0.91–1.83 m){{convert|{{sigfig|1,573.7|2}}|GL|sigfig=2}}→ 1,600 gigalitres (5.7×1010 cu ft)
{{10^}}: Focuses on formatting just the part ×1042. Note {{e}} is an alias.
{{scinote|12345}} → 1.2345×104
See Category:Mathematical_function_templates for things like
Deep linking to sections
Use one of these techniques
{{section link|Pioneer anomaly|Description}}→ Pioneer anomaly § Description- (shortened template name is {{slink}})
[[Pioneer anomaly#Description|"Description" on Pioneer anomaly]]→ "Description" on Pioneer anomaly