views:

328

answers:

1

I'm curious as to whether a native .NET renderer for TeX/LaTeX exists. So for in my search the closest I have been able to find is a Java implementation, JMathTeX. I am tempted to port this to C#, but before I do so, I would simply like to check whether anyone is aware of a .NET implementation out there.

My curent thuoghts are to use MiKTeX along with dvipng to compile the TeX source and render the generated DVI as a PNG, but I'm still worrying this may have un unacceptable amount of overhead, not to mention the need to bundle MiKTeX with the given program.

+1  A: 

If I'm not mistaken, TeX is written in a dialect of Pascal, and when compiled today it's generally first compiled into standard C, then compiled with a C compiler to produce the final binary. It might be feasible to instead compile the original Pascal code into C# and perhaps write a wrapper around it in C# to be able to use it as a library.

Of course this is a rather large project to take on and is probably overkill for your problem at hand.

nielsm
Interesting suggestion. It might be worth compiling to C, and then wrapping in a managed C++/CLI library, I'm thinking.
Noldorin
Seems you are right. TeX is written in WEB, a variant of Pascal, then compiled into C using http://www.tug.org/web2c/.
Noldorin