naput nbput +180

Denis Girou Denis.Girou at
Fri Oct 13 22:31:52 CEST 2000

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.

>>>>> "Matthieu.Paindavoine" == MPAINDAV  <MPAINDAV at> writes:

    Matthieu.Paindavoine> ma question concerne le placement des labels en fonction de l'orientation
    Matthieu.Paindavoine> des connections.
    Matthieu.Paindavoine> ...
    Matthieu.Paindavoine> 2- En fonction de l'angle, operer la transformation:
    Matthieu.Paindavoine> naput[nrot=:U]{above} ==> nbput[nrot=:U+180]{above}
    Matthieu.Paindavoine> nbput[nrot=:U]{below} ==> naput[nrot=:U+180]{below}

    D.G.> ...
    D.G.>   But I do not think that there is a simple solution to this question.
    D.G.> I am even not sure that there is a complicated one... This is a global
    D.G.> ...
    D.G.> Nevertheless, there are some simple situations
    D.G.> where this can be done easily. You have just to compare in the PostScript
    D.G.> InitNC macro the values of the horizontal coordinates and to decide to
    D.G.> exchange or not the coordinates of the two nodes according to the result.
    D.G.> This solve basic situations, but this is also easy to see that this create
    D.G.> immediate side effects when the situation is not symmetric for the two nodes
    D.G.> (usage of arrows, parameter values such angleA different than angleB, etc.).

  I study again this question this evening.

  At the opposite of what I said on Wednesday (sorry...), there is clearly
a better and more powerful (and not very complicated...) solution than
the limited one that I gave at this time.

  Nevertheless, I can't guarantee the code... As there are a lot of possible
usage of nodes and node connections, these changes can not work in all
situations, create bad side effects or break some functionalities. You must
test them in your real situations. But, at least, it work on the following











\edef\psk at rot{%
NAngle \ifx\psk at rot\@empty\else\psk at rot add \fi
% D.G. modification begin - Oct. 13, 2000
tx at NodeDict begin xB xA lt {180 add} if end
% D.G. modification end

\def\naput at i{%
\pst at killglue
\pst at makebox{%
\naput at ii{%
% D.G. modification begin - Oct. 13, 2000
%NAngle 90 add
tx at NodeDict begin xB xA lt {NAngle 90 sub} {NAngle 90 add} ifelse end
% D.G. modification end

\def\nbput at i{%
\pst at killglue
\pst at makebox{%
\naput at ii{%
% D.G. modification begin - Oct. 13, 2000
%NAngle 90 sub
tx at NodeDict begin xB xA lt {NAngle 90 add} {NAngle 90 sub} ifelse end
% D.G. modification end





The list interface (subscription, information, access to the archives) is on:
Otherway to unsubscribe, send mail to pstricks-request at
with a blank subject and in body the line unsubscribe <email-address>

More information about the PSTricks mailing list