\pstextpath with node connectors?

Denis Girou Denis.Girou at idris.fr
Fri Jul 11 23:32:28 CEST 1997

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.

>>>>> "Richard.Kaszeta" == Richard Kaszeta <kaszeta at me.umn.edu> writes:

    Richard.Kaszeta> For some fairly complicated diagrams I am doing with PSTricks-97, I'd
    Richard.Kaszeta> like to use \pstextpath to place text along the path of a curved node
    Richard.Kaszeta> connector like \nccurve.  However, if I try:

    Richard.Kaszeta> \begin{psmatrix}
    Richard.Kaszeta>   & & A \\
    Richard.Kaszeta>   & B \\
    Richard.Kaszeta>  C 
    Richard.Kaszeta> \pstextpath{\nccurve{1,3}{3,1}}{Test Text}
    Richard.Kaszeta> \end{psmatrix}

    Richard.Kaszeta> I get the error

    Richard.Kaszeta> ! Misplaced node connection command.
    Richard.Kaszeta> \@pstrickserr ... immediate help.}\errmessage {#1}
    Richard.Kaszeta>                                                   \endgroup 
    Richard.Kaszeta> l.12 \pstextpath{\nccurve{1,3}{3,1}}{Test Text}

  I'm not able to give you the "real" explanation, but what is clear it that
"it is not a bug but a feature"... It is not a TeX error message but a
PSTricks one, because it explicitely forbid to do that. When we look at the
code of pst-text.tex, we can see that several constructions are forbidden
as the "graphic object" for \pstextpath, as all the \nc... and \pc macros.
I don't know why, but I'm sure that Timothy had definitive reason to had did

\def\psclip#1{\pst at misplaced\psclip}%
\def\@multips(##1)(##2)##3##4{\pst at misplaced\multips}%
\def\nc at object##1##2##3##4{\pst at misplaced{node connection}}%
\def\PSTtoEPS at i##1##2{\pst at misplaced\PSTtoEPS}%

    Richard.Kaszeta> Any ideas?  Is it possible to use \pstextpath with node connectors?

  Nevertheless, the answer to this question is globally "yes". The workaround
is easy, defining explicitely the name of the nodes. But unfortunately (!)
your example, so I suppose need, is to use \nccurve which has no equivalent
as basic graphic object, because it draw a Bezier curve defined by only two
points, using the special ncurv parameter. It's clear that if you can define a 
third point (you can adjust position of node D in the following example using
the rowsep and colsep parameters like [name=D,colsep=0.5,rowsep=-0.5]),
it is easy. If not, the way is to look at the code of \nccurve and to build a
\psbezierTwoPoints macro which draw a Bezier curve in the way \nccurve do it.





            &   & [name=A] A \\
            & B              \\[0pt]
 [name=C] C &   & [name=D]

\pstextpath{\psline(A)(C)}{Test Text}

\pstextpath{\psbezier(A)(D)(D)(C)}{Test Text}

\pstextpath{\pscurve(A)(D)(C)}{Test Text}



To [un]subscribe to this list, send mail to pstricks-request at mail.tug.org
Leave the subject line blank and in the body put the line
[un]subscribe <email-address>
For help, put the word "help" in the message body.
To obtain current archive, put the words "get current" in the message body.

More information about the PSTricks mailing list