[pstricks] arrows no longer colored in \code blocks
Hensh, Richard
hensh at msu.edu
Tue Oct 11 21:12:20 CEST 2022
Dear Herbert,
Many years ago, I generated custom vector fields using the \code command in PSTricks. You can see various examples here:
https://users.math.msu.edu/users/hensh/courses/234/fall2022/lectures/exam2/16.1.pdf
Unfortunately, when I try to generate new vector fields, the arrows are no longer affected by my color selections. The MWE below is part of a \multido loop, and I need to set the arrow color to match the line color on-the-fly.
\documentclass{standalone}
\usepackage{pstricks-add}
\begin{document}
\psset{unit=30mm}
\begin{pspicture}(-2,-2)(2,2)
\pscustom[linewidth=2pt,arrowscale=1.5]{%
\arrows{->}
\code{%
0 0 5 5 ArrowA %
30 30 110 75 ArrowB %
1 0 0 setrgbcolor % Only sets the line color to red.
lineto %
stroke %
}
}
\end{pspicture}
\end{document}
The above code generates a red line with a black arrow. I must be able to do this within the \code block. Can you help?
thanks
rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20221011/ad52b34d/attachment.html>
More information about the PSTricks
mailing list.