[pstricks] includegraphics page of pdf, pst-pdf, auto-pst-pdf

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Mar 21 21:42:11 CET 2008


Alan Ristow schrieb:
> Herbert Voss wrote:
>> exelnet at exelnet.de schrieb:
>>
>>> Well, it didnt change everything afterall. I am still having trouble with
>>> images that get included in a file thats itself include by the tex \input
>>> command.
>>>
>>> Im using the following recommand to solve this problem in my case. Since im
>>> not using any ps-only fileformats.
>>>
>>> \let\includegfx\includegraphics
>>> \renewcommand\includegraphics[2][]{\ifpdf \includegfx[#1]{#2} \fi}
>> the \includegraphics is under the control of pst-pdf. You do nit
>> need the above commands. Try it only with
>>
>> \includegraphics{file}
> 
> Herbert,
> 
> Part of the issue he presented yesterday was that he wanted to use 
> \includegraphics to include a page from a multi-page PDF, e.g.,
> 
> \includegraphics[page=1]{file}
> 
> This works fine with pdflatex but fails with regular latex since "file" 
> is a PDF (though the error message is generated by keyval and complains 
> about "page" being an undefined key).
> 
> Is pst-pdf supposed to work around this situation automatically? AFAICT 
> it isn't supposed to, so I advised Jan to wrap his \includegraphics 
> statement in \ifpdf ... \fi.

pst-pdf redefines the \includegraphics macro itself
and ignores in the latex run the pdf images but not
the eps one. There is no need for \ifpdf ...\else ...\fi

Herbert



More information about the PSTricks mailing list