Wikipedia:Manual of Style/Superscripts and subscripts: Difference between revisions
Content deleted Content added
→Mathematics: example |
fix |
||
Line 5:
Subscripts and superscripts should be wrapped in <code><sub></code> and <code><sup></code> tags, respectively, with no other formatting info. Do not use the [[Unicode subscripts and superscripts]] {{!xt|²}} and {{!xt|³}}, or [[List of XML and HTML character entity references|XML/HTML character entity references]] (<code>&sup2;</code>). Rather write <code><nowiki><sup>2</sup></nowiki></code> and <code><nowiki><sup>3</sup></nowiki></code> to produce the superscripts {{xt|<sup>2</sup>}} and {{xt|<sup>3</sup>}}. The superscripted 2 and 3 are easier to read, especially on small displays, and ensure that exponents are properly aligned. Compare:
: {{!xt|wⁱx²y³z⁽ⁿ⁺⁶⁾}} to
: {{xt|w<sup>i</sup>x<sup>2</sup>y<sup>3</sup>z<sup>(n + 6)</sup>}}
<br />
: {{!xt|1 + ''x'' + ''x''² + ''x''<sup>3</sup> + ''x''<sup>4</sup>}} (<code>&sup2;</code>) to
: {{xt|1 + ''x'' + ''x''<sup>2</sup> + ''x''<sup>3</sup> + ''x''<sup>4</sup>}} (<code><sup>2</sup></code>
Font sizes and such should be entrusted to be handled with stylesheets.<!--see discussion on Talk:Template:Sup-->
Line 15:
{{main|Wikipedia:Manual of Style (dates and numbers)}}
* '''Centuries and millennia''' are written using ordinal numbers, without superscripts and without Roman numerals: {{xt|the second millennium}}, {{xt|the 19th century}}, {{xt|a 19th-century book}} (see also [[Wikipedia:Manual of Style#Numbers as figures or words]]).
* '''Non-[[base (mathematics)|base]]-10 notations''' in non-computer-related articles use subscript notation. For example: {{xt|''137<sub>9</sub>''}}, {{xt|''241<sub>6</sub>''}}, {{xt|''2A9<sub>12</sub>''}}, {{xt|''A87D<sub>16</sub>''}} (use <code><sub></code> and <code></sub></code>).
==Music==
Line 34:
*'''[[Chemical compound]]s'''
:{{xt|C<sub>2</sub>H<sub>5</sub>OH}} using <code><nowiki>C<sub>2</sub>H<sub>5</sub>OH</nowiki></code>
*'''[[
:{{xt|{{Nuclide2|He|3}}}} using <code>{{tlx|Nuclide2|He|3}}</code>
|