[pstricks] Errors with 'griddots' and negative 'unit'
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Thu Sep 22 17:13:23 CEST 2005
Uwe Siart wrote:
> I'm getting errors in GSview when using 'griddots' together with
> negative unitlengths.
>
> This example
>
> % -------------------------
> \documentclass{article}
> \usepackage{pstricks}
> \psset{unit=-1cm,
> griddots=5}
> \begin{document}
> \begin{pspicture}(0,0)(3,3)
> \psgrid
> \end{pspicture}
> \end{document}
> % -------------------------
I suppose it was there for ever, but I do not really know.
Could someone try the example with an old pstricks.tex
version?
However, the following may help, but there may be some
side effects ...
Herbert
\documentclass{article}
\usepackage{pstricks}
\makeatletter
\def\psgrid at iv(#1)(#2)(#3){%
\begin at SpecialObj
\pst at getcoor{#1}\pst at tempA
\pst at getcoor{#2}\pst at tempB
\pst@@getcoor{#3}%
\ifnum\psk at subgriddiv>1
\addto at pscode{gsave
\psk at subgridwidth SLW \pst at usecolor\pssubgridcolor
\pst at tempB \pst at coor \pst at tempA
\pst at number\psxunit \pst at number\psyunit
\psk at subgriddiv\space \psk at subgriddots\space
{} 0 \tx at Grid grestore
}%
\fi
\addto at pscode{%
gsave
\psk at gridwidth SLW \pst at usecolor\psgridcolor
\pst at tempB \pst at coor \pst at tempA
\pst at number\psxunit abs \pst at number\psyunit abs
% \pst at number\psxunit \pst at number\psyunit
1 \psk at griddots\space { \pst at usecolor\psgridlabelcolor }
\psk at gridlabels \tx at Grid grestore
}%
\end at SpecialObj%
}
\makeatother
\psset{unit=-1cm,
griddots=5, subgriddiv=0}
\begin{document}
\begin{pspicture}(0,0)(3,3)
\psgrid
\end{pspicture}
\end{document}
--
http://TeXnik.de/
http://PSTricks.tug.org/
ftp://ftp.dante.de/tex-archive/info/math/voss/mathmode/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