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

Easier text decoration #34

Open
hchauvet opened this issue Nov 30, 2021 · 0 comments
Open

Easier text decoration #34

hchauvet opened this issue Nov 30, 2021 · 0 comments
Milestone

Comments

@hchauvet
Copy link
Owner

Add a way to highlight part of text using simple syntax inside the text command.

Example

my_highligth = (
{"color": "Crimson",  "font-weight": "bold"},
{"underline":  ("1px", "lightblue")}
)
text("This is my <equation> $$x = \sqrt{<3 + 5>}{2}$$", highlight=my_highlight)

This will produce "equation" with crimson color + bold weight, and underline "3+5" in latex equation.

We could be inspired by some libraries developed for matploltlib text:

Works need to be done to decipher if the decoration should be done in Latex before the conversion to SVG by dvisvgm or directly in SVG after the conversion from latex (but in this case we need to link each letter of the python string to the SVG output)

@hchauvet hchauvet added this to the 1.0 milestone Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant