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: Implement \pmb via CSS text-shadow #3505

Merged
merged 3 commits into from Aug 29, 2022
Merged

fix: Implement \pmb via CSS text-shadow #3505

merged 3 commits into from Aug 29, 2022

Conversation

ronkok
Copy link
Collaborator

@ronkok ronkok commented Jan 13, 2022

Currently, \pmb is implemented by rendering multiple copies of the argument with small offsets. It's a kludge, as indicated by (1) the complex exceptions in the original AMS macro, and (2) actual results.

This PR implements \pmb via CSS text-shadow. The rendering is better, particularly in large sizes and in math operators. The improvement resolves #3503.

@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #3505 (acf7309) into main (99be728) will decrease coverage by 0.00%.
The diff coverage is 89.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3505      +/-   ##
==========================================
- Coverage   92.98%   92.97%   -0.01%     
==========================================
  Files          90       91       +1     
  Lines        6739     6765      +26     
  Branches     1568     1571       +3     
==========================================
+ Hits         6266     6290      +24     
- Misses        435      437       +2     
  Partials       38       38              
Impacted Files Coverage Δ
contrib/render-a11y-string/render-a11y-string.js 83.80% <0.00%> (-0.73%) ⬇️
src/domTree.js 70.90% <ø> (ø)
src/functions.js 100.00% <ø> (ø)
src/macros.js 97.50% <ø> (-0.01%) ⬇️
src/parseNode.js 73.33% <ø> (ø)
contrib/auto-render/auto-render.js 79.03% <100.00%> (+6.48%) ⬆️
src/functions/pmb.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 4d3fdd8...acf7309. Read the comment docs.

@ronkok ronkok changed the title Fix: Implement \pmb via CSS text-shadow fix: Implement \pmb via CSS text-shadow Jan 13, 2022
@ronkok
Copy link
Collaborator Author

ronkok commented Jan 13, 2022

Don't review this PR yet. There is an issue in MathML.

@ronkok
Copy link
Collaborator Author

ronkok commented Jan 13, 2022

Update: The issue that I have just found is unrelated to this PR. I was thinking that I might add the correction here, but the other issue should really be in its own PR.

So this PR should be good to go.

Copy link
Member

@ylemkimon ylemkimon left a comment

Choose a reason for hiding this comment

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

Thank you for the PR, as always. Sorry for the late review.

@ylemkimon ylemkimon enabled auto-merge (squash) August 29, 2022 21:51
@ylemkimon ylemkimon merged commit 176552a into KaTeX:main Aug 29, 2022
KaTeX-bot added a commit that referenced this pull request Aug 29, 2022
## [0.16.2](v0.16.1...v0.16.2) (2022-08-29)

### Bug Fixes

* **auto-render:** concatenate content of successive text nodes ([#3422](#3422)) ([4d3fdd8](4d3fdd8))
* Implement \pmb via CSS text-shadow ([#3505](#3505)) ([176552a](176552a))
@KaTeX-bot
Copy link
Member

🎉 This PR is included in version 0.16.2 🎉

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.

\pmb with math operator renders awkward
3 participants