You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to render fractions in display style using \genfrac?
The style argument of the _genfrac function in _mathtext.py is received as an Hlist. As a result, fractions will never use display style (since style and self._MathStyle.DISPLAYSTYLE will always compare unequal).
with p.int_literal defined using a regex (just like how p.float_literal is defined), following which, the _genfrac function should obtain the enumeration variable from the value. We can hard-code the enumerations
Seems reasonable to me, but the numeric values I see in the documentation for genfrac (e.g. in "User's guide for the amsmath package (version 2.1)) are 0/1/2/3, not 0/2/4/6?
(Also, if using scriptstyle or scriptscriptstyle, I guess the _genfrac definition needs to shrink() the nodes once or twice more.)
That's fair; using 0, 1, 2 and 3 sounds good. (Worth noting that those were the numbers originally used in #8151.)
How should the line height behave as consequence of this?
Correct me if I'm wrong, but will that really affect anything? That is for rule argument, while this for the style argument. (A rebase may be required once that PR is merged, but … other than that?)
Activity
anntzer commentedon May 8, 2022
Seems reasonable to me, but the numeric values I see in the documentation for genfrac (e.g. in "User's guide for the amsmath package (version 2.1)) are 0/1/2/3, not 0/2/4/6?
(Also, if using scriptstyle or scriptscriptstyle, I guess the
_genfracdefinition needs toshrink()the nodes once or twice more.)oscargus commentedon May 8, 2022
How should the line height behave as consequence of this? #22171
tfpf commentedon May 8, 2022
That's fair; using 0, 1, 2 and 3 sounds good. (Worth noting that those were the numbers originally used in #8151.)
Correct me if I'm wrong, but will that really affect anything? That is for
ruleargument, while this for thestyleargument. (A rebase may be required once that PR is merged, but … other than that?)oscargus commentedon May 8, 2022
Ah, I thought this way about "automatic" rescaling of the text. My bad.