Hacker News new | ask | show | jobs
by exDM69 3555 days ago
I've got a project where it would be really nice to plot some math formulae with *TeX typesetting and then outputting raster or vector data in memory (to be rendered in a graphics engine).

Do you think such a thing would be possible with LuaTeX? I did glance over the article you linked and it's showing that it works pretty nicely for basic text, but can anyone shed some light if this works nicely for outputting equations, etc?

2 comments

(Lua)TeX only renders PDF and only on disc. The great typesetting (especially the math formulae) would make it feasible for such a job.

Depending on your need, LuaTeX can be quite fast. I have a project where I use a non-optimized version of LuaTeX to have a 'live' preview of a web form. It takes less than 1/2 second to run LuaTeX, generate a bitmap from the PDF and push it to the user. In most cases this will be too slow, but for me this was a good solution.

speeddata looks absolutely amazing as an alternative to (what's also an amazing piece of OSS) Scribus and (in my mind the paragon) Framemaker.

For technical documents, I've been using: TeknikCenter (for maintaining build scripts and asset management) + Bibtex + Tikz (for graphs/charts, etc) & I can get a final PDF that's fairly close to something I consider nicely laid out (https://www.utdallas.edu/~herve/abdi-awPCA2010.pdf - John Wiley & Sons, Inc's template done in some variant of TeX (apparently Wiley, Elsevier, Springer all use TeX for their masters which go to plate for press)). Scrbook, memoir and book all are 'almost there' but not quite.

Images have been pretty much the most difficult problem to render 'properly'. Using DOT has alignment/font aesthetic issues, especially if I use RST or DocBook as my 'base' document and want to output both to a blog in long-form, available in the classic TeX output (e.g. https://www.mitpress.mit.edu/sicp/full-text/book/book-Z-H-1....) as well as in the "one-page" long-form.

I guess this is a long-winded way of asking, if you have any suggestions (I've read your site and it lacks a "I'm a TeX power user, here are the idioms/conventions/best practices for speedata).

FYI, I'm perfectly okay with half a second (in fact, that's way faster than my TexNicCenter renders!) for what it's worth. Heck, I'm sure some of the old timers remember the troff wait times. Believe youme, it's no trivial feet to get typesetting correct and output in under half a second! Good on you + your team.

You might want [PyX](http://pyx.sourceforge.net/) which takes TeX formula input and can return you SVGs. You could also combine that with Sympy for formula manipulation etc.