Template:Frac
Revision as of 21:48, 23 August 2023 by DroneBetter (talk | contribs) (Create (maybe I will make another template with nicer nesting behaviour later, however it will require the entire expression to have enclosing <span>s))
{{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+...