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

Fix ApplyFunction character #1890

Merged
merged 1 commit into from Mar 23, 2019

Conversation

@ronkok
Copy link
Collaborator

commented Mar 22, 2019

First, some background: In version 3.0 of W3C's MathML spec, they recommend placement of an invisible character, ⁡ (U+2061) between a function name and the function's argument. Ref: MathML spec section 3.2.5.5 This is done for accessibility reasons. The invisible character gives a hint to a screen reader that it should say something like "f of x" instead of "f times x".

KaTeX does insert that character, but it did so incorrectly for functions with a subscript, such as \lim_y x.

This PR revises the code such that the invisible character is omitted for any function name with a subscript. This matches MathJax behavior. When the invisible character is omitted the function name gets a <mo> tag instead of a <mi> tag. This also matches MathJax behavior.

@ylemkimon Thank you for the expedited review on PR #1886. I ask for expedited review on this PR as well. It is also a prerequisite for \operatorname*.

@ronkok

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 22, 2019

Also, this PR fixes isssue #1800.

@codecov-io

This comment has been minimized.

Copy link

commented Mar 22, 2019

Codecov Report

Merging #1890 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1890      +/-   ##
==========================================
+ Coverage   94.76%   94.76%   +<.01%     
==========================================
  Files          79       79              
  Lines        4659     4663       +4     
  Branches      811      813       +2     
==========================================
+ Hits         4415     4419       +4     
  Misses        220      220              
  Partials       24       24
Flag Coverage Δ
#screenshotter 88.93% <100%> (ø) ⬆️
#test 86.81% <85.71%> (-0.02%) ⬇️
Impacted Files Coverage Δ
src/parseNode.js 84.21% <ø> (ø) ⬆️
src/functions/mclass.js 100% <ø> (ø) ⬆️
src/functions/op.js 98.95% <100%> (+0.02%) ⬆️
src/functions/supsub.js 99% <100%> (+0.02%) ⬆️

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 a1e341a...42054e5. Read the comment docs.

1 similar comment
@codecov-io

This comment has been minimized.

Copy link

commented Mar 22, 2019

Codecov Report

Merging #1890 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1890      +/-   ##
==========================================
+ Coverage   94.76%   94.76%   +<.01%     
==========================================
  Files          79       79              
  Lines        4659     4663       +4     
  Branches      811      813       +2     
==========================================
+ Hits         4415     4419       +4     
  Misses        220      220              
  Partials       24       24
Flag Coverage Δ
#screenshotter 88.93% <100%> (ø) ⬆️
#test 86.81% <85.71%> (-0.02%) ⬇️
Impacted Files Coverage Δ
src/parseNode.js 84.21% <ø> (ø) ⬆️
src/functions/mclass.js 100% <ø> (ø) ⬆️
src/functions/op.js 98.95% <100%> (+0.02%) ⬆️
src/functions/supsub.js 99% <100%> (+0.02%) ⬆️

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 a1e341a...42054e5. Read the comment docs.

@ylemkimon ylemkimon merged commit f8f4809 into KaTeX:master Mar 23, 2019

9 of 10 checks passed

Pages changed 7 new files uploaded
Details
Header rules 2 header rules processed
Details
Mixed content No mixed content detected
Details
Redirect rules 5 redirect rules processed
Details
Screenshotter - Chrome Screenshotter Passed
Details
Screenshotter - Firefox Screenshotter Passed
Details
ci/circleci: chrome Your tests passed on CircleCI!
Details
ci/circleci: firefox Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details

@ronkok ronkok deleted the ronkok:applyFunction branch Mar 23, 2019

@ronkok ronkok referenced this pull request Mar 23, 2019
@ronkok ronkok referenced this pull request May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.