在Java中将乳胶转换为png的库 [英] Library to convert latex to png in Java

查看:79
本文介绍了在Java中将乳胶转换为png的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行此操作的最佳库是什么?

What is the best library to do this?

我很惊讶以前没有问过这个问题.不可能吗那也将令人惊讶.

I am surprised this question has not been asked before. Is it impossible? That would be surprising too.

感谢您的帮助.

推荐答案

使用Java显示花式方程 为Java中的公式生成图像

大致来说,您的选择是:

Roughly I'd say your options are:

  • 如果第一个问题适合您的应用程序和Latex的形式(例如,是否包含宏,样式文件和BibTex或仅包含单个方程的整个文档),请使用其中一个提到的Java库.
  • 将texvc作为外部程序执行(如Wikipedia/MediaWiki一样),或通过JNI链接到OCaml代码.

编辑

正如斯蒂芬·C(Stephen C)所说,这些仅用于乳胶的碎片.如果要转换完整的Latex文档,则需要完整的Latex实现-以上都不是.而且它们需要有些大和复杂,因为它们是完整的开发环境",可以通过编写Latex代码来排版文档.如果这是您的需要,您别无选择,只能通过exec使用一种标准的Latex发行版(而且我猜想,如果Latex解释器报告Latex代码中的错误,将会优雅地失败).

As Stephen C said, these are only for fragments of Latex. If you want to convert a full Latex document, you'll need a full Latex implementation - none of the above. And those need to be somewhat large and complex because they are full "development environments" for typesetting documents by writing Latex code. If this is what you need, you don't have much choice but to use one of the standard Latex distributions via exec (and I guess fail gracefully if the Latex interpreter reports errors in the Latex code).

也就是说,至少有两次尝试将Latex移植到Java(包括两次称为"JavaTex"的尝试).很有可能这些状态都不适合您-但请参阅最近为自己做出判断的一些尝试的摘要:

That said, there have been at least a couple of attempts to port Latex to Java (including two called "JavaTex"). Most likely these aren't in a state that would suit you - but see the summary of some recent attempts to judge for yourself:

http://www.monperrus.net /martin/running + tex + on + a + java + virtual + machine

这篇关于在Java中将乳胶转换为png的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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