[pstricks] hook and arrowinset

Bernd Sellentin b.sellentin at t-online.de
Tue Dec 11 13:27:12 CET 2007


Am Dienstag, 11. Dezember 2007 schrieb Herbert Voss:
> Bernd Sellentin schrieb:
> > Hello,
> > I like to have the hook to react the same way as a normal arrow does,
> > especially that the option arrowinset is working.
>
> hope, it helps
>
> Herbert

Yes, thats what I wanted. Great. But one problem remains: by giving a negativ 
arrowsize, one could change the side, on which the hook is drawn. Thats wrong 
with this new one, see example:

 \documentclass[11pt]{minimal}
 \usepackage{pstricks-add}
 \makeatletter
 \edef\pst at arrowtable{\pst at arrowtable,D-D}
 \@namedef{psas at D}{
    false \psk at arrowinset \psk at arrowlength \psk at arrowsize
    CLW mul add dup
    2 div /w ED
    mul dup /h ED
    mul /Inset ED
    { 0 h T 1 -1 scale } if
    0 h Inset sub moveto
    w neg h L 0 0 L
    gsave fill grestore }
 \makeatother

 \begin{document}

 \begin{pspicture}(0,0)(1,1)
 \psline[arrowsize=-8pt,arrowinset=0,arrowlength=2]{-D}(0cm,0.33)(1,0.33)
 \psline[arrowsize=-8pt,arrowinset=0,arrowlength=2]{-h}(0cm,0.66)(1,0.66)
 \end{pspicture}

 \begin{pspicture}(0,0)(1,1)
 \psline[arrowsize=8pt,arrowinset=0.6,arrowlength=2]{-D}(0cm,0.33)(1,0.33)
 \psline[arrowsize=8pt,arrowinset=0.6,arrowlength=2]{-h}(0cm,0.66)(1,0.66)
 \end{pspicture}

 \end{document}

Bernd



More information about the PSTricks mailing list