[tex-live] dvipng woes

Paul Mantz pcmantz at gmail.com
Wed Oct 10 21:26:22 CEST 2007

Hello everyone,

I am doing some .png rendering of LaTeX documents for web display
with MacTeX on OS X 10.4.10 using the following toolchain:

.tex to .dvi (latex)
.dvi to .png (dvipng)
.png to .png (ImageMagick convert, just doing general polish)

I should also note that I am doing this from within Apache, and using
a custom-created type1 Trebuchet MS font from a .ttf file, a bunch of
custom classes, and non-standard packages.  They were originally
stored in my ~/Library/texmf directory, but I moved them to
/usr/local//texlive/texmf-local, which I later found out is a result
of Apache not providing a $HOME variable in the environment, which
messes up kpathsea's path expansion.

Anyways, that solved problems I had with LaTeX, but I noticed I was
still having problems with dvipng.  The issue is that my fonts are not
being detected by dvipng.  When I open up my .dvi files with xdvik
(using X11), I find that this stage of rendering is working correctly.
 Also, when I run dvipng  from the command line, dvipng is able to
find my font in my home directory, and uses that.

After some searching and looking at debug output of dvipng, I found
the following snippet in the documentation of dvipng:

2.4 Installation outside the texmf tree

In some cases, a dvipng binary installed outside the texmf tree will
not be able to find virtual fonts, or the PostScript font maps
(normally used by dvips). This may be because only $SELFAUTOLOC,
$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree
configuration file `texmf.cnf'. If so, give the switch
`--enable-selfauto-set' to `./configure'. This will make dvipng adjust
these three internally so that kpathsea thinks that dvipng is
installed in the texmf tree.

This pretty accurately describes my problem to the letter, but I don't
know anything about the compile-time options sent when the MacTeX
package was created.  I emailed Richard koch, and said that the MacTex
binaries are created from texlive, then packaged up for easy
distribution.  So my question is, does anyone know if this flag is
used at compile-time by default, and if not, what would be the best
way to go about replacing my current binary with a correctly
configured one?  What options would I need to pass it for it to work
correctly in OS X?  will I have to risk rebuilding any toolchains?

Paul Mantz

More information about the tex-live mailing list