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

exelnet at exelnet.de exelnet at exelnet.de
Sat Mar 22 22:03:44 CET 2008


On Fri, Mar 21, 2008 at 08:56:21PM -0400, Alan Ristow wrote:
> Herbert Voss wrote:
> > 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
> 
> Hmm. Evidently I confused myself somewhere along the way because I swear 
> I tried that several times yesterday and earlier today and it didn't 
> work. Now, of course, it works exactly as you say it should. I haven't 
> updated anything in the meantime, so I guess it's just my own stressed 
> out brain.
> 
> I think it's time to step away from the computer and have a beer....
> 
> Alan
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> 


I experienced the exact same thing. Today i ve compiled my document without any errors after
commenting my small workaround... I dont get it... But it works :=)

There is another small question that came up:

\def\yStart{0.3}

% Legend
    \newcommand{\legend}[1]{%
    \psline[linecolor=#1,linewidth=2pt]{-}(1730,\yStart)(1735,\yStart)
    \rput[l](1735,\yStart){\footnotesize \quad #1}
    %increment \yStart
}

\legend{first}
\legend{second}

Im trying to add a legend to my graph. But since I ll need to adjust the legend in many other
files i thought of a method to generate it automatically.

But how can i increment \yStart at the end of the \legend command? Is there a guide to
vars and mathematical manipulations on them? I havent found this part in Herberts Book. :=)

But i found a nice listing of postscript commands:
http://www.math.ubc.ca/~cass/courses/ps.html

thanks and greetings

Jan Marc Hoffmann



More information about the PSTricks mailing list