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.

While doing tree proofs, sometimes we need to consider a root with some subtrees, but we don't know the exact properties of the subtrees, so we just represent them using triangles. Is it possible to do this using latex, preferably using the tikz package? Or will I have to manually have to draw the triangles? This seems like something that might be quite common, so I guess it should be possible.

share|improve this question
    
Can you give an example of what you are trying to do? tikz-qtree library might help. There are many examples in the manual and on this site. –  mythealias Oct 28 '12 at 20:38
    
The answer given below is what I was looking for :) –  asymptotically Oct 28 '12 at 20:41
add comment

1 Answer

up vote 9 down vote accepted

The tikz-qtree package provides a [roof] style for these kinds of nodes for use in linguistic trees. I'm not sure if this is what you want:

\documentclass{article}
\usepackage{tikz-qtree}
\begin{document}
\Tree [.A [.B ]  [.C [.D \edge[roof]; {This is some stuff without internal structure} ] [.E ] ]]
\end{document}

output of code

share|improve this answer
    
Thanks! Exactly what I needed. I have to wait to accept, otherwise I'd have accepted already :) –  asymptotically Oct 28 '12 at 20:42
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.