有带LaTeX语法的计算器吗? [英] Is there a calculator with LaTeX-syntax?

查看:836
本文介绍了有带LaTeX语法的计算器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在LaTeX中编写数学运算时,我经常需要对LaTeX源代码中的数字执行简单的算术运算,例如515.1544 + 454 = ???.

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

我通常将LaTeX代码复制粘贴到Google中以获得结果,但是我仍然必须手动更改语法,例如

I usually copy-paste the LaTeX code into Google to get the result, but I still have to manually change the syntax, e.g.

\ frac {154,7} {25}-(289-\ frac {1337} {42})

\frac{154,7}{25} - (289 - \frac{1337}{42})

必须更改为

154,7/25-(289-1337/42)

154,7/25 - (289 - 1337/42)

编写程序来执行最常用的操作似乎很简单. 有计算器可以理解这种语法吗?

It seems trivial to write a program to do this for the most commonly used operations. Is there a calculator which understand this syntax?

我知道完全是不可能的(由于停止问题).对于我需要的简单情况,这样做是微不足道的. \ frac,\ cdot,\ sqrt和其他一些标签可以解决问题.该程序可能会在无法理解的情况下返回错误.

I know that doing this perfectly is impossible (because of the halting problem). Doing it for the simple cases I need is trivial. \frac, \cdot, \sqrt and a few other tags would do the trick. The program could just return an error for cases it does not understand.

推荐答案

LaTeXCalc项目就是为此目的而设计的.它将读取一个TeX文件并进行计算.有关更多信息,请访问 http://latexcalc.sourceforge.net/

The LaTeXCalc project is designed to do just that. It will read a TeX file and do the computations. For more information check out the home page at http://latexcalc.sourceforge.net/

这篇关于有带LaTeX语法的计算器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆