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

Refactor math styling to bring it closer to normal styling #3262

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

laurmaedje
Copy link
Member

This brings math a bit closer to the rest of Typst by removing the MathContext-based styling in favor of normal StyleChain stuff. The style chain resolving might be more costly than what we had before, but I haven't optimized this at all because math needs further refactoring before performance can become a focus.

What's nice is that show math.equation: math.display now works because it just applies a style rather than creating a new element that is equation-ified and rematches.

@laurmaedje laurmaedje added this pull request to the merge queue Jan 26, 2024
Merged via the queue into main with commit b09d6ae Jan 26, 2024
8 checks passed
@laurmaedje laurmaedje deleted the math-styling branch January 26, 2024 10:01
Dherse pushed a commit to Dherse/typst that referenced this pull request Feb 4, 2024
@EpicEricEE EpicEricEE mentioned this pull request Mar 21, 2024
1 task
frozolotl added a commit to frozolotl/typst that referenced this pull request Apr 4, 2024
…se I

think it is a bit clearer, the word reads nicer (“overshell” vs “overturtle”),
and there is no associated discussion (they are called “tortoise shells” in
Unicode):

> tortoises and turtles are not the same thing!
~ @Enivex

There will be a sibling PR to rename the symbols too.

Additionally, I refactored some code to make it more readable.
I also fixed a bug introduced in typst#3262 where the wrong script style was being used.

Closes typst#3856.
frozolotl added a commit to frozolotl/typst that referenced this pull request Apr 4, 2024
I decided to use the word `shell` instead of turtle or tortoise because I
think it is a bit clearer, the word reads nicer (“overshell” vs “overturtle”),
and there is no associated discussion (they are called “tortoise shells” in
Unicode):

> tortoises and turtles are not the same thing!
~ @Enivex

There will be a sibling PR to rename the symbols too.

Additionally, I refactored some code to make it more readable.
I also fixed a bug introduced in typst#3262 where the wrong script style was being used.

Closes typst#3856.
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.

None yet

1 participant