Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to have a discription for some of the leaves. It doesn't need to be an underbace, if somebody has better graphical suggestions... :)

Consider this example:

\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
  {
    \Tf*
    \Tf*
    \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
    \Tf*
    \Tf*
    \Tf*
    \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
    \Tf*

  }

I'm thinking about something like this, which of won't work that way:

\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
  {
    \underbrace{
      \Tf*
      \Tf*
      \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
      \Tf*
    }_{n \mbox{trees}}
    \underbrace{
      \Tf*
      \Tf*
      \psset{linestyle=none}  \Tr{$\cdots$} \psset{linestyle=solid}
      \Tf*
    }_{n \mbox{trees}}
  }
share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Every tree works like a node. SO you can name the node to use it later. The brace is drawn with \psbrace:

enter image description here

\documentclass{scrartcl}
\usepackage{pstricks}
\usepackage{pst-node,pst-tree}
\usepackage{pstricks-add}
\begin{document}
\pstree[levelsep=35pt]{\Tcircle{$\rho$}}
  {
    \Tf*[name=first]
    \Tf*
    {\psset{linestyle=none}  \Tr{$\cdots$}}
    \Tf*[name=second]
    \Tf*
    \Tf*
    {\psset{linestyle=none}  \Tr{$\cdots$}}
    \Tf*
  }
\psbrace*[linecolor=blue,ref=lC]([nodesep=5pt,angle=-165]first)([nodesep=5pt,angle=-15]second){\rotatebox{90}{$n$ trees}}
\end{document}​
share|improve this answer
1  
Instead of setting & resetting the linestyle, use grouping to modify it locally. –  Werner Dec 28 '11 at 18:07
    
Hope you don't mind, I edited your answer a little. Roll back if you don't approve. –  Werner Dec 28 '11 at 19:18
    
@Werner: I had to go yesterday. Thanks for the very good improvements. –  Marco Daniel Dec 29 '11 at 9:10
    
I tried to do the same again, but with \Tfan instead of \Tf this time. But somehow it doesn't look fine. Could you explain the part with angle? How did you find these numbers? –  lumbric Jan 17 '12 at 22:07
    
After some googeling, I decided that this is a seperate question, so I asked it here. –  lumbric Feb 7 '12 at 11:39
add comment
\documentclass{scrartcl}
\usepackage{pst-tree,pstricks-add}
\begin{document}

\pstree[levelsep=1.2cm]{\Tcircle{$\rho$}}{
    \Tf*[name=first]
    \Tf*
    \Tn{\ldots}
    \Tf*[name=second]
    \Tf*
    \Tf*
    \Tn{\ldots}
    \Tf*}
\psbrace*[linecolor=blue,ref=tC,rot=90,nodesep=2mm]([angle=-165]first)([angle=-15]second){Text II}
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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