A simple \ncloop question...

Denis Girou Denis.Girou at idris.fr
Wed Dec 8 16:56:54 CET 1999


-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

>>>>> "Christophe.Jorssen" == Christophe JORSSEN <Christophe.JORSSEN at wanadoo.fr> writes:

    Christophe.Jorssen> Thank you for your answers. It wasn't as simple as I thought...

    Christophe.Jorssen> However, I have another question. Look at the position of the label in those
    Christophe.Jorssen> two cases. Can somebody explain why there is a difference?

    Christophe.Jorssen> \documentclass{article}

    Christophe.Jorssen> \usepackage{pst-node}

    Christophe.Jorssen> \pagestyle{empty}

    Christophe.Jorssen> \begin{document}

    Christophe.Jorssen> \psset{nodesep=3pt,nrot=:U}

    Christophe.Jorssen> \psframebox[framesep=0]{%
    Christophe.Jorssen> \begin{pspicture}(-1,-1)(1,1)
    Christophe.Jorssen>     \rnode{B}{\psframebox{On a actionn\'e $k_1$}}
    Christophe.Jorssen>     \ncangles[angleA=90,angleB=180,arm=0.5,linearc=.2]{->}{B}{B}
    Christophe.Jorssen>     \nbput{\rotatedown{\tiny$k_1=1$ et $k_2=0$}}
    Christophe.Jorssen> \end{pspicture}}

    Christophe.Jorssen> \psframebox[framesep=0]{%
    Christophe.Jorssen> \begin{pspicture}(-1,-1)(1,1)
    Christophe.Jorssen>     \rnode{B}{\psframebox{On a actionn\'e $k_1$}}

    Christophe.Jorssen> \ncloop[angleA=90,angleB=180,loopsize=-2,armA=0.5,armB=0,linearc=.2]{->}{B}{B}
    Christophe.Jorssen>     \nbput{\rotatedown{\tiny$k_1=1$ et $k_2=0$}}
    Christophe.Jorssen> \end{pspicture}}

    Christophe.Jorssen> \end{document}

  To have the same result, you must code for the second one:

\nbput[npos=1.5]{\rotatedown{\tiny$k_1=1$ et $k_2=0$}}

  This is because \ncangles is a 4 segments macro, when \ncloop is a
5 segments one (even when you suppress one of them as you do!), and
the npos parameter is 1.5 for \ncangles and 2.5 for \ncloop.

  See documentation page 21 (betadoc1).


  P.S. Of course, this is not because the answer is in the documentation
that such questions can't be asked here. As everybody know, PSTricks is
very rich, but complex too, and it is not only difficult to have all his
aspects in mind, but also sometimes to know which characteristics influence
the behaviour, even when we have read the documentation several times.
So, such questions could help other people too.

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