Wikipedia:Manual of Style/Superscripts and subscripts: Difference between revisions

Content deleted Content added
was this written by Adolf Hitler or a troll person?
Reverted 1 edit by 2A01:119F:21E:4D00:E108:9D1F:427F:31C4 (talk): Disruptive edit. (TW)
Line 3:
A '''[[subscript and superscript|Superscript]]''' or a '''[[subscript and superscript|Subscript]]''' is text that is positioned slightly above or below the normal line of type and is sometimes rendered in a smaller font. This part of the [[Wikipedia:Manual of Style|Manual of Style]] aims to achieve consistency in the use and formatting of superscripts and subscripts in Wikipedia articles.
 
DoSubscripts notand usesuperscripts theshould be wrapped in <code><nowiki><sub></nowiki></code> and <code><nowiki><sup></nowiki></code> [[HTML]] tags, respectively, with no other formatting info. The {{tlx|sup}} and {{tlx|sub}} templates are useful shortcuts to the HTML markup. UseDo not use the [[Unicode subscripts and superscripts]] {{!xt|²}} and {{!xt|³}}, or [[List of XML and HTML character entity references|XML/HTML character entity references]] ({{!xt|<code>&amp;sup2;</code>}} etc). Do notRather, write {{xt|<code><nowiki><sup>2</sup></nowiki></code>}} and {{xt|<code><nowiki><sup>3</sup></nowiki></code>}} to produce the superscripts {{xt|{{sup|2}}}} and {{xt|{{sup|3}}}}, because they are not customizable by the font designer. The superscripted 2 and 3 are easier to read, especially on small displays, and ensure that exponents are properly aligned. Compare:
: {{!xt|wⁱx²z⁽ⁿ⁺⁶⁾}} (Unicode superscripts) to
: {{xt|w<sup>i</sup>x<sup>2</sup>z<sup>(n + 6)</sup>}} (<code><nowiki>w<sup>i</sup>x<sup>2</sup>z<sup>(n + 6)</sup></nowiki></code>) or
Line 16:
==Dates and numbers==
{{main|Wikipedia:Manual of Style (dates and numbers)}}
* The '''ordinal suffix''' (e.g., ''th'') is not superscripted ({{xt|23rd}} and {{xt|496th}}, not {{!xt|23ʳᵈ23<sup>rd</sup>}} and {{!xt|496ᵗʰ496<sup>th</sup>}}).
* '''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-[[radix|base]]-10 notations''' in non-computer-related articles use subscript notation. For example: {{xt|137₉137{{sub|9}}}}, {{xt|241₅241{{sub|6}}}}, {{xt|2A9₁₂2A9{{sub|12}}}}, {{xt|A87D₁₆A87D{{sub|16}}}} (use ₀, ₁, ₂,<code><nowiki>{{sub|radix}}</nowiki></code> ₃, ₄, ₅, ₆, ₇, ₈,or <code><nowiki><sub>radix</sub></nowiki></code>).
 
==Music==
{{main|Wikipedia:Manual of Style (music)}}
 
* In '''[[figured bass]]''', superscript and subscript may be combidcombined by using math markup or by using the {{tlx|su}} template: <code><nowiki><math>C_6^4</math></nowiki></code> = <math>C_6^4</math>, <code><nowiki>''C''{{su|b=6|p=4}}</nowiki></code> = ''C''{{su|b=6|p=4}}; (see also [[Wikipedia:TeX markup]] or [[m:Help:Formula]]).
*A '''superscript circle''', or '''degree sign''', which indicates a diminished chord, that may not display correctly for everyone, "°", can be produced by typing <code>&amp;deg;</code>, <code>&amp;#176</code>, or by keying {{key press|[[Alt key|Alt]]|0}}{{key press|1}}{{key press|7}}{{key press|6}} (Windows PCs). A superscript lower case "{{sup|o}}" (<code><nowiki>{{sup|o}}</nowiki></code>) may not be used instead. The slashed o, "{{sup|ø}}", which may not display correctly for all readers, is produced by superscripting the character produced by typing <code>&amp;oslash;</code>, or <code>&amp;#248;</code>, or by keying {{key press|[[Alt key|Alt]]|0}}{{key press|2}}{{key press|4}}{{key press|8}} (Windows PCs).
*For '''inversions''' and the '''degree sign''' superscript and subscript may be done thus: <code><nowiki>vii{{sup|o}}</nowiki></code>, <code><nowiki>I{{sub|6}}</nowiki></code>. This looks like: {{xt|vii{{sup|o}}}}, {{xt|I{{sub|6}}}}.
 
==Unit symbols and abbreviations ==
{{main|Wikipedia:Manual of Style (dates and numbers)#Unit names and symbols}}
* '''Squared and cubic metric-symbols''' are always expressed with a superscript exponent ({{xt|5{{nbsp}}km²{{sup|2}}}}, {{xt|2{{nbsp}}cm³{{sup|3}}}}); squared imperial and US unit abbreviations may be rendered with {{xt|sq}}, and cubic with {{xt|cu}} ({{xt|15{{nbsp}}sq{{nbsp}}mi}}, {{xt|3{{nbsp}}cu{{nbsp}}ft}}).
 
==Science==
Line 36:
Descriptions of:
*'''[[Chemical compound]]s'''
:{{xt|C₂H₅OHC{{sub|2}}H{{sub|5}}OH}} using <code><nowiki>C₂H₅OHC{{sub|2}}H{{sub|5}}OH</nowiki></code>
*'''[[Isotopes]]'''
:{{xt|{{Nuclide2|He|3}}}} using <code>{{tlx|Nuclide2|He|3}}</code>
Line 45:
 
* '''[[Exponentiation]]''' is indicated using a superscript:
:{{xt|2²{{sup|2}} &#61; 4}} using <code><nowiki>2²{{sup|2}} = 4</nowiki></code>
 
Special care is needed with subscripted labels to distinguish the purpose of the subscript (as this is a common error): variables and constants in subscripts should be italic, while textual labels should be in normal text font (Roman, upright). For example:
Line 55:
: <math>r = x_{predicted} - x_{observed}</math> &emsp; (''incorrect''—typeset from <code><nowiki>r = x_{predicted} - x_{observed}</nowiki></code>).
 
Moreover, the TeX engine used on Wikipedia may format simple superscripts using {{tag|sup}} depending on user preferences. Thus, instead of the image <math>x^2\,</math>, many users see ''x''²{{sup|2}}. Formulae formatted without using TeX should use the same syntax to maintain the same appearance.