Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am rolling out my own mathview.el (similar to preview.el but aim to be more efficient) package for editing LaTeX in emacs. Currently it uses dvipng but I would like to use dvisvgm as an alternative. Could someone share how they compile dvisvgm with TeX live 2009 installed to /usr/local/texlive/2009?

The reason I am considering using dvisvgm is that text in pngs doesn't look as thick as normal text in emacs buffer. See this image

mathview.

I am using Snow Leopard 10.6.4. Thanks.

Update:

I don't mind if this question is deleted. Basically the header files of kpathsea must be available. But my tl2009 installation is incomplete so I stopped trying. Also dvipng has a --gamma option to change the darkness of the font, which can be adjusted to make images blend better with text in emacs.

share|improve this question
    
I can’t help you with compiling on OS X. However, dvisvgm is included in TeX Live 2010, which - as far as I know - should be released “soon“. The pretest should be mostly identical to the final version. –  Caramdir Aug 28 '10 at 18:24
    
Upgrade to tl2010 is too big a change at the moment. But will do that in a few months time. Thanks. –  Leo Liu Aug 28 '10 at 18:28
    
I grabbed dvisvgm from tl2010 which doesn't seem to depend on anything else except those come with Snow Leopard. Sadly the output is inferior to inkscape. –  Leo Liu Aug 28 '10 at 22:42
    
Can emacs display svg? News to me.... –  Dima Aug 28 '10 at 23:55
2  
For a long time. It displays svg perfectly; in fact svg has been discussed to be the default image format for emacs. –  Leo Liu Aug 29 '10 at 5:12
show 3 more comments

1 Answer

up vote 1 down vote accepted

dvisvgm cannot be successfully built using the kpathsea library that's installed with TeX Live 2009 on Mac OS X. There are two problems, the first is that the shared library is broken, it cannot be used. This turns out not to be a problem because none of the binaries in the distribution link to the dynamic library. (Someone should fix that; it's probably an artifact of kpathsea using a custom libtool, klibtool, for some reason.) So the dynamic library and its symlink can be safely removed.

The bigger problem is that the kpathsea does not contain kpse_enc_format so the dvisvgm file FileFinder.cpp does not compile. If you comment out the line containing that (essentially preventing dvisvgm from being able to find .enc files), then it builds, but fails make check.

I tried compiling kpathsea myself to see if that would help, but I'm not actually sure how to configure it properly. You have to replace its config.guess and config.sub with newer ones to get it to configure. I'm not really sure how to get it to point at my texmf tree though. I copied the texmf/web2c/texmf.cnf from my tree over the generated one (and fixed up lines ending in \) but after building, the kpsewhich program couldn't find my files.

The best part is that http://mirror.ctan.org/dviware/tkdvi/kpathsea.tar.gz doesn't actually contain kpse_enc_format either; the entire preceding graf was a waste of time. Oh well.

share|improve this answer
    
The Tex Live 2010 pretest message describes dvisvgm as a new program: tug.org/texlive/pretest.html –  Charles Stewart Sep 6 '10 at 13:01
    
Thank you for the effort. I didn't go to that length myself. –  Leo Liu Sep 6 '10 at 14:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.