Hello, On Tue, 14 Jul 2009, Anthony DeRobertis wrote: > On Tue, Jul 14, 2009 at 09:42:12AM +0530, Kapil Hari Paranjape wrote: > > The current values are computed by the functions defined in dvips.def > > which convert from postscript points to TeX points. > > I don't know the code at all, but I'd like to point out that the Debian > default is for dvipng to be used, not dvips/ghostscript.
The dvipng conversion comes later, _after_ tex4ht has written out the measures. Here is brief explanation of what is happening: 1. TeX reads the bounding box of your graphic. The unit of measure for this bounding box is postscript points. 2. The definitions in dvips.def are commands for TeX to convert these measures into TeX pts. These are used as parameters of the "special" box in the dvi file. 3. tex4ht intercepts these values and writes them to the html file. 4. dvipng processes the dvi file in order to produce the png graphic that is attached to the html file. (It uses ghostscript for such conversion.) To decide on the pixel size required it uses the dimensions provided in the dvi file and the "dpi" option in its command line (which is controlled by the entry in tex4ht.env). The problems with this process are: a. The HTML spec does not allow physical measures to be provided inside an HTML file. b. Round-off errors due to repeated conversion between different units. As I remarked earlier, (a) can be solved by moving the units to the CSS file but I do not really see how to solve (b) in a manner that will be consistent with the rest of the conversion process. Regards, Kapil. --
signature.asc
Description: Digital signature