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 23:59:06 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Please keep the list copied for further replies.

"Matthew H. Plough" <address@hidden> writes:

> On Nov 30, 2005, at 16:47 PM, David Kastrup wrote:
>> 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.
>
> Since I obviously have no clue how the code works, I'll refrain from
> trying to analyze it!  I didn't know it was possible to be that far
> off.
>
> Anyway, I've uploaded a set of files that causes a problem:
> http://www.princeton.edu/~mplough/previewlatex/Lab5.zip .  When you
> unarchive it, open lab5.tex and try to use preview-latex with it.
> Notice that .pdf files are used as graphics -- pdflatex in the Mac
> teTeX distribution handles these gracefully, even without including
> the [pdftex] option in \usepackage{graphicx} -- that's why I want to
> use pdflatex.
>
> The C-c C-l run buffer, saved in lab5output.txt, shows that
> ghostscript is run several times when regular latex is used.  This
> could be because of errors with each .pdf figure, but I'll refrain
> from analysis.  When pdflatex is used, it runs only once, but only
> the first preview is generated.

Ok, the source file contains 65 preview-latex images.  7 of those are
_PDF_ files which are included in a manner that declared them to be
PostScript.  dvips includes them, and Ghostscript understandably fails
on them.  After Ghostscript crashes, preview-latex restarts it.  There
is a total of 8 GhostScript runs: this accounts perfectly for 7
restarts of Ghostscripts.

So the stuff is working as expected under dvips after all.  If you
want to have this work properly, you need to convert all pdf files to
eps with pdf2eps (for example) and use \includegraphics without
specifying a file extension: it will then pick up either the .pdf file
or the .eps file, depending on whether it is run by LaTeX or PDFLaTeX.

> The problem also happens in a file that only includes equations, but
> ghostscript is run only once when regular latex is used.
>
> Any ideas?

Well, my first analysis was wrong: the dvips case seems fine after
all.  You just happen to throw junk at it, which then is dealt with as
good as possible.

So we need to return to the PDFLaTeX case.  Could you send the output
of the run buffer (C-c C-l) for that, please?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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