[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] preview-latex with pdftex and a pdf2png tool

From: David Kastrup
Subject: Re: [AUCTeX] preview-latex with pdftex and a pdf2png tool
Date: Wed, 12 Oct 2005 23:55:49 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Reitter <address@hidden> writes:

> I've found this little tool that will convert pdf to png for me.
> How would I go about telling preview-latex to use the tool to
> convert the PDFs generated (when using PDF Mode) to PNGs?

By writing wagonloads of Elisp code and making sure that the tool does
the right job in all circumstances, for example with bounding boxes
and resolutions.  Here is how we integrated dvibitmap into
preview-latex for getting around GhostScript in the DVI case as much
as possible: Jan-Åke made sure that dvibitmap did the right job by
looking at it, scrapping it and writing dvipng from scratch, and he
and myself wrote wagonloads of Elisp code to integrate it into
preview-latex (which took me an inordinately long time and worked by
Jan-Åke giving up on me and writing something horrible himself which I
subsequently had to help replace by something proper).

> I've had a quick look at "Preview Gs Image Type Alist", in
> particular the dvipng entry, for which the appropriate info page
> suggests that this is what is used to convert PDF to PNG. Here,
> however, I can only set some Ghostscript options - but GS is exactly
> what I'd like to avoid by using my own pdf2png tool.
> I'd be most grateful to someone who could set me on the right track
> here...

You'd have to rather work with preview-image-creators.

And you'd pretty much on your own since that program appears to be
MacOSX-only.  And if it goes by Quartz, I find on

    It works well enough for solving the problem of converting screen
    shots, but seems to generate rather trashy PNG files if processing
    anything other than PDF based bitmaps.

And you are not talking about PDF based bitmaps, so this would appear
to apply.  GhostScript may not be the fastest PDF renderer, but it
works in queued mode and thus passes through the on-screen stuff
first, and it has good quality.

There is quite a bit of code duplication in the various renderers in
preview-latex.  Probably some of that should be reduced by saner

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]