[OS X TeX] auto-pst-pdf

Peter Dyballa Peter_Dyballa at Web.DE
Wed Aug 12 13:02:38 CEST 2009


Am 12.08.2009 um 10:36 schrieb Doris Wagner:

> Run number 1+5 of 'pdflatex --shell-escape meinbsp.tex'
> ------------
> Latexmk: Saving old .aux file "./meinbsp.aux"

Latexmk takes over control and invokes for its first try:

> This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
>  \write18 enabled.

  --shell-escape accepted!

> [...]
> -------------------------------------------------
> auto-pst-pdf: Auxiliary LaTeX compilation
> -------------------------------------------------

The other automatic steals control, obviously?

> This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
>  %&-line parsing enabled.
> entering extended mode
> LaTeX2e <2005/12/01>

Here an error must have happened! The original pst-pdf package first  
uses pdflatex and then latex to create a DVI output file with  
PSTricks \special's inside which dvips then "solves" saves in  
external files and which ps2pdf converts to PDF that a last and final  
pdflatex runs then inserts in place of PSTricks "place-holders." Auto- 
pst-pdf adds additional runs of this latter pdflatex to update long  
tables, hyperlinks, indices, TOCs, LOFs, etc. When none of these  
exists auto-pst-pdf is not needed.

> [...]
> [1] (./meinbsp-autopp.aux) )
> Output written on meinbsp-autopp.dvi (1 page, 712 bytes).

This looks like latexmk still has control. It looks OK to me, but I  
am not a that experienced user as Herb certainly is.

> Transcript written on meinbsp-autopp.log.
> This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
>  %&-line parsing enabled.
> entering extended mode
> LaTeX2e <2005/12/01>
> [...]
>
> ! Package pdftex.def Error: PDF mode expected, but DVI mode detected!
> (pdftex.def)                If you are using `latex', then call  
> `pdflatex'.
> (pdftex.def)                Otherwise check and correct the driver  
> options.
> (pdftex.def)                Error recovery by switching to PDF mode.
>
> See the pdftex.def package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.345     }\@ehc
>
> ))) (./meinbsp-autopp.aux)

I bet you included a (LaTeX) statement in your source which needs to  
pdfTeX to execute, but it's pdfTeX in DVI output mode which hits this  
statement. I presume it's that:

	\usepackage[
	  ]{pst-pdf}

Can you think of \ifpdftex? The pst-pdf package is not needed for  
latex or pdfTeX in DVI output mode.

> Preview: Fontsize 10pt
> Preview: Tightpage -32891 -32891 32891 32891
> [1] )
> (see the transcript file for additional information)
> Output written on meinbsp-autopp.dvi (1 page, 1904 bytes).
> Transcript written on meinbsp-autopp.log.

The error above probably hit only the AUX file, the job compiled and  
DVI to PS conversion starts:

> This is dvips(k) 5.97 Copyright 2008 Radical Eye Software  
> (www.radicaleye.com)
> ' TeX output 2009.08.12:1020' -> meinbsp-autopp.ps

Maybe I should correct my previous statement about job control: it  
looks as auto-pst-pdf is in *inner* control while latexmk has its own  
idea of running a (pdf)LaTeX job with internal automatic gears. The  
``-autopp´´ file name addition does not come from (auto-)pst-pdf...  
at least I can't see the strings "auto" and "pp" in their  
documentation of the implementation.

> [...]
> -------------------------------------------------
> auto-pst-pdf: End auxiliary LaTeX compilation
> -------------------------------------------------
>
> [...]
> )
> Preview: Fontsize 10pt
> Preview: PDFoutput 1
> <meinbsp-pics.pdf, id=2, page=1, 285.52672pt x 285.52672pt>
> <use meinbsp-pics.pdf, page 1> [1{/usr/local/texlive/2008/texmf-var/ 
> fonts/map/p
> dftex/updmap/pdftex.map} <./meinbsp-pics.pdf>] (./meinbsp.aux) )</ 
> usr/local/tex
> live/2008/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb>
> Output written on meinbsp.pdf (1 page, 5490 bytes).
> Transcript written on meinbsp.log.
> Latexmk: File "./meinbsp.aux" has not changed, so it is valid
> Latexmk: File 'meinbsp-pics.pdf' changed during run.  I must rerun  
> latex
> Latexmk: Absolute maximum runs of latex reached without finding  
> stable source files


The original pst-pdf packages creates an auxiliary PDF file \jobname- 
pics.pdf which contains the PSTricks images when pdfTeX in PDF output  
mode is used to process the file. Latexmk knows this. And it  
obviously found that this file's time stamp changed due to auto-pst- 
pdf interaction, or this file's size changed. An unstable file means  
the compiler needs to run one more time, but latexmk already invoked  
the compiler the maximum number of times.

Maybe the latexmk option -diagnostics can give more hints.

--
Mit friedvollen Grüßen

   Pete

Es ist in Chicago verboten, dort zu essen, wo es gerade brennt.






More information about the macostex-archives mailing list