0

我正在使用https://github.com/opencollab/jlatexmath来解析 Java 中的乳胶数学公式。当试图解析一个简单的复数时:

TeXFormula tex = new TeXFormula("32 + 45~i");

我得到以下异常:

org.scilab.forge.jlatexmath.ParseException: Unknown character : '~' (or 126)

如本文档中所述,字符“~”应该是一个牢不可破的空格。https://en.wikibooks.org/wiki/LaTeX/FAQ#Non-breaking_spaces

使用 '~' 的原因是因为我想渲染由不同库返回的乳胶公式:mathjs.org,它在某些公式中包含 '~' 字符。

jlatexmath 是否支持 '~' 或者我必须使用不同的间距命令?

4

1 回答 1

0

JLaTeXMath 现在允许使用 ~: https ://github.com/opencollab/jlatexmath/commit/27ffa7082efa75e6f86e8788f5cbe2156aa15f5c

随时报告错误。

于 2016-10-24T18:59:00.427 回答