Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTex for .NET

I am using ItextSharp to generate PDF. Part of our output, we have a lot of math related content. Maybe we can use some kind of Latex library to feed the result to ItextSharp to produce PDF. I have been googling for a while now but found nothing. Do you know if there is a latex library for .NET exists?

Also, do you know if ItextSharp can handle this without this Latex help?

like image 694
John Lamber Avatar asked Apr 20 '09 21:04

John Lamber


2 Answers

It probably doesn't exist yet, but it shouldn't be an impossibly big project to compile TeX for C#. The original TeX was written in a version of Pascal, which is nowadays automatically translated into C by web2c. So it would just be a "small matter of programming" to make web2c produce C#, and to translate the supporting libraries (kpathsea, and whatever parts of pdftex you need - probably not nearly all of it) to be compatible.

Apart from that, there seems to be a GSoC project to extract the math rendering engine of Matplotlib into a separate library. Assuming that the library will be pure Python, you could use it via IronPython. So if you can wait until the end of the summer, that might be just what you need.

like image 167
Jouni K. Seppänen Avatar answered Nov 10 '22 23:11

Jouni K. Seppänen


The GSoC project owner got back to me on the new project to externalize Mathtext to a new python library called MathTex.

He said that his work depends on a library called FT2FONT which is a wrapper around a C++ library. It would be trivial, for someone with good .net font knowledge, to take this work and use the wrapper to wrap the .net Font library and allow it to be used in IronPython.

like image 3
joejoeson Avatar answered Nov 11 '22 00:11

joejoeson