Kolaru / MathTeXEngine.jl

A latex math mode engine in pure Julia.
MIT License
97 stars 19 forks source link

Bold greek letters #124

Open lukas-weber opened 1 month ago

lukas-weber commented 1 month ago

First of all, thank you for this wonderful package! I had no idea that it was from somebody in CFEL!

I noticed that it is not possible to create bold greek letters at the moment. \mathbf{ε} which produces a regular ε, probably because ε is part of the font’s special_chars, which will always filter it and redirect to the NewCMMath-Regular font.

In usual LaTeX this is circumvented by commands like \boldsymbol or \bm which do some complicated font replacements (therefore this issue may be connected to #107.

But rather than implementing something arcane like \boldsymbol, maybe it would be nice to just make it work out of the box with \mathbf: If you are in non-regular font, just ignore the special characters and try to fetch them from the respective font. This would break something like \mathbf{a \sum b} but in most cases people would not try to do that anyway, right?

I’m happy to implement it either way.

It turns out that NewCM-Bold contains the bold greek letters, which is enough for me, but not things like bold ∇. No idea where they would be found.