4

Consider the following code and error message.

\documentclass[pstricks,12pt]{standalone}
\usepackage{pst-node}
\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@angleunit 90 add PtoC){X\x}
    \qdisk(X\x){1pt}
    \uput[!N-X\x.y N-X\x.x atan 1 \pst@angleunit div](X\x){\x}
    %\uput[!\the\psLoopIndex\space neg 90 1 \pst@angleunit div add ](X\x){\x}
}
\psarcn{->}(0,0){2.8}{(XA)}{(XQ)}
\end{pspicture}
\makeatother
\end{document}

enter image description here

What makes the looping index in \foreach produce compile-time error? How to solve it?

6

\usepackage{pgfmath} that defines \pgfmathparse needs to be specified, because package pgffor is missing this dependency.

  • 2
    I raised that issue on the tikz issue tracker. Apparently, pgfmath gets automatically loaded with pgffor in the development version of tikz. – jub0bs Jan 18 '14 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.