PHP - LaTeX 渲染
我正处于一个新项目的设计阶段,该项目将获取数据集并将其加载到文档中,然后围绕模板渲染文档。渲染的文件可以是 CSV 数据集、PDF 营销信函、电子邮件……很多东西。数据不会是数学方程,我只是在寻找一种优雅的方法,将许多数据源连接到许多文档中,并在许多模板中输出,
我对在 php 中使用乳胶完全一无所知。那里有这样的东西吗?我能找到的大部分插件都集中在将乳胶方程渲染成一个PNG,而不是让我在PDF、CSV、原始文本等之间做出决定……
或者,我可以用其他东西来做到这一点吗?
I am in the design stages of a new project which will take a data set and load it into a document, then render the document around a template. The rendered file could be a data set of CSV, a PDF marketing letter, an email, ... a lot of things. The data will not be math equations, I'm simply looking at an elegant way of connecting many data sources into many documents and outputting in many templates
I'm entirely in the dark here with using latex in php. Is there anything like this out there? Most of what I could are plugins find is focused on rendering latex equations into one PNGs rather than allowing me to decide between PDF, CSV, raw-text, etc...
Alternatively, could I do this with something else?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几年前(2002 年?)我已经使用 smarty 模板实现了这种方法,并使用相同的数据生成 PDF、CSV、HTML、XML(通过 Smarty 模板不会有问题)......可能是你可以看看 fpdf.org ...
编辑:也许你可以看看 http:// /railscasts.com/episodes/220-pdfkit(可能有为此存在的 PHP pear 包等吗?)
I have implemented such an approach years (2002?) ago with smarty templates and producing PDF, CSV, HTML, XML (would be no problem via Smarty Template)......from the same data....May be you can take a look a fpdf.org ...
EDIT: May be you can take a look at http://railscasts.com/episodes/220-pdfkit (May be there existing an PHP pear package etc. for this ?)
我不确定这是否是您正在寻找的,但是存在能够在客户端呈现 LaTeX 公式并使用 LaTeX 也使用的字体在浏览器中显示它们的 JavaScript 库。为此,请查看 MathJax 或其前身 jsMath。
I'm not sure whether this is what you are looking for, but there exist JavaScript libraries that are able to render LaTeX formulas on the client-side and display them in the browser using the fonts that are also used by LaTeX. For this, have a look at MathJax or its predecessor jsMath.