Greek Fonts For Katex
Solution 1:
KaTeX doesn't currently support Greek letters as input, though as the comment says, \nu does work. See this issue for more details: Symbol unicode replacement doesn’t work
Solution 2:
Different formulae-rendering js libs behave in one of 3 different ways:
- process
\piand tolerateπ (MathJax; MathQuill, although the result is somewhat different) - process
\pibut don't tolerateπ (jsMath, KaTeX) - don't process
\piand tolerateπ (jqMath)
Unfortunately, like Ben has answered, KaTeX is not the one that tolerates raw greek characters. However, you may try to do some pre-parsing to "fix" this in a manner like this: before
<script>renderMathInElement(document.body,{delimiters:
[{left: "$", right: "$", display: false}]
});</script>add some "replace" stuff like desribed here (replace π with \pi and so on), although you should modify replaceTextOnPage function proposed there to replace all greek letters at once rather than launch a copy of replaceTextOnPage many times. You can do some other optimization since the solution there is somewhat general purpose but you know where to expect formulae on you pages.
Post a Comment for "Greek Fonts For Katex"