[OS X TeX] Need help collaborating with Windows user

Michael Sharpe msharpe at ucsd.edu
Sat Mar 13 22:02:45 CET 2010


On Mar 13, 2010, at 11:56 AM, Peter Dyballa wrote:

> 
> Am 13.03.2010 um 02:52 schrieb Michael Sharpe:
> 
>> As you have embedded pstricks in your tex file, latex+dvips is the normal processing mode, but it makes for slow rendering.
> 
> Many PSTricks inclusions work with pdfTeX when the package pdfTricks is used:
> 
> %%% preamble
> \usepackage{ifpdf}
> \ifpdf
>  \usepackage{pdftricks}
> 
>  \begin{psinputs}
>    \usepackage{pstricks}
>    \usepackage{pstricks-add}
>    \usepackage{pst-plot}
>    \usepackage{pst-text,pst-node,pst-tree}
>  \end{psinputs}
> \else
>  \usepackage{pstricks}
>  \usepackage{pstricks-add}
>  \usepackage{pst-plot}
>  \usepackage{pst-text,pst-node,pst-tree}
> \fi
> 
> %%% the right stuff
> \begin{document}
> 
> \ifpdf
>  \begin{pdfdisplay}
>    \begin{pspicture}(5,3)
>      \psset{arrowscale=2,linewidth=1pt}
>      \psline{]-[}(4,0)
>      \psline{)-(}(0,1)(4,1)
>      \psline{)->}(0,2)(4,2)
>      \psline{]->>}(0,3)(4,3)
>    \end{pspicture}
> 
>    \begin{pspicture}(-1,-1)(2,1.25)
>      \psaxes{->}(0,0)(-1,-1)(2,1.25)
>      \psset{linewidth=1.5pt}
>      \parabola[linestyle=dashed](-1,1)(0,0)
>      \parabola[origin={0.5,-0.5}](-1,1)(0,0)
>      \qdisk(0.5,-0.5){2pt}
>    \end{pspicture}
>  \end{pdfdisplay}
> \else
>  \begin{pspicture}(4,3)
>    \psset{arrowscale=2,linewidth=1pt}
>    \psline{]-[}(4,0)
>    \psline{)-(}(0,1)(4,1)
>    \psline{)->}(0,2)(4,2)
>    \psline{]->>}(0,3)(4,3)
>  \end{pspicture}
> 
>  \begin{pspicture}(-1,-1)(2,1.25)
>    \psaxes{->}(0,0)(-1,-1)(2,1.25)
>    \psset{linewidth=1.5pt}
>    \parabola[linestyle=dashed](-1,1)(0,0)
>    \parabola[origin={0.5,-0.5}](-1,1)(0,0)
>    \qdisk(0.5,-0.5){2pt}
>  \end{pspicture}
> \fi
> ...
> 
> \end{document}
> 
> When working with PSTricks, with latex+dvips or with pdflatex, you have to use the option -shell-escape.
> 
> --
> Greetings
> 
>  Pete

There are a couple of issues using pdftricks. First, you need to modify the code for every pspicture, as you indicated above. Second, the trimming relies on ps2eps, which has bugs when used in the manner selected by pdftricks. Though this can be remedied by adding some options to the call to ps2eps, I think the package auto-pst-pdf is much easier to use. There's a good discussion of the options at

http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput

Michael


More information about the macostex-archives mailing list