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

Content deleted Content added
Music: example not yielding an inline picture
fix
Line 3:
 
Subscripts and superscripts should be wrapped in <code>&lt;sub></code> and <code>&lt;sup></code> tags, respectively, with no other formatting info. Do not use the [[Unicode subscripts and superscripts]] <span class="bad_example" style="color: #B20000;">²</span> and <span class="bad_example" style="color: #B20000;">³</span>, or [[List of XML and HTML character entity references|XML/HTML character entity references]] (<code>&amp;sup2;</code>). Rather write <code><nowiki><sup>2</sup></nowiki></code> and <code><nowiki><sup>3</sup></nowiki></code> to produce the superscripts <span class="example" style="color: #006F00;"><sup>2</sup></span> and <span class="example" style="color: #006F00;"><sup>3</sup></span>. The superscripted 2 and 3 are easier to read, especially on small displays, and ensure that exponents are properly aligned. Compare:
: <span class="bad_example" style="color: #B20000;">wⁱx²z⁽ⁿ⁺⁶⁾</span> (Unicode superscripts) to
: <span class="example" style="color: #006F00;">w<sup>i</sup>x<sup>2</sup>y<sup>3</sup>z<sup>(n + 6)</sup></span> (<code><nowiki>w<sup>i</sup>x<sup>2</sup>y<sup>3</sup>z<sup>(n + 6)</sup></nowiki></code>)
<br />
: <span class="bad_example" style="color: #B20000;">1 + ''x'' + ''x''² + ''x''<sup>3</sup> + ''xy''<sup>4</sup>³</span> (<code>&amp;sup2;</code>) to
: <span class="example" style="color: #006F00;">1 + ''x'' + ''x''<sup>2</sup> + ''x''<sup>3</sup> + ''x''<sup>4</sup></span> (<code>&lt;sup>2&lt;/sup></code>)
 
Font sizes and such should be entrusted to be handled with stylesheets.<!--see discussion on Talk:Template:Sup-->