Skip to content

feat: Allow text-mode accents in math mode, except in strict mode#3009

Merged
ylemkimon merged 3 commits intomasterfrom
less-strict-accents
May 14, 2021
Merged

feat: Allow text-mode accents in math mode, except in strict mode#3009
ylemkimon merged 3 commits intomasterfrom
less-strict-accents

Conversation

@edemaine
Copy link
Copy Markdown
Member

@edemaine edemaine commented May 11, 2021

LaTeX only issues a warning when using e.g. \r in math mode.
KaTeX will now do the same with the default strict setting of warn.

Fixes #2983

Demo:

\r a\aa\\
\text{\r a\aa}

image

Here's a comparison to QuickLaTeX:
image

LaTeX only issues a warning when using e.g. `\r` in math mode.
KaTeX will now do the same with the default `strict` setting of `warn`.

Fixes #2983
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 11, 2021

Codecov Report

Merging #3009 (7ce5d0d) into master (85687f9) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3009      +/-   ##
==========================================
- Coverage   93.95%   93.94%   -0.02%     
==========================================
  Files          87       87              
  Lines        6339     6343       +4     
  Branches     1313     1314       +1     
==========================================
+ Hits         5956     5959       +3     
- Misses        353      354       +1     
  Partials       30       30              
Impacted Files Coverage Δ
src/functions/accent.js 98.64% <75.00%> (-1.36%) ⬇️

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 85687f9...7ce5d0d. Read the comment docs.

@edemaine edemaine marked this pull request as draft May 11, 2021 17:52
@edemaine edemaine marked this pull request as ready for review May 11, 2021 20:30
@ylemkimon ylemkimon enabled auto-merge (squash) May 14, 2021 21:06
@ylemkimon ylemkimon merged commit 0e9acce into master May 14, 2021
@ylemkimon ylemkimon deleted the less-strict-accents branch May 14, 2021 21:08
KaTeX-bot added a commit that referenced this pull request May 14, 2021
## [0.13.11](v0.13.10...v0.13.11) (2021-05-14)

### Bug Fixes

* matrix environment with zero or inconsistent columns ([#3018](#3018)) ([f779bac](f779bac)), closes [#3017](#3017)

### Features

* Allow text-mode accents in math mode, except in strict mode ([#3009](#3009)) ([0e9acce](0e9acce)), closes [#2983](#2983)
@KaTeX-bot
Copy link
Copy Markdown
Member

🎉 This PR is included in version 0.13.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too strict about accents in math mode

4 participants