-
Notifications
You must be signed in to change notification settings - Fork 233
Implement remaining mfrac attributes #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d fractions, and will be needed for mfenced as well.
zorkow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor things.
| const fparam = this.font.params; | ||
| if (t !== .06) { | ||
| const a = fparam.axis_height; | ||
| const tEm = this.em(t), T = (display ? 3.5 : 1.5) * t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two lines.
| const a = fparam.axis_height; | ||
| const T = (display ? 3.5 : 1.5) * t; | ||
| bbox.combine(nbox, 0, a + T + Math.max(nbox.d * nbox.rscale, (display ? fparam.num1 : fparam.num2) - a - T)); | ||
| bbox.combine(dbox, 0, a - T - Math.max(dbox.h * dbox.rscale, (display ? fparam.denom1 : fparam.denom2) + a - T)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some computations are the same as in makeFraction (a and second args of Math.max).
Could they be combined into an aux method, thereby shortening some of these lines?
|
I've just realised that you are using |
|
I found the relevant discussion for |
…nsistnecy with other files).
|
I've fixed the issues, including |
This PR finishes the CommonHTML output for
mfrac. It implements thebevelledattribute, implementslinethickness, and in particular support forlinethickness="0"which requires a different layout (in the TeXBook appendix G), and adds support fornumalignanddenomalignattributes.As a side effect, the
createMo()method has been moved frommsqrt.tsto the baseWrapper.tsfile, since it is needed for the bevelled fractions, and will be needed formfencedin the future.