2

I'm trying to draw parse trees for mathematical expressions such as (x + (y - z)).

When I google for parse trees in LaTeX, all I get are packages that produce an output similar to the style of this package:

The wrong parse tree!

However, the notation used at my university doesn't resemble that at all. Our parse trees look like this:

My desired parse tree

Or like this (using a slightly different notation that doesn't show the intermediate nodes):

My desired parse tree 2

I'm stuck for what to do. Are there any packages that will produce this kind of output that I haven't come across?

Todd Davies
  • 1,389

0 Answers0