[pstricks] pst-pdf

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Mon Apr 11 20:45:46 CEST 2005


Rolf did some more improvements to the code of pst-pdf.
Together with the preview package one can build the
PDF output without any additional code, pst-pdf does
it all ...
You need only the shell script ps4pdf or run it by hand

latex file.tex
dvips -o file-pics.ps file.dvi
ps2pdf file-pics.ps
pdflatex datei.tex

only when you did some changes to the images the first
three are needed again, otherwise only the pdflatex run
is enough.

If someone could write a shell script for Windows and Mac
similiar to ps4pdf, it will be fine ... Also if someone
can do the translation into english ... ;-)

Here comes an example, which I run with ps4pdf and
get a nice PDF file. As you can see the only PDF-related
stuff is loading the package pst-pdf.

you need the latest pst-pdf: http://perce.de/LaTeX/pst-pdf
and the latest preview package from CTAN (0.9.1)
http://www.dante.de/CTAN/macros/latex/contrib/preview/

Herbert

\listfiles
\documentclass[12pt]{article}
\usepackage{pst-pdf}
\usepackage{pstricks-add}

\makeatletter
\def\pst@@@hlabel#1{\pshlabel{#1}}
\def\pshlabel#1{$%
   \pst at mod{#1}{2}\pst at cnta%                   0 oder 1
   \ifnum1>\pst at cnta\relax%                    ungerade?
     \pst at cntb=#1\divide\pst at cntb by 2       % #1/2
       \ifnum\pst at cntb>1 \the\pst at cntb\fi\pi % n*pi
   \else\frac{#1}{2}\pi\fi$}%                  n/2*pi
\makeatother

\begin{document}

Here comes some text

\begin{pspicture}(-0.5,-1.25)(10,1.25)
   \psplot[linecolor=red,linewidth=1.5pt]%
      {0}{9.424777961}{x 180 mul 3.141592654 div sin}
 
\psaxes[xunit=1.570796327,showorigin=false]{->}(0,0)(-0.5,-1.25)(6.4,1.25)
\end{pspicture}

Here comes some more text

\end{document}


  *File List*
  article.cls    2004/02/16 v1.4f Standard LaTeX document class
   size12.clo    2004/02/16 v1.4f Standard LaTeX file (size option)
  pst-pdf.sty    2005/04/09 v1.1b PS graphics for pdfLaTeX (RN,HjG)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
   keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
     trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
   pdftex.def    2002/06/19 v0.03k graphics/color for pdftex
pstricks.sty    2005/02/24 v0.21 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2004/06/29 v1.06 `PSTricks' (tvz)
   xcolor.sty    2005/03/14 v2.01zs LaTeX color extensions (UK)
    color.cfg    2001/08/31 v1.1 color configuration of teTeX/TeXLive
  preview.sty    2005/04/03 preview-latex 0.9.1
    dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pstricks-add.sty    2005/03/03 package wrapper for pstricks-add.tex (hv)
pstricks-add.tex    2005/03/03 v2.38 `PSTricks-add' (hv)
pst-xkey.tex    2005/02/22 v1.5 PSTricks specialization of xkeyval (HA)
  xkeyval.sty    2005/03/08 v2.4 package option processing (HA)
  xkeyval.tex    2005/03/08 v2.4 key=value parser (HA)
pstricks-add.cfg    2005/01/10 v0.1 addtional user stuff (hv)
supp-pdf.tex
test1-pics.pdf    Graphic file (type pdf)



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list