bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] preview-latex bug with pdflatex


From: David Kastrup
Subject: Re: [Bug-AUCTeX] preview-latex bug with pdflatex
Date: Wed, 30 Nov 2005 22:47:06 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Unfortunately, you are mixing old and new content in this posting in a
way that is hard to figure out.

Matthew H. Plough <address@hidden> writes:

> I am able to reproduce the problem that Björn Pedersen reported on
> August 29; his original posting is at
> http://comments.gmane.org/gmane.emacs.latex.preview.devel/1321 .
>
> The problem is fairly simple.  When pdflatex is used instead of
> latex, a pdf containing all of the previews is generated, and pdf2dsc
> is run, generating a .dsc file that references the .pdf file.
> However, ghostscript only gets run once on that file, so only the
> first preview image is extracted.

Non sequitur.  GhostScript gets run only once _on_ _purpose_ whenever
things are working correctly: this single run generates _all_ images.

> However, no errors occur.
>
> David Kastrup asked: I don't think so, or there would be more error
> messages.  Sorry, this posting appears to have remained unanswered
> very long.  I can't reproduce the problem.  Is it still there?
>
> Yes, the problem is still there, but I think I know why it is
> happening.  Here are the steps to reproduce (I'm running Aquamacs
> Emacs 0.9.6 and a build of AUCTeX and preview-latex from source on
> Mac OS X 10.4):
>
> - Fire up Aquamacs Emacs and open a .tex file containing some
> equations.  Make sure that regular latex is being used, so a .dvi
> is generated and dvips is run.
>
> - Press C-c C-p C-d to generate all previews for the document.
> Press C-c C-l (ell) to see compilation results.  Note that ghostscript
> gets run a whole lot of times.

If GhostScript gets run more than once, this is a bug, and it is
probably an accident that this works at all.

> - Switch to pdflatex using the configuration options (save for
> session and for future use).
>
> - Press C-c C-p C-d again, to generate previews.  Note that all
> previews still show up.  Press C-c C-l to see compilation results;
> note that ghostscript gets run only once.

Which would be correct behavior.

[...]

> I'm a programmer, but I don't know elisp, so I can't do an in-depth
> analysis, but here's what I think is happening.  When the output is
> a dvi, dvips gets used, and then a loop runs that extracts each
> preview.

But this "loop" does not restart GhostScript, but uses just a single
session of it, feeding it through the command line.

> However, when the output is a pdf, pdf2dsc gets used, but then there
> isn't any loop that extracts the previews.  Thus, only the first
> preview gets extracted.

Your analysis is wrong.  It looks like we should first concentrate on
figuring out the problem in the dvips case, namely why GhostScript is
run more than once.  Please send a run buffer (from C-c C-l) for that
case.

If we fix that, it might well be that the PDF problem goes away as
collateral.  Apart from which, the dvips case should get faster by a
factor of at least 10.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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