C#桌面应用程序中的漂亮打印数学 [英] Pretty printing math in C# desktop application

查看:46
本文介绍了C#桌面应用程序中的漂亮打印数学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#(winforms)桌面应用程序中打印数学方程式的最佳方法是什么?来源的格式并不重要;我几乎不费吹灰之力就可以生成任何东西.重要的是它应该具有相对较高的性能和较低的开销(我知道,我只应该选择{性能,大小,功能}中的2个,但我要全部选择3个.)

What is the best method of printing math equations in a C# (winforms) desktop application? The format for the source is not important; I can generate almost anything with a little effort. What is important is that it should be relatively high performance and low overhead (I know, I'm only supposed to pick 2 of { performance, size, features } but I want all 3.)

我考虑过的事情:

  • 通过System.Process()-> dvipng的LaTeX.问题:即使是最小的LaTeX安装,也大约需要200 MB.考虑到我的应用目前约为40万,我认为这有点多余.
  • 为网络设计的某种基于JS的数学渲染库,例如JSMath.问题:创建HTML输出,仍然需要在WebBrowser中显示它.低(可能非常低)的性能.
  • 滚动我自己的.问题:花费大量时间和精力来复制以前去过的人的作品.很难用C#绘制文本.

有什么建议吗?过去,您有没有做过这样的事情?

Any suggestions? Have any of you done this sort of thing in the past?

推荐答案

有些Google搜索将我带到了这个 MimeTex ,该库可根据乳胶配方生成gif .您必须使用PInvoke才能在C#中使用它,但是所有内容似乎都在本文中.

Some googling lead me to this CodeProject article: it uses MimeTex, a library that generates gif from latex formulas. You'll have to use PInvoke to have it in C#, but everything seems to be in the article.

这篇关于C#桌面应用程序中的漂亮打印数学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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