# Math Help - Trees in LaTeX

1. ## Trees in LaTeX

I am writing a .tex file that require me to draw some trees but I keep getting errors.

I'm using the qtree package and I am trying to use the following line

\Tree [.+ 5 [.+[.* 5 2] [.* 2 4]]]

but when I compile I get this error:

Runaway argument?
! Paragraph ended before \doanode was complete.
<to be read again>
\par

What am I doing wrong?

2. Originally Posted by Haven
I'm using the qtree package and I am trying to use the following line

\Tree [.+ 5 [.+[.* 5 2] [.* 2 4]]]
Adding extra spaces around each node/subtree solves the problem
Code:
\Tree [.+ 5 [.+ [.* 5 2 ] [.* 2 4 ] ] ]
I am not sure why this is so. Maybe because "Tree labels are delimited by whitespace." (qtree documentation [PDF file], subsection 3.1)

Also you might want to replace "*" by "$\times$"