Skip to content
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

feat: support AMS log-like symbols #2429

Merged
merged 5 commits into from
Aug 17, 2020
Merged

feat: support AMS log-like symbols #2429

merged 5 commits into from
Aug 17, 2020

Conversation

ronkok
Copy link
Collaborator

@ronkok ronkok commented Aug 15, 2020

This PR checks off six items in the effort to reach function parity with MathJax. That list is dwindling.

Here's a screenshot:
loglike

... which compares to the same code in quicklatex.com:

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2020

Codecov Report

Merging #2429 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2429      +/-   ##
==========================================
+ Coverage   93.97%   94.01%   +0.03%     
==========================================
  Files          84       84              
  Lines        5444     5476      +32     
  Branches      961      964       +3     
==========================================
+ Hits         5116     5148      +32     
  Misses        297      297              
  Partials       31       31              
Impacted Files Coverage Δ
contrib/render-a11y-string/render-a11y-string.js 89.43% <100.00%> (+0.24%) ⬆️
src/domTree.js 72.28% <100.00%> (ø)
src/functions/enclose.js 98.18% <100.00%> (+0.30%) ⬆️
src/macros.js 97.26% <100.00%> (+0.04%) ⬆️
src/svgGeometry.js 91.17% <100.00%> (+0.85%) ⬆️
src/symbols.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 221042b...26ed45f. Read the comment docs.

@ronkok ronkok changed the title Support AMS log-like symbols feat: Support AMS log-like symbols Aug 15, 2020
@ronkok
Copy link
Collaborator Author

ronkok commented Aug 16, 2020

Oh, I forgot to list the symbol names. They are: \injlim, \projlim, \varlimsup, \varliminf, \varinjlim, and \varprojlim.

Copy link
Member

@kevinbarabash kevinbarabash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think the documentation part of this could be tweaked a bit. See inline comments before merging.

Comment on lines +847 to +852
defineMacro("\\injlim", "\\DOTSB\\operatorname*{int\\,lim}");
defineMacro("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
defineMacro("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}");
defineMacro("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}");
defineMacro("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}");
defineMacro("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it.


Functions on the right column of this table can take `\limits`.
Functions in the right column and bottom three rows of this table can take `\limits`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can \argmax take limits as well?. Maybe an asterisk or something to indicate which items can take \limits would be easier to maintain.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know, I should review this table and that statement about the right hand column. I wrote that statement many revisions ago and I am no longer positive that it is still true. I'll spend some time with it tomorrow.

I once considered asterisks, but that would be confusing since asterisks are a part of some LaTeX functions, like \operatorname*. So far, I have not thought of any better way to convey the limits idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll mark this PR as a draft for further changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have revised the Math Operators table in the documentation. This PR is once again ready for review.

@kevinbarabash
Copy link
Member

This PR checks off six items in the effort to reach function parity with MathJax. That list is dwindling.

This is super exciting. We still load MathJax as a fallback on khanacademy.org. I'll be nice to only load KaTeX. 🙂

@ylemkimon ylemkimon marked this pull request as draft August 17, 2020 11:36
@ylemkimon ylemkimon changed the title feat: Support AMS log-like symbols feat: support AMS log-like symbols Aug 17, 2020
@ronkok ronkok marked this pull request as ready for review August 17, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants