[pstricks] bug in pst-node

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Thu Apr 8 09:46:50 CEST 2004


Hello,

it seems that the star version of all \t?put makros
doesn't work. my testcase is:

\documentclass{article}
\usepackage{pst-node}
\begin{document}

   \begin{pspicture}(3,3)
   \psgrid
   \cnode(0.5,0.5){0.5cm}{A}
   \cnode(2.9,2.9){0.1cm}{B}
   \ncline[linewidth=0.1pt]{<->}{A}{B}
   %\ncput*{n} % works fine
   \tvput*{v} % doesn't work
   \end{pspicture}

\end{document}



there is only one line missing in \psput at tput#1#2
run the next example and it works, at least for me.
Again, I'm wondering that nobody has seen this in the
past. So maybe that it is my own fault in my lokal
pst-node.tex. A confirmation would be nice.

Herbert



\documentclass{article}
\usepackage{pst-node}
\makeatletter
\def\psput at tput#1#2{%
     \begingroup
         \use at par
% hv ------------------------------------------------------
         \if at star\pst at starbox\fi %
% hv ------------------------------------------------------
         \pst at tputmakesmall
         \leavevmode
         \hbox{%
             \pst at Verb{%
                 \pst at nodedict
                 /t \psk at tpos \pst at tposflip def
                 tx at NodeDict /HPutPos known
                     { #1PutPos }
                     { CP /Y ED /X ED /NAngle 0 def /NCLW 0 def } ifelse
                 /Sin NAngle sin def
                 /Cos NAngle cos def
                 /s \pst at number\pslabelsep NCLW add def
                 /l \pst at number\pst at dima def
                 /r \pst at number\pst at dimb def
                 /h \pst at number\pst at dimc def
                 /d \pst at number\pst at dimd def
% DG/SR modification begin - Sep. 26, 1997 - Patch 4
                 %\ifnum1=0#2\else
                 \ifnum1=0#2 \else
% DG/SR modification end
                     /flag #2 def
                     \csname tx@#1PutAdjust\endcsname
                 \fi
                 \tx at LPutCoor
                 end
                 \tx at PutBegin
             }%
             \box\pst at hbox
             \pst at Verb{\tx at PutEnd}%
         }%
     \endgroup
     \pst at shortput%
}
\makeatother
\begin{document}

   \begin{pspicture}(3,3)
   \psgrid
   \cnode(0.5,0.5){0.5cm}{A}
   \cnode(2.9,2.9){0.1cm}{B}
   \ncline[linewidth=0.1pt]{<->}{A}{B}
   %\ncput*{n} % works fine
   \tvput*{v} % doesn't work
   \end{pspicture}

\end{document}




-- 
http://TeXnik.de/
http://PSTricks.de/




More information about the PSTricks mailing list