Template:Sfrac

From NetHackWiki
Jump to navigation Jump to search

1{{{1}}}


This template (adapted from Wikipedia) creates vertically-oriented in-line fractions using a vinculum (horizontal line). It can take one, two, or three parameters:

  • {{sfrac|A|B|C}}ABC
  • {{sfrac|B|C}}BC
  • {{sfrac|C}}1C

Usage is similar to {{frac}}, which displays fractions with a fraction slash. While that template is good for small, simple fractions like 23 (and plays a bit nicer with copy-and-pasting), this one is better suited to slightly more complicated fractions such as 3 × Wis100.

For large formulas, especially those which don't need to appear in-line with the text, prefer using TeX (<math> tags) instead. See Wikipedia:Rendering math for a breakdown of the advantages and disadvantages of different rendering styles. (Note that "texhtml" styling is not available on NetHack Wiki.)