[pstricks] Index of item in psforeach

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Nov 23 00:28:59 CET 2009


Am 23.11.2009 00:04, schrieb Jason Stein:
> Is it possible to access the index of the list item currently used by
> \psforeach?

the version of pstricks-add.tex from
http://archiv.dante.de/~herbert/PSTricks-TDS/tex/generic/pstricks-add/

knows the \pst at cntm

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}

\makeatletter
\begin{pspicture}[showgrid=true](5,5)
  \psforeach{\nA}{0, 1, 1.5, 3, 5}{%
    \psdot[dotscale=3](\pst at cntm,\nA)}
\end{pspicture}

\end{document}

Herbert


More information about the PSTricks mailing list