[Problem] Wrong arrows with \nccoil and \nczigzag

Denis Girou Denis.Girou at idris.fr
Thu Mar 19 20:11:30 CET 1998


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

  Wolfgang May <may at informatik.uni-freiburg.de> report today that the
\nczigzag macro is drawn in the wrong direction, from the ending to the
starting point. The effect is that if arrows are defined, they appear
exchanged.

  In fact, the problem is the same for \nccoil and was introduced in
`pst-beta' in 1994.

  My test case is:

\documentclass{article}

\usepackage{pst-node,pst-coil}

\pagestyle{empty}

\begin{document}

\psset{arrowscale=3,coilwidth=0.5,coilarm=1}

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \ncline{->}{A}{B}
\end{pspicture}

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \nczigzag{->}{A}{B}
\end{pspicture}

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \nccoil{->}{A}{B}
\end{pspicture}

\makeatletter
% To correct in pst-node.tex and pst-coil.tex
\def\nccoil at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998
4 2 roll
% DG/SR modification end
\psk at coilwidth \pscoilheight
\psk at coilarmA \psk at coilarmB
\psk at coilaspect \psk at coilinc
\pst at coildict \tx at Coil end
end}}
\def\nczigzag at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998
4 2 roll
% DG/SR modification end
\pscoilheight
\psk at coilwidth
\psk at coilarmA
\psk at coilarmB
\pst at coildict \tx at ZigZag end
\psline at iii
\tx at Line
end}}
\makeatother

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \ncline{->}{A}{B}
\end{pspicture}

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \nczigzag{->}{A}{B}
\end{pspicture}

\begin{pspicture}(6,2)
  \cnodeput(0,0){A}{A}
  \cnodeput(6,1){B}{B} 
  \nccoil{->}{A}{B}
\end{pspicture}

\end{document}


  Both `pst-node' and `pst-coil' must be corrected, as they have duplicate
lines, just defining \nccoil and \nczigzag.


  + In CHANGES :

pstricks/generic:
----------------

  * 98/03/19 pst-node.tex (97 patch 5): The \nccoil and \nczigzag macros
are drawn in the wrong direction, from the ending to the starting point.
So the arrows, when defined, appear exchanged.
(reported by Wolfgang May <may at informatik.uni-freiburg.de>)

  * 98/03/19 pst-coil.tex (97 patch 2): Same problem than above.


  + In pst-node.tex :

\def\fileversion{97 patch 5}
\def\filedate{1998/03/19}
......................................................................
\def\nccoil at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 5
4 2 roll
% DG/SR modification end
\psk at coilwidth \pscoilheight
\psk at coilarmA \psk at coilarmB
\psk at coilaspect \psk at coilinc
\pst at coildict \tx at Coil end
end}}
......................................................................
\def\nczigzag at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 5
4 2 roll
% DG/SR modification end
\pscoilheight
\psk at coilwidth
\psk at coilarmA
\psk at coilarmB
\pst at coildict \tx at ZigZag end
\psline at iii
\tx at Line
end}}


  + And same in pst-coil.tex :

\def\fileversion{97 patch 2}
\def\filedate{1998/03/19}
......................................................................
\def\nccoil at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 2
4 2 roll
% DG/SR modification end
\psk at coilwidth \pscoilheight
\psk at coilarmA \psk at coilarmB
\psk at coilaspect \psk at coilinc
\pst at coildict \tx at Coil end
end}}
......................................................................
\def\nczigzag at ii#1#2{\nc at object{Open}{#1}{#2}{.5}{%
\tx at NCCoor
tx at Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 2
4 2 roll
% DG/SR modification end
\pscoilheight
\psk at coilwidth
\psk at coilarmA
\psk at coilarmB
\pst at coildict \tx at ZigZag end
\psline at iii
\tx at Line
end}}


  Thanks for the report!

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list