Forum archive 2000-2006

Jan-Åke Larsson - dvipng 1.0 release

Jan-Åke Larsson - dvipng 1.0 release

by Arnold Pizer -
Number of replies: 0
inactiveTopicdvipng 1.0 release topic started 3/30/2004; 6:22:33 AM
last post 4/9/2004; 3:02:25 PM
userJan-Åke Larsson - dvipng 1.0 release  blueArrow
3/30/2004; 6:22:33 AM (reads: 1493, responses: 5)

Release notes for dvipng 1.0:

This program makes PNG graphics from DVI files as obtained from TeX and its relatives.

Dvipng has undergone a number of improvements and bugfixes since being first released in the 0.x number series a year ago. The 1.0 release changes the behaviour of the -D switch and simplifies choice of resolution greatly (see below for details).

It has been tested to a fair degree. Note the disclaimer in the COPYING file. Report any bugs you find, see README for instructions.

People who are upgrading from version 0.9 or earlier should read the following:

This release changes the -D (resolution) option to specify the output resolution rather than the previous base resolution. Changing output resolution from the default 100 dpi will now only need the -D option, as dvipng now calculates the required magnification and thus can render PK fonts suitable for any output resolution. There is no need anymore to specify by hand the base resolution, the Metafont mode, the quality, and the magnification. 

If you really want to use a Metafont mode different from the default `cx' mode, the separate --bdpi option is used for specifying the corresponding base resolution.

In short, choosing the output resolution has become simple even when using PK fonts (but remember, the created PK fonts are normally cached on disk).

<| Post or View Comments |>

userJan-Åke Larsson - Re: dvipng 1.0 release  blueArrow
3/30/2004; 6:25:52 AM (reads: 1745, responses: 0)
From the manual:

`-D num'
     Set the output resolution, both horizontal and vertical, to num
     dpi (dots per inch).
     One may want to adjust this to fit a certain text font size (e.g.,
     on a web page), and for a text font height of font_px pixels (in
     Mozilla) the correct formula is
          dpi = font_px * 72.27 / 10 [px * TeXpt/in / TeXpt]
     The last division by ten is due to the standard font height 10pt in
     your document, if you use 12pt, divide by 12. Unfortunately, some
     proprietary browsers have font height in pt (points), not pixels.
     You have to rescale that to pixels, using the screen resolution
     (default is usually 96 dpi) which means the formula is
          font_px = font_pt * 96 / 72 [pt * px/in / (pt/in)]
     On some high-res screens, the value is instead 120 dpi. Good luck!

<| Post or View Comments |>

userBrian R. Furry - Re: dvipng 1.0 release  blueArrow
4/2/2004; 8:12:16 PM (reads: 1720, responses: 0)
For Debian users dvipng-1.0 is also in Debian unstable.


<| Post or View Comments |>

userThomas R. Shemanske - Re: dvipng 1.0 release  blueArrow
4/8/2004; 9:58:05 AM (reads: 1720, responses: 0)
I have been playing with webwork2, and using dvipng .9 was able to get problems to display.  Under dvipng 1.0, things seem very erradic.

In /var/pg/lib/WeBWorK/PG/ I have changed the dvipng arguments as follows:

use constant DVIPNG_ARGS => join " ", qw(
#-mode toshiba

I tried rendering some pages; some displayed with no math rendered, some with correct math rendering, some with very large math rendering.

I have numerous times logged out, flushed the browser cache,quit and restarted the browser, rm all tmp files created by WW, and still erradic results occur.  As I scroll through a list of problems, some are text, some are perfect, and some are large math.

Here is a sequence of events and screenshots with one instance which is reasonably reproducible:

First access, no math:

Reload page, now get large math:

rm all png files from tmp directories

With other files, I cannot ever seem to get to a correct image.




<| Post or View Comments |>

userJan-Åke Larsson - Re: dvipng 1.0 release  blueArrow
4/8/2004; 10:45:14 AM (reads: 1734, responses: 0)
Have you tried dvipng from the command line? It is impossible to figure out which component of WeBWorK that fails from your report. Try using dvipng on the command line with the same options as you give above, and see if there is any hint of trouble. If all is well, you will get the "perfect" PNGs you want, if not please report so. (In that case, report warnings that are generated, what the PNG output was, and what system you are using).

Oh, and -Q6 -D180 -x4000.5 for dvipng 0.x would translate to a single -D120 for the new dvipng 1.x. That is, 180*4/6=120. Also, you will get 36 graylevels for PK fonts when using the old dvipng (6*6 from -Q6), and that may be a bit slow.

<| Post or View Comments |>

userThomas R. Shemanske - Re: dvipng 1.0 release  blueArrow
4/9/2004; 3:02:25 PM (reads: 1686, responses: 0)
I tested dvipng alone and it was fine;  I downloaded a new CVS copy of webwork-modperl and pg and changed the arguments in
/var/pg/lib/WeBWorK/PG/ to

use constant DVIPNG_ARGS => join " ", qw(
#-mode toshiba

and things seems stable from the image point of view.  Not sure what the issue really was.

<| Post or View Comments |>