I am a TeX newbie, trying to make a syntax tree. What I'm going for is this:
X
/ X / \ X \ / \ \ X \ \ / \ \ \ A B C D E
a b c d e
where the bottom row includes some subscripts. My code is as follows:
\pstree[levelsep=5ex]{ \TR{X} }{
\pstree{ \TR{X} }{
\pstree{ \TR{X} }{
\pstree{ \TR{X} }{
\TR{\shortstack{{\em A}\\a}}
\TR{\shortstack{{\em B}\\b}}
}
\TR{\shortstack{{\em C}\\c}}
}
\TR{\shortstack{{\em D}\\d}}
}
\TR{\shortstack{{\em E}\\e}}
}
Two questions:
a) How can I align the leaf nodes at the bottom instead of immediately beneath their mother node?
b) The vertical spacing of the things in the shortstack is inconsistent (probably by some sort of "if it fits" criterion - if if there's an "j" or a "g" on the upper word, the spacing increases to accomodate the downstroke). Is there a better way of writing things one beneath another that will always have the same vertical spacing?
EDIT: as requested, minimal example of node-internal formatting problem:
\pstree[levelsep=5ex]{ \TR{Compare:} }{
\TR{\shortstack{h\\j}}
\TR{\shortstack{m\\n}}
}
Notice how higher "h" is compared to "m" ("j" and "n" being level).


pstricksfor independent reasons, I recommend usingtikz-qtreefor this. – Alan Munn Oct 24 '11 at 16:56shortstackspacing problems) – Amadan Oct 24 '11 at 19:09pstrickslive up to its name. – Alan Munn Oct 24 '11 at 23:24