是否有 Visual C 的库?呈现数学公式?
我一直在寻找,但找不到任何免费的东西可以让我简单地在窗口上显示数学公式。我找到了 Visual C++.net 的一个,但没有 API。那里有吗?
I've been looking all over, but I can't find anything free that will let me simply display math formulas on a window. I found one for Visual C++.net, but no APIs. Are there any out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
数学公式是什么格式?
我的第一个冲动是尝试找到一个用于 C++ 的 LaTeX 库,它可以让您将 LaTeX 渲染为图像。这样您就可以显示最基本的公式,但公式必须采用 LaTeX 格式。
What format are the Math formulas in?
My first impulse would be to try and find a LaTeX library for C++ which will let you render out LaTeX to an image. That way you could display most basic formulas, but the formulas would have to be in the LaTeX format.
尝试 ReforMath (http://reformath.webnode.com)。可在 Windows 和 Linux 下运行。虽然它尚未完成,但可以渲染许多元素。
Try ReforMath (http://reformath.webnode.com). Runs under both Windows and Linux. It is unfinished though, but can render a number of elements.
多么好的问题啊!是的,现在有:latexpp。
您必须首先安装 VS 2017 Community,并检查最少量的 C++ 功能(因此不需要花费一整天)。
然后使用二进制文件(尝试最新的)安装Boost。
但你仍然需要增强动力。通过使用 VS >工具> Visual Studio 命令提示符。 CD 到您的 boost 目录并运行
.\bootstrap.bat
,然后运行 .\bjam.exe
。这需要一整天的时间。好消息是,到目前为止,它似乎可以在 VS 2017 社区的 64 位 Windows 7 和最新的 boost 1.6.x 上运行。
Latex 库还有其他要求,我还没有尝试过,但如果有任何问题,我会在这里发布我的笔记。
Make sure all your directories are short, such as
C:\VisualStudio2017
. However, boost will then fail if you use your regular windows command prompt unless you do thevcvarsall.bat
trick. The VS Command Prompt does that for you, so that boost can find your MSVC stuff. Boost would still probably fail if you used the default directory and didn't use the VS command prompt.因此,我的 boost 位于
C:\boost_{blah version}
中,假设您只使用一个版本的 boost,您应该将其缩短为C:\boost
。原因之一是,如果您必须将相应的
/bin
目录添加到系统Path
中,那么您不会因为最大化Path< 的长度而失败。 /code> 值(是的,它有最大长度)。而且东西很容易找到,特别是从命令行,所以你可以快速
cd
到那里。如果您不想要C:\
中的所有内容,请创建一个C:\__TOOLS
或简短的内容。当我渲染出 LaTeX 后,我会在这里发布我的笔记。
注意
What a great question! Yes, there is now: latexpp.
You'll have to install VS 2017 Community first with the minimal amount of C++ features checked (so it doesn't take all day).
Then you install Boost using the binary (try the latest).
But you still have to build boost. By using the VS > Tools > Visual Studio Command Prompt. CD to your boost directory and run
.\bootstrap.bat
, then.\bjam.exe
. This will take all day.Good news is it seems to be working so far on Windows 7, 64-bit with VS 2017 community and the latest boost 1.6.x.
The Latex library has other requirements, and I still haven't tried it but will post my notes here if any hickups.
Make sure all your directories are short, such as
C:\VisualStudio2017
. However, boost will then fail if you use your regular windows command prompt unless you do thevcvarsall.bat
trick. The VS Command Prompt does that for you, so that boost can find your MSVC stuff. Boost would still probably fail if you used the default directory and didn't use the VS command prompt.So, again, my boost is in
C:\boost_{blah version}
which you should shorten toC:\boost
assuming you'll only use one version of boost.One reason is that if you have to add the respective
/bin
directories to your systemPath
, then you won't fail by maxing out the length ofPath
value (yes, it has a max length). Also stuff is easy to find and especially from the command line so you cancd
quickly there. If you don't want everything inC:\
then make aC:\__TOOLS
or something short.I will post my notes here when I've gotten LaTeX rendered.
Notes
ctrl-C
at the command line once. This seems to unhang it without canceling the install.