kmgb / latex_input

Use LaTeX-style inputs to write the equivalent unicode characters anywhere.
GNU General Public License v3.0
0 stars 0 forks source link

Properly support font variants #8

Closed kmgb closed 2 years ago

kmgb commented 2 years ago

Now you can stack bold with mathfrak, bold with mathcal. Symbols can also be bolded, italicized or both — 𝜋 𝛑 𝝅. When converting the AST, a global font context stack is used to keep track of which character variants to use for the conversion. Mathematical variants are always preferred if available, as they are usually more standardized symbols.

There are interactions between functions that can be surprising:

These can be confusing, but so is LaTeX in general. I think the addition of catchall \i and \b functions for italic and bold are a big step up from the different incompatible functions required by LaTeX for bold math symbols, bold text, etc.

Resolves #7