[pstricks] Temporary bug: \foreach needs pgfmath when looping index is specified
Donut E. Knot
the.counterterrorist at yahoo.com
Sat Jan 18 23:57:07 CET 2014
Dear folks,
In the released version of `pgffor` as opposed to the development version,
`\foreach` needs `pgfmath` explicitly loaded when the looping index via `[count]` is specified.
\documentclass[pstricks,12pt]{standalone}
\usepackage{pst-node}
\usepackage{pgfmath}% don't forget this line!
\psset{saveNodeCoors}
\degrees[13]
\begin{document}
\makeatletter
\begin{pspicture}(-4,-4)(4,4)
\foreach \x [count=\xi from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}
{
\pnodes(!3 \xi\space neg \pst at angleunit 90 add PtoC){X\x}
\uput[!N-X\x.y N-X\x.x atan 1 \pst at angleunit div](X\x){\x}
}
\psarcn{->}(0,0){2.8}{(XA)}{(XQ)}
\end{pspicture}
\makeatother
\end{document}
According to Jubobs, the dependency issue has been fixed in the development version of `pgffor`.
For more detailed discussion, visit http://tex.stackexchange.com/q/154784/19356.
I don't know exactly what we should do in `pstricks.tex`, either
* load `pgfmath` sandwiched in if-then-else clause checking the version of `pgffor` or
* just leave it as is.
IMHO, the former option should be better.
Thank you in advance.
Best regards,
A PSTricks user
http://tex.stackexchange.com/users/19356
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20140118/0fad5952/attachment.html>
More information about the PSTricks
mailing list