Is there a calculator with LaTeX-syntax?

前端 未结 17 2028
北海茫月
北海茫月 2020-12-12 17:00

When I write math in LaTeX I often need to perform simple arithmetic on numbers in my LaTeX source, like 515.1544 + 454 = ???.

I usually copy-paste the

17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 17:58

    There is none, because it is generally not possible.

    LaTeX math mode markup is presentational markup and there are cases in which it does not provide enough information to calculate the expression.

    That was one of the reasons MathML content markup was created and also why MathML is used in Mathematica. MathML actually is sort of two languages in one:

    • presentation markup
    • content markup

    To accomplish what you are after you'll have to have MathML with comibned presentation and content markup (see MathML spec).

    In my opinion your best bet is to use MathML (even if it is verbose) and convert to LaTeX when necessary. That said, I also like LaTeX syntax best and maybe what we need is a compact syntax for MathML (something similar in spirit to RelaxNG compact syntax).

提交回复
热议问题