Template:Fraction: Difference between revisions

From Vigyanwiki
Template>Jimp
No edit summary
m (59 revisions imported from alpha:Template:Fraction)
 
(41 intermediate revisions by 24 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{3|}}}|{{{1}}}<s style="display:none">+</s><small><sup>{{{2}}}</sup><big>⁄</big><sub>{{{3}}}</sub></small>|{{#if:{{{2|}}}|<small><sup>{{{1}}}</sup><big>⁄</big><sub>{{{2}}}</sub></small>|<small><sup>1</sup><big>⁄</big><sub>{{{1}}}</sub></small>}}}}</includeonly><noinclude>
<templatestyles src="Fraction/styles.css" /><span class="frac" role="math">{{#if:{{{3|}}}<!-- if 3
This template builds nicer-looking [[common fraction]]s. It takes one, two or three parameters: the optional integer (maybe signed), the optional numerator and the required denominator; in this order.
  -->|{{{1}}}<span class="sr-only">+</span><span class="num">{{{2}}}</span>&frasl;<span class="den">{{{3}}}</span><!-- then 1 2/3
; <code><nowiki>{{frac|a|b|c}}</nowiki></code>: {{frac|a|b|c}} (integer, numerator and denominator)
  -->|{{#if:{{{2|}}}<!-- elseif 2
; <code><nowiki>{{frac|a|b}}</nowiki></code>: {{frac|a|b}} (numerator and denominator)
    -->|<span class="num">{{{1}}}</span>&frasl;<span class="den">{{{2}}}</span><!-- then 1/2
; <code><nowiki>{{frac|a}}</nowiki></code>: {{frac|a}} (denominator only)
    -->|{{#if:{{{1|}}}<!-- elseif 1
 
      -->|<span class="num">1</span>&frasl;<span class="den">{{{1}}}</span><!-- then 1/1
[[de:Vorlage:Bruch]]
      -->|&frasl;<!-- else 0, a slash
[[es:Plantilla:Fracción]]
    -->}}<!-- endif 1
[[ja:Template:分数]]
  -->}}<!-- endif 2
[[mk:Шаблон:Дроп]]
-->}}<!-- endif 3
[[simple:Template:Frac]]
--></span><noinclude>
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 09:20, 16 December 2022

Template documentation