Template:Itunit

From Wikipedia, the free encyclopedia

{{{1}}}


[edit] Documentation

This template un-italicizes unit symbols (as they are required to be in formulas, so as not to be confuseable with variables), and can be used for any other circumstance in which something must not appear in italics but is already inside an italicized phrase. The name of the template is a mnemonic for "italics with units". The paranoid can use this template at every occurence of units to which italicization could theoretically apply, even if they are not in italics (yet); it will have no effect on anything else, including bold or small-caps.

[edit] Usage

Code:

...at a width of ''only 4.2 {{itunit|cm}}'', which...

Yields:

...at a width of only 4.2 cm, which...

The lazy solution has been to do:

...at a width of ''only 4.2 ''cm, which...

but this violates the XML semantic integrity of the emphasized span, which necessarily includes the unit symbol too, at the XHTML level.