Skip to content

Easier text decoration #34

Description

@hchauvet

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)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions