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.

Possible Duplicate:
How to draw syntactical trees with parallel leafs for a natural language?

Consider page 4 in following paper: Pantcheva 2007

enter image description here

Which package can be used to draw a similar structure? (As elegant as possible)

share|improve this question
    
1  
the subscripts "Poss" and "def" would look better if they were set with \mathit or \mathrm (not sure of common practice, but these are abbreviations, not strings of variables). that being said, i also think this covers the same territory as the question cited by Alan Munn. –  barbara beeton May 22 '12 at 14:58
    
@barbarabeeton Yes, that's a consequence of the subscripts being simply $_...$ and should be as you suggest (upright would be more appropriate.) –  Alan Munn May 22 '12 at 15:09
    
I had seen the duplicate comment, but since there's no pstricks answer in the other question, I thought I'd add it here. –  dgs May 22 '12 at 16:09
add comment

marked as duplicate by Alan Munn, Paulo Cereda, barbara beeton, percusse, egreg May 22 '12 at 15:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 4 down vote accepted

There are several packages available: qtree, TikZ has built-in features to build trees, and tikz-qtree which combines features from the first two. Here's a simple example taken from the documenation of the tikz-qtree package:

\documentclass{article}
\usepackage{tikz-qtree}

\begin{document}

\begin{tikzpicture}
\tikzset{edge from parent/.append style={very thick}}
\Tree [.S [.NP [.Det the ] [.N cat ] ]
                 [.VP [.V sat ]
                          [.PP [.P on ]
                                   [.NP [.Det the ] [.N mat ] ] ] ] ]
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer
add comment

Besides tikz you can also use pstricks, more specifically pst-tree. The syntax is \pstree{root}{successors}, where root and successors are one of the available node types, e.g. \TR, or another (nested) \pstree. More details are given in chapter 8 of the package documentation.

pstricks figures can be compiled by using latex=>PS=>PDF or any of the alternatives given on the PSTricks website.

Code for Gonzalo Medina's example:

\documentclass{article}
\usepackage{pst-tree}

\begin{document}
    %formatting
    \psset{levelsep=1.5cm,nodesepA=6pt,nodesepB=6pt,edge=\ncline}
    %main tree with root
    \pstree{\TR{S}}{
        %left subtree
        \pstree{\TR{NP}}{
            \pstree{\TR{Det}}{
                \TR{the}
            }
            \pstree{\TR{N}}{
                \TR{cat}
            }
        }
        %right subtree
        \pstree{\TR{VP}}{
            \pstree{\TR{V}}{
                \TR{sat}
            }
            \pstree{\TR{PP}}{
                \pstree{\TR{P}}{
                    \TR{on}
                }
                \pstree{\TR{NP}}{
                    \pstree{\TR{Det}}{
                        \TR{the}
                    }
                    \pstree{\TR{N}}{
                        \TR{mat}
                    }                               
                }                           
            }
        }
    }
\end{document}
share|improve this answer
    
This is really not an ideal solution for linguistic trees, since there are much better solutions out there with respect to the input syntax. A better pstricks solution would be pst-qtree. It's by the same author as tikz-qtree. –  Alan Munn May 22 '12 at 16:28
    
Thanks, I was not aware of the package. The brevity of the qtree syntax obviously is compelling. –  dgs May 22 '12 at 16:45
add comment

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