<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
It must be inside \code. Here's a snippet of the code that I use. I can send you the complete file if you wish.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
        \multido{\ry=\ymin+\yInc}{\yCnt}{%
<div class="ContentPasted0">        \multido{\rx=\xmin+\xInc}{\xCnt}{%</div>
<div class="ContentPasted0">            \pscustom{%</div>
<div class="ContentPasted0">            \translate(\rx,\ry)</div>
<div class="ContentPasted0">            \arrows{->}</div>
<div class="ContentPasted0">            \code{%</div>
<div class="ContentPasted0">            /p@ {4 mul} def %</div>
<div class="ContentPasted0">            /xCoord {\rx\space} bind def %</div>
<div class="ContentPasted0">            /yCoord {\ry\space} bind def %</div>
<div class="ContentPasted0">            /vec@Len {xCoord yCoord 2 copy M@xy 3 1 roll N@xy %</div>
<div class="ContentPasted0">            vec@norm dup 0 eq {pop 0.01} if} bind def %</div>
<div class="ContentPasted0">            vec@Len get@thk setlinewidth vec@Len get@col setrgbcolor %</div>
<div class="ContentPasted0">            0 0 moveto %</div>
<div class="ContentPasted0">            currentpoint %</div>
<div class="ContentPasted0">            xCoord yCoord 2 copy M@xy s@f mul 3 1 roll N@xy s@f mul %</div>
<div class="ContentPasted0">            vec@Len 3 mul dup 4 1 roll div 3 1 roll exch div exch %</div>
<div class="ContentPasted0">            ArrowB % get@thk setlinewidth %</div>
<div class="ContentPasted0">            lineto stroke %</div>
<div class="ContentPasted0">            }</div>
<div class="ContentPasted0">            }</div>
<div class="ContentPasted0">        }</div>
<div class="ContentPasted0">        }</div>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> PSTricks <pstricks-bounces+hensh=math.msu.edu@tug.org> on behalf of Herbert Voss <Herbert.Voss@fu-berlin.de><br>
<b>Sent:</b> Tuesday, October 11, 2022 3:43 PM<br>
<b>To:</b> pstricks@tug.org <pstricks@tug.org><br>
<b>Subject:</b> Re: [pstricks] arrows no longer colored in \code blocks</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
Am 11.10.22 um 21:12 schrieb Hensh, Richard:<br>
> <a href="https://users.math.msu.edu/users/hensh/courses/234/fall2022/lectures/exam2/16.1.pdf">
https://users.math.msu.edu/users/hensh/courses/234/fall2022/lectures/exam2/16.1.pdf</a><br>
><br>
> Unfortunately, when I try to generate new vector fields, the arrows <br>
> are no longer affected by my color selections. The MWE below is part <br>
> of a \multido loop, and I need to set the arrow color to match the <br>
> line color on-the-fly.<br>
><br>
> The above code generates a red line with a black arrow. I must be able <br>
> to do this within the \code block. Can you help?<br>
><br>
Rick,<br>
can you use it this way?<br>
<br>
\documentclass{standalone}<br>
\usepackage{pstricks-add}<br>
\begin{document}<br>
     \psset{unit=30mm}<br>
     \begin{pspicture}(-2,-2)(2,2)<br>
         \pscustom[linewidth=2pt,arrowscale=1.5,linecolor=red]{% <---<br>
             \arrows{->}<br>
             \code{%<br>
                 0 0 5 5 ArrowA<br>
                 30 30 110 75 ArrowB<br>
                 lineto<br>
             }<br>
         }<br>
     \end{pspicture}<br>
\end{document}<br>
<br>
<br>
or must it be asolutely inside \code?<br>
<br>
Herbert<br>
--<br>
list: <a href="https://urldefense.com/v3/__https://lists.tug.org/pstricks__;!!HXCxUKc!2RdbwRBR_TuGR47BzjtvvST__06Z8Tn87JyLUmH0MmFZV0QS3AsZaBvbz7Z1BLpZ32KkPNrm8IIctTY5zsq7N0_NLhCA$">
https://urldefense.com/v3/__https://lists.tug.org/pstricks__;!!HXCxUKc!2RdbwRBR_TuGR47BzjtvvST__06Z8Tn87JyLUmH0MmFZV0QS3AsZaBvbz7Z1BLpZ32KkPNrm8IIctTY5zsq7N0_NLhCA$</a> 
<br>
archive: <a href="https://urldefense.com/v3/__https://tug.org/pipermail/pstricks/__;!!HXCxUKc!2RdbwRBR_TuGR47BzjtvvST__06Z8Tn87JyLUmH0MmFZV0QS3AsZaBvbz7Z1BLpZ32KkPNrm8IIctTY5zsq7N5c-Jfqo$">
https://urldefense.com/v3/__https://tug.org/pipermail/pstricks/__;!!HXCxUKc!2RdbwRBR_TuGR47BzjtvvST__06Z8Tn87JyLUmH0MmFZV0QS3AsZaBvbz7Z1BLpZ32KkPNrm8IIctTY5zsq7N5c-Jfqo$</a> 
</div>
</span></font></div>
</body>
</html>