[pstricks] conceptual question for pst-optexp

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Jun 18 13:43:26 CEST 2008


Christoph Bersch schrieb:

>> this is way how pst-node works. Look for \ncline as an example.
>> With SpecialCoor all types are checked.
> 
> Hmm, the following small example does not work. It compiles but it does 
> not draw the line

> Do you know what is going wrong there?

sorry I thought of \pcline but ...
With a little modification ist is possible:

\listfiles
\documentclass{article}
\usepackage{pst-node}
\makeatletter
\def\NCLine{\pst at object{NCLine}}
\def\NCLine at i{\check at arrow{\NCLine at ii}}
\def\NCLine at ii#1#2{%
   \pst at getcoor{#1}\pst at tempA
   \pst at getcoor{#2}\pst at tempB
   \begingroup
   \use at par
   \psline(!\pst at tempA\space \tx at UserCoor)(!\pst at tempB\space 
\tx at UserCoor)
   \endgroup
}
\makeatother
\SpecialCoor
\begin{document}

\begin{pspicture}[showgrid=true](2,2)
\pnode(2,2){A}
\NCLine[arrows=->]{0,0}{A}
\NCLine{<-}{0,1}{A}
\end{pspicture}

\end{document}


Herbert



More information about the PSTricks mailing list