summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/luacas/demotut3.dat
blob: 95139afaf26a77d879f0800b357079e12d609662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\parseforest{q}
\bracketset{action character = @}
\begin{forest}
    for tree = {
        font=\ttfamily,
        rectangle,
        rounded corners=1pt
    },
    where level=0{%
        fill=orange!25
    }{},
    @\forestresult
\end{forest}

\begin{CAS}
    r = diff(q,x,h)
\end{CAS}
\whatis{q} vs \whatis{r}

\luaexec{if q.operation == BinaryOperation.ADD then 
    tex.print("I'm an \\texttt{ADD}")
end}

\luaexec{tex.print("I'm an order", r.degree, "derivative.")}

\parseshrub{q}
\begin{forest}
  for tree = {draw,rectangle,rounded corners=1pt,fill=lightgray!20  font=\ttfamily}
  @\shrubresult
\end{forest}

\parseshrub{q.expressions[1]}
\begin{forest}
  for tree = {draw,rectangle,
  rounded corners=1pt,fill=lightgray!20,
  font=\ttfamily, s sep=2cm}
  @\shrubresult
\end{forest}

\parseshrub{r}
\begin{forest}
    for tree = {draw,rectangle,
    rounded corners=1pt,fill=lightgray!20,
    font=\ttfamily, s sep=1cm}
    @\shrubresult
\end{forest}