Template:Frac

From LifeWiki
Revision as of 22:42, 23 August 2023 by DroneBetter (talk | contribs) (Continued fractions are fixed and it is nicer now (no enclosings necessary :-))
Jump to navigation Jump to search

{{frac}} is a template for expressing fractions with vertically-displaced numerators and denominators. The parameters, num and den, may have their namees forgone, and default to the first and second inputs, as one would expect.

For instance, <tt>{{frac|-(b:{{=}}{{frac|b|2}})-sqrt(b<sup>2</sup>-a*c)|a}}</tt> becomes -(b:=b2)-sqrt(b2-a*c)a.

Be warned, the rest of the text aligns with the average y position (between a fraction's numerator's top and numerator's bottom), not the line of separation, so continued (and otherwise nested) fractions are less elegant with this.

φ=1+11+11+11+...