[pstricks] Example for pdftricks does not work
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Sun Jan 23 16:44:02 CET 2005
Paul Smith wrote:
> Dear All
>
> I am trying the example given at
>
> http://www.pstricks.de/pdf/pdfoutput.phtml
>
> for the package pdftricks. However, I get the error indicated below.
uuh, I tried it years ago. It is not a good idea to use
pdftricks here, too many problems with the bounding
box, e.g.
\documentclass[a4paper]{article}
\usepackage{ifpdf}
\ifpdf%
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pstricks}
\end{psinputs}
\else
\usepackage{pstricks}
\newenvironment{pdfpic}{}{}
\fi
\begin{document}
\section{Hallo}
Welt.
\begin{figure}[htb]
\centering
\caption{The grafic, converted with \texttt{pdftricks}}
\begin{pdfpic}
\begin{pspicture}(5,2)
\psline{|<->|}(0,0.3)(4,1.9)
\end{pspicture}
\end{pdfpic}
\end{figure}
\end{document}
run it with pdflatex --shell-escape file.tex
it is easier to use ps4pdf. With the script ps4pdf for Linux
you do only ps4pdf file.tex
\documentclass[a4paper]{article}
\usepackage{ps4pdf}
\PSforPDF{
\usepackage{pstricks}
}
\begin{document}
\section{Hallo}
Welt.
\begin{figure}[htb]
\centering
\caption{The grafic, converted with \texttt{ps4pdf}}
\PSforPDF{
\begin{pspicture}(5,2)
\psline{|<->|}(0,0.3)(4,1.9)
\end{pspicture}
}% end PSforPDF
\end{figure}
\end{document}
Herbert
--
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