Alex
2009-09-29 22:55:02 UTC
Hello,
I've just recently discovered the dvipng project, and am considering
using it for on-the-fly TeX rendering of mathematical expressions, for
which it would seem to be suitable. However, I am slightly curious as to
how this process should work. (My apologies if this is detailed in the
docs, but I couldn't find anything). Firstly, I presume the only way to
generate the DVI file from the TeX input is to use the TeX command-line
utility. The next step would seem to be to use the dvipng command-line
utility to convert this DVI to a PNG file. This is of course no problem
for a GUI app, though somewhat inefficient I might think.
My main question is: is dvipng suitable to be used as a static/dynamic
library for inclusion in other programs? (In addition, I would be
curious to know whether it is possible to use a library rather than a
stdio program for generating the DVI.)
I am presuming that both the DVI generator of TeX and the PNG generator
of dvipng are designed to output solely to files. Still, if there is any
way of circumventing this and doing things in-memory, that would be
useful for me.
A final small query: is compiling dvipng for Windows possible (given
that it is my primary target platform), or perhaps via cygwin, if that's
less painful? Using MiKTeX should make no difference, as I understand.
Many thanks,
Alex
I've just recently discovered the dvipng project, and am considering
using it for on-the-fly TeX rendering of mathematical expressions, for
which it would seem to be suitable. However, I am slightly curious as to
how this process should work. (My apologies if this is detailed in the
docs, but I couldn't find anything). Firstly, I presume the only way to
generate the DVI file from the TeX input is to use the TeX command-line
utility. The next step would seem to be to use the dvipng command-line
utility to convert this DVI to a PNG file. This is of course no problem
for a GUI app, though somewhat inefficient I might think.
My main question is: is dvipng suitable to be used as a static/dynamic
library for inclusion in other programs? (In addition, I would be
curious to know whether it is possible to use a library rather than a
stdio program for generating the DVI.)
I am presuming that both the DVI generator of TeX and the PNG generator
of dvipng are designed to output solely to files. Still, if there is any
way of circumventing this and doing things in-memory, that would be
useful for me.
A final small query: is compiling dvipng for Windows possible (given
that it is my primary target platform), or perhaps via cygwin, if that's
less painful? Using MiKTeX should make no difference, as I understand.
Many thanks,
Alex