Template:Fraction: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) Copy styles directly since TemplateStyles doesn't work |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<!-- | <includeonly><templatestyles src="Fraction/styles.css" /><!-- | ||
--><span | --><span class="frac"><!-- | ||
-->{{#if:{{{3|}}}<!-- if 3 | -->{{#if: {{{3|}}}<!-- if 3 | ||
-->|{{{1}}}<span | -->| {{{1}}}<span class="sr-only">+</span><span class="num">{{{2}}}</span>⁄<span class="den">{{{3}}}</span><!-- then 1 2/3 | ||
-->|{{#if:{{{2|}}}<!-- elseif 2 | -->| {{#if: {{{2|}}}<!-- elseif 2 | ||
-->|<span | -->| <span class="num">{{{1}}}</span>⁄<span class="den">{{{2}}}</span><!-- then 1/2 | ||
-->|{{#if:{{{1|}}}<!-- elseif 1 | -->| {{#if: {{{1|}}}<!-- elseif 1 | ||
-->|<span | -->| <span class="num">1</span>⁄<span class="den">{{{1}}}</span><!-- then 1/1 | ||
-->|⁄<!-- else 0, a slash | -->| ⁄<!-- else 0, a slash | ||
-->}}<!-- endif 1 | -->}}<!-- endif 1 | ||
-->}}<!-- endif 2 | -->}}<!-- endif 2 | ||
-->}}<!-- endif 3 | -->}}<!-- endif 3 | ||
--></span> | --></span></includeonly><noinclude> | ||
{{documentation}} | |||
[[Category:Formatting templates]] | |||
</noinclude> |
Latest revision as of 14:24, 30 July 2025
![]() |
This template should not be substituted. |
![]() |
This template uses TemplateStyles: |
Note: You can use {{frac}}
as a shortcut.
See also
- Template:Sfrac – for typesetting vertical fractions.