Hello :-),
I use this font for some projects: https://github.com/khaledhosny/euler-otf. This is an open-source port of AMS Euler, called NeoEuler. I wonder how much difficult would it be to use NeoEuler with KaTeX?
Thanks!
Please also consider adding esstix font (ttf).
Answer to the "compulsory" question "why not STIX":
ESSTIX is _the_ font used by many well known old science books, including Feynman Lectures on Physics, Introduction to Elementary Particles (1st edition, David Griffiths), Mathematical methods in the physical sciences (2nd edition, Mary Boas) and countless others.
STIX font, on the other hand, doesn't have anything to do with it and looks more like MS Word math font. (I personally hate STIX BTW).
(that, and I secretly hope that the online version FLP will someday with to KaTeX+ESSTIX. And any other similar project.).
I had a look at the .ttf files and I couldn't seem to find any that contained plain old italics for latin characters or normal numbers. Am I missing something?
@kevinb7 One of them should definitely have numbers, but there's no text font. In Concrete Mathematics (the book for which the font was made) they used a text font called Concrete:
http://tex.stackexchange.com/questions/103983/how-do-i-use-ams-euler#comment227008_103983
It seems Elsevier didn't include the text font.
But it does contain Greek letters and mathematical symbols.
Anyone know what the text font in this document? It looks pretty close, but I'm not sure.
Any updates on this?
Concrete Mathematics + Palatino is very nice. Both are Hermann Zapf fonts, and he's said they go well together.
It's possible, but it would take some elbow grease. One of the issues is that KaTeX isn't a full TeX engine, we don't support macros or (re)defining commands. I believe that many LaTeX packages redefine certain basic TeX commands to override the default fonts that are used for math like cmr10, cmmi10, cmsy10, etc. Also, KaTeX supports many high level commands but doesn't implement those low level commands that everything is built upon in TeX so swapping out fonts would require a different approach.
Probably the quickest (and dirtiest) way to do this would be to create your own version fontMetrics.js with different fonts. This requires adding .ttf (and maybe .woff, .woff2, .eot) files to /static/fonts, updating metrics/mapping.pl and metrics/extract_tfms.py (this requires the necessary .tfm files for the fonts you want to use to be in your local TeX installation). After everything's set up, run make metrics and then make serve (or just make) and you should be good to go.
Not everybody likes using the same fonts though, so having a way to easily switch between different fonts or at least build different fontMetric.js easily would be preferable, but that would take some design work.
If people are really interested in making this happen hopefully they can use some of this information to implement this feature or at the very least poke at the problem at bit.
Most helpful comment
It's possible, but it would take some elbow grease. One of the issues is that KaTeX isn't a full TeX engine, we don't support macros or (re)defining commands. I believe that many LaTeX packages redefine certain basic TeX commands to override the default fonts that are used for math like cmr10, cmmi10, cmsy10, etc. Also, KaTeX supports many high level commands but doesn't implement those low level commands that everything is built upon in TeX so swapping out fonts would require a different approach.
Probably the quickest (and dirtiest) way to do this would be to create your own version fontMetrics.js with different fonts. This requires adding .ttf (and maybe .woff, .woff2, .eot) files to /static/fonts, updating metrics/mapping.pl and metrics/extract_tfms.py (this requires the necessary .tfm files for the fonts you want to use to be in your local TeX installation). After everything's set up, run
make metricsand thenmake serve(or justmake) and you should be good to go.Not everybody likes using the same fonts though, so having a way to easily switch between different fonts or at least build different fontMetric.js easily would be preferable, but that would take some design work.
If people are really interested in making this happen hopefully they can use some of this information to implement this feature or at the very least poke at the problem at bit.