I already asked in the question Describing leaves of a tree with an underbrace using pstree/pstricks how to use a underbrace. Now I'd like to use \Tfan instead of \Tf, but the trick with the angle doesn't seem to work there (I also don't really understand why it's working with \Tf). I have to attach the psbrace not at the center of the nodes, but with a bit of offset - the psbrace should be a bit longer.

Herbert Voß provides a solution in this maillist post, unfortunately I don't understand the methods used there and I can't manage to adopt them to my problem. He suggests basically suggests two methods.

One is to replace \rnode{A}{$a$} by \rnode[bc]{A}{$a$\vphantom{gt}}. But I couldn't manage to get this working also for horizontal space as desired.

The second method is to connect the psbrace not to (A) but to (!\psGetNodeCenter{A} A.x A.y .2 sub). How is this called? How is the syntax of !whatever working? How could I adopt this?

Output for minimal example



    \pstree[levelsep=50pt,treesep=12pt]{\Tcircle{ }} {
        \skiplevel { 
          {\psset{linestyle=none}  \Tr{$\cdots$} }


        \pstree{\Tr{ }}{\Tfan[name=firstantree]}
        {\psset{linestyle=none}  \Tr{$\cdots$} }
        \pstree{\Tr{ }}{\Tfan[name=lastantree]}



2 Answers 2



  • This method I didn't present ;-) Feb 7, 2012 at 20:21
  • Wow, great! Thanks! This was excactly the option I was searching for.
    – lumbric
    Feb 8, 2012 at 10:53

The following answer perhaps should be a comment, but it's too big.

Why don't you ask this question at the mailing list? pstricks accepts different kinds of coordinate input. Normally you use (x,y), but you can use other input methods like (! x y )

A small collection is shown below:

  • (x,y) -- normal Cartesian input
  • (r;a) -- r=radius; a=angle -- polar coordinates
  • (! x y) -- postscript notation. Here the coordinates will be computed at the postscript level
  • (* x {f(x)}) -- use a function to compute the y coordinate related to the x coordinate
  • (Nodename) -- use a defined node
  • ( x1,y1 | x2,y2 ) use the x coordinate of the first group and the y coordinate of the second one. More complicated calculations are possible.

There are a lot of other possibilities shown in the documentation. However I don't want to show everything here.

The command \psGetNodeCenter accepts one mandatory argument, a node. The command takes the node and allows to handle the x and y coordinates separately. This command works only inside PostScript, so you must use the coordinate form (! x y). The syntax itself follows the Reverse Polish notation. An example: addition of two numbers for the x coordinate and a single number for y

(! 2.2 3.4 add 5)

that's the equivalent of x=2.2+3.4=5.6 and y=5, so the final point is (5.6,5).

  • (A bit off topic...) Well if I write to the mailing list, there is easy system to give reputation points afterwards! :) Seriously, of course I could write to the mail list, but aren't all the questions from here also possible questions for the mailing list?
    – lumbric
    Feb 8, 2012 at 10:57
  • Do you know that HV has defined algebraic-algebraic notation (+x,f(x)) in the PSTricks' core pstricks.tex? Jun 7, 2013 at 17:13
  • @ClickMe: Does it work? Jun 7, 2013 at 17:36
  • @MarcoDaniel: In my experience: NO. :-) Jun 7, 2013 at 17:40
  • I think it should be written as (+x,{f(x)}) because I successfully do it. Jun 24, 2013 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.