Template:Fraction: Difference between revisions

From Vigyanwiki
Template>Diverman
(Improve readability by removing small font; add space)
m (59 revisions imported from alpha:Template:Fraction)
 
(54 intermediate revisions by 26 users not shown)
Line 1: Line 1:
{{{1}}}<span style="display:none">+</span><sup>&nbsp;{{{2}}}</sup><sub>{{{3}}}</sub><noinclude>
<templatestyles src="Fraction/styles.css" /><span class="frac" role="math">{{#if:{{{3|}}}<!-- if 3
 
  -->|{{{1}}}<span class="sr-only">+</span><span class="num">{{{2}}}</span>&frasl;<span class="den">{{{3}}}</span><!-- then 1 2/3
This template builds nicer looking common fractions, sample: 1<span style="display:none">+</span><sup> 2</sup><sub>3</sub>. It takes three parameters: The integer (optionally with leading <code>&amp;minus;</code>), the numerator and the denominator. If your fraction is between zero and one you probably want to use <code>{{[[Template:Frac0|frac0]]}}</code> instead.
  -->|{{#if:{{{2|}}}<!-- elseif 2
 
    -->|<span class="num">{{{1}}}</span>&frasl;<span class="den">{{{2}}}</span><!-- then 1/2
[[de:Vorlage:Bruch]]
    -->|{{#if:{{{1|}}}<!-- elseif 1
      -->|<span class="num">1</span>&frasl;<span class="den">{{{1}}}</span><!-- then 1/1
      -->|&frasl;<!-- else 0, a slash
    -->}}<!-- endif 1
  -->}}<!-- endif 2
-->}}<!-- endif 3
--></span><noinclude>
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 09:20, 16 December 2022

Template documentation