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

Support Line decoration for Math [1/2] : Support Highlight for inline and block math equations #3941

Closed

Conversation

LuxxxLucy
Copy link
Contributor

@LuxxxLucy LuxxxLucy commented Apr 16, 2024

This is the first of two PR for solving #2200

Regarding #2200, it turns out the highlight is supported for normal text but not for math equations. Digging into it, there are two aspect of it:

  1. For block math equations, we just get the frame and then add line based decorations to it.
  2. For inline math equations, this becomes a little bit tricky: we have a list of MathParItem consisting of actual Frame or Space, we will need to compute the smallest box that covers the list of all MathParItems.

Note 1
for line based decorations, highlight is a rectangle added to the background of the targeted frame (be it normal text or math equations), so we "prepend" it (adding it beneath the frame), but for other line based decorations, it is **ON TOP OF" the targeted frame. It becomes kind of tricky and thus will be tackled in a next PR

Note 2
A new decoration function is introduced in this PR; the end goal is to merge the new one with the exiting old one. Such refactoring will be included in next PR.

Scope

what is in this MR:

  1. support of highlight over inline math equations
  2. support of highlight over block math equations
  3. corresponding test typ/png

what is not in this MR:

  1. support of other line-based decorations.

What will be in the second PR

  1. support of other line based decorations.
  2. refactor the old "decorate" function and the newly added function introduced in this MR,

@laurmaedje
Copy link
Member

Reviewing this as a single PR is easier for me, so I'll review and proceed with #3953 instead.

@LuxxxLucy
Copy link
Contributor Author

Closing in favour of #3953

@LuxxxLucy LuxxxLucy closed this Apr 19, 2024
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

2 participants