Discussion:
[Dvipng] Mssive PNGs generated with dvipng
Nimish Telang
2007-12-12 22:13:39 UTC
Permalink
Hello,
When I use dvipng to generate pngs of any latex using a valid
\documentclass, the generated png is extremely large even if
the options '-T tight' are given. If the documentclass is invalid and latex
generates a dvi file, (after pressing enter wherever it asks a question),
dvipng crops the
png to be as large as the mathematical figure.

example:

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
$\frac{x}{y}$
\end{document}


will make a png of size 2140x7120

whereas

\documentclass{}
\usepackage{amsmath,amssymb}
\begin{document}
$\frac{x}{y}$
\end{document}

will make a png containing just \frac{x}{y} typeset and cropped, after
simply pressing enter to each of latex's questions regarding a missing class
file.

How can I make a properly cropped png with no extraneous whitespace without
any latex errors? (I'm trying to batch process quite a few files).

I'm running on Windows Vista x86, with dvipng version 1.9; kpathsea 3.3.2


Thanks
Paul Mantz
2007-12-12 22:17:56 UTC
Permalink
Have you looked at the bottom of the graphic for for a little '1'? I
bet what's happening is that you're not suppressing page numbering, so
it's rendering that as well, and not cropping to just the snippet of
text you want. be sure to put "\pagestyle{empty}" in your document to
keep it from rendering.

Best,
Paul
Post by Nimish Telang
Hello,
When I use dvipng to generate pngs of any latex using a valid
\documentclass, the generated png is extremely large even if
the options '-T tight' are given. If the documentclass is invalid and latex
generates a dvi file, (after pressing enter wherever it asks a question),
dvipng crops the
png to be as large as the mathematical figure.
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
$\frac{x}{y}$
\end{document}
will make a png of size 2140x7120
whereas
\documentclass{}
\usepackage{amsmath,amssymb}
\begin{document}
$\frac{x}{y}$
\end{document}
will make a png containing just \frac{x}{y} typeset and cropped, after
simply pressing enter to each of latex's questions regarding a missing class
file.
How can I make a properly cropped png with no extraneous whitespace without
any latex errors? (I'm trying to batch process quite a few files).
I'm running on Windows Vista x86, with dvipng version 1.9 ; kpathsea 3.3.2
Thanks
_______________________________________________
Dvipng mailing list
http://lists.nongnu.org/mailman/listinfo/dvipng
Loading...