[pstricks] Using pdflatex

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Dec 13 11:08:49 CET 2008


David Arnold schrieb:

> I know of pdftricks package, but is there another way you can embed  
> pstricks code in latex source and still compile with pdflatex?
> 
> If so, a tiny example would be appreciated.


\documentclass[a4paper,11pt]{article}

\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}

\begin{document}

\begin{pspicture}(-1,-1)(5,5)
\psaxes{->}(0,0)(-0.5,-0.5)(4,5)[$x$,-90][$y(x)$,0]
\psplot[algebraic,linewidth=1.5pt,
  linecolor=red]{0}{4}{x+sin(x^2)}
\end{pspicture}

\end{document}


important is to enable the write18 option. Run _pdflatex_ as

pdflatex -shell-escape file.tex

and for MiKTeX it is

pdflatex --enable-write18 file.tex

For more informations read the docs of pst-pdf and auto-pst-pdf

Herbert















> 
> David.
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> 



More information about the PSTricks mailing list