Debian Codegraph @

texmf-dist/doc/lualatex/luacas/tutorial/tut3/demotut3.dat

raw
1 \parseforest{q}
2 \bracketset{action character = @}
3 \begin{forest}
4 for tree = {
5 font=\ttfamily,
6 rectangle,
7 rounded corners=1pt
8 },
9 where level=0{%
10 fill=orange!25
11 }{},
12 @\forestresult
13 \end{forest}
14
15 \begin{CAS}
16 r = diff(q,x,h)
17 \end{CAS}
18 \whatis{q} vs \whatis{r}
19
20 \luaexec{if q.operation == BinaryOperation.ADD then
21 tex.print("I'm an \\texttt{ADD}")
22 end}
23
24 \luaexec{tex.print("I'm an order", r.degree, "derivative.")}
25
26 \parseshrub{q}
27 \begin{forest}
28 for tree = {draw,rectangle,rounded corners=1pt,fill=lightgray!20 font=\ttfamily}
29 @\shrubresult
30 \end{forest}
31
32 \parseshrub{q.expressions[1]}
33 \begin{forest}
34 for tree = {draw,rectangle,
35 rounded corners=1pt,fill=lightgray!20,
36 font=\ttfamily, s sep=2cm}
37 @\shrubresult
38 \end{forest}
39
40 \parseshrub{r}
41 \begin{forest}
42 for tree = {draw,rectangle,
43 rounded corners=1pt,fill=lightgray!20,
44 font=\ttfamily, s sep=1cm}
45 @\shrubresult
46 \end{forest}