[pstricks] Determining the actual image size
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Tue Aug 14 18:33:55 CEST 2012
Am 14.08.2012 16:53, schrieb Mark Horner:
<> We've got a number of textbooks, full of pstricks images. Our challenge
> is that many of the images are in pspicture environments where the
> coordinates are not optimised for the actual image.
>
> Is there a way to have the pspicture environment automatically figure
> out the image size?
no, that is not possible. The image is created on PostScript level,
but you need the size on the preceding TeX level. However, you
can use package auto-pst-pdf and run the document with pdflatex
instead:
\documentclass{minimal}
\usepackage[pdf]{pstricks}
\usepackage{pst-node}
\begin{document}
foo
\begin{pspicture}[showgrid](1,1)% incorrect image size
\pnode(0,3){A}\pnode(4,0){B}\pnode(4,3){C}\psdots(A)(B)(C)
\psline{->}(A)(B)(C)
\end{pspicture}
bar
\end{document}
imortant is
pdflatex -shell-escape <file>
Herbert
More information about the PSTricks
mailing list