Difference between revisions of "Template:Frac/doc"

From blackwiki
Jump to navigation Jump to search
imported>Edokter
(Undid revision 465131233 by Arthur Rubin (talk) No template is needed for that)
imported>Arthur Rubin
(Undid revision 465134022 by Edokter (talk) needed to replace {{frac}} where it is inappropriate, such as in mathematical articles such as Pi)
Line 20: Line 20:
 
*{{tl|1/2}}, {{tl|1/3}}, {{tl|2/3}}, {{tl|1/4}}, {{tl|3/4}}
 
*{{tl|1/2}}, {{tl|1/3}}, {{tl|2/3}}, {{tl|1/4}}, {{tl|3/4}}
 
*{{tl|fraction}}, only uses precomposed glyphs
 
*{{tl|fraction}}, only uses precomposed glyphs
 +
*{{tl|fracText}}, use inline fractions, for use in mathematics articles
 
<includeonly>
 
<includeonly>
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->

Revision as of 16:01, 10 December 2011

This template builds an alternative form of common fractions. It takes one, two or three parameters: the optional integer (may be signed), the optional numerator and the required denominator; in this order. Please don't substitute it. This template should not be used in mathematical articles, per MOS:MATH#Fractions.

{{frac|A|B|C}}
APage Template:Screen reader-only/styles.css has no content. BC (integer, numerator and denominator)
<span class="frac">A<sup>&nbsp;B</sup><sub>C</sub></span>
{{frac|A|B}}
AB (numerator and denominator)
<span class="frac"><sup>A</sup><sub>B</sub></span>
{{frac|A}}
1A (denominator only)
<span class="frac"><sup>1</sup><sub>A</sub></span>

Examples:

121323143415253545165617273747576718385878116316516716916111613161516

mskmhkg·m1sMbits

To allow numerical sorting of a column containing fractions, use {{sortfrac}} instead. It is a combination of this template and {{sort}}.

See also