Warning: this is an htmlized version! The original is across this link, and the conversion rules are here.
```Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require "treetex"
> TN = function (root, b, l, ...)
>>     return TreeNode {[0]=root, bar=b, label=l, ...}
>>   end
> T = TN("f(1+2+3)", "-", "app",
>>        TN("f"),
>>        TN("1+2+3", "=", nil,
>>           TN"1",
>>           TN"2",
>>           TN"3"))
> print(T:TeX_subtree("  "))
\infer[{app}]{ \mathstrut f(1+2+3) }{
\mathstrut f &
\infer={ \mathstrut 1+2+3 }{
\mathstrut 1 &
\mathstrut 2 &
\mathstrut 3 } }
> print(T:TeX_deftree("f(1+2+3)"))
\defded{f(1+2+3)}{
\infer[{app}]{ \mathstrut f(1+2+3) }{
\mathstrut f &
\infer={ \mathstrut 1+2+3 }{
\mathstrut 1 &
\mathstrut 2 &
\mathstrut 3 } } }
>
> -- Here's a typical TreeNode structure:
> PPV(T)
{ 0="f(1+2+3)",
1={0="f"},
2={0="1+2+3", 1={0="1"}, 2={0="2"}, 3={0="3"}, "bar"="="},
"bar"="-",
"label"="app"
}
> -- {0="f(1+2+3)",
> --    1={0="f"},
> --    2={0="1+2+3",
> --         1={0="1"},
> --         2={0="2"},
> --         3={0="3"},
> --       "bar"="="},
> --  "bar"="-",
> --  "label"="app"}
>
> ```