Results 1 to 2 of 2

Math Help - Trees in LaTeX

  1. #1
    Member Haven's Avatar
    Joined
    Jul 2009
    Posts
    197
    Thanks
    8

    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?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member flyingsquirrel's Avatar
    Joined
    Apr 2008
    Posts
    802
    Quote Originally Posted by Haven View Post
    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$"
    Attached Thumbnails Attached Thumbnails Trees in LaTeX-ex_qtree.gif  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. How Many Trees?
    Posted in the Pre-Calculus Forum
    Replies: 0
    Last Post: September 12th 2010, 10:52 PM
  2. Trees
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: November 21st 2009, 01:00 PM
  3. LaTex inside of LaTex
    Posted in the LaTeX Help Forum
    Replies: 2
    Last Post: November 12th 2009, 12:07 PM
  4. how can you plant 10 trees in 5 rows of 4 trees each?
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: December 22nd 2008, 12:43 PM
  5. trees
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: May 22nd 2007, 10:22 AM

Search Tags


/mathhelpforum @mathhelpforum