-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support \cfrac #1392
Support \cfrac #1392
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1392 +/- ##
==========================================
- Coverage 82.33% 82.25% -0.09%
==========================================
Files 77 77
Lines 4241 4248 +7
Branches 731 735 +4
==========================================
+ Hits 3492 3494 +2
- Misses 647 650 +3
- Partials 102 104 +2
Continue to review full report at Codecov.
|
@ronkok here are the updated screenshots: |
if (group.value.rightDelim == null) { | ||
|
||
if (group.value.continued) { | ||
rightDelim = buildCommon.makeSpan([]); // zero width for \cfrac |
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.
I thought this might cause \left
/\right
delimiters to not render, but it doesn't. I guess the left/right delimeters for genfrac
are for a \choose b
. Do we need a similar if (group.value.continued)
for leftDim
up above?
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.
I don't think so. In LaTeX, they write a \kern-\nulldelimiterspace
, but only on the right side of the fraction, not on the left side. We get the same behavior by omitting the space taken by our \nulldelimiter
.
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.
LGTM. Thanks for reviving this code and finishing it off.
Thank you! |
Happy to see this work, which dates back to 2014, come to fruition! Thanks @ronkok and @kevinbarabash! |
I can't believe it's been that long. |
Thank you both! This was the first reason why I didn't use KaTeX instead of MathJax. |
@OrkhanAlikhanov Great! Let us know if there are other sticking points you know of, or discover. |
@edemaine Hey! I've removed MathJax and integrated KaTeX. Everything seems okay so far. Rendering is now super fast! Especially in android and ios apps. Thank you all! |
@OrkhanAlikhanov Glad to hear it!! |
Much of this comes directly from #135, so credit to @kevinbarabash.
This was an easier PR to write than #135 since KaTeX now has well established methods for pt-to-em conversions and nulldelimiter.
As in #135, this PR does not support the LaTeX optional argument for numerator justification. It supports a
\cfrac #1 #2
syntax.Fixes #85.