diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex index 22025d11469..480b9d834d6 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex @@ -18,11 +18,10 @@ Another advantage is that you don't have to incorrectly comment the code. For Lu A third advantage is that the code can be reused. - +\begin{minipage}{.5\textwidth} \begin{Verbatim} % !TEX TS-program = lualatex % Created by Alain Matthes on 2024-01-09. - \documentclass[margin = 12pt]{standalone} \usepackage[mini]{tkz-euclide} \usepackage{tkz-elements,ifthen} @@ -32,7 +31,6 @@ A third advantage is that the code can be reused. scale = 1.25 dofile ("sangaku.lua") } - \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(I,F) @@ -42,37 +40,45 @@ A third advantage is that the code can be reused. \end{tikzpicture} \end{document} \end{Verbatim} - -And here is the code for the \code{Lua} part: the file |ex_sangaku.lua| - -\begin{Verbatim} -z.A = point : new ( 0,0 ) -z.B = point : new ( 8,0 ) -L.AB = line : new ( z.A , z.B ) -S = L.AB : square () -_,_,z.C,z.D = get_points (S) -z.F = S.ac : projection (z.B) -L.BF = line : new (z.B,z.F) -T.ABC = triangle : new ( z.A , z.B , z.C ) -L.bi = T.ABC : bisector (2) -z.c = L.bi.pb -L.Cc = line : new (z.C,z.c) -z.I = intersection (L.Cc,L.BF) -\end{Verbatim} - +\end{minipage} +\begin{minipage}{.5\textwidth} \directlua{ init_elements () - scale = 1.25 + scale = .75 dofile ("sangaku.lua") } -\begin{tikzpicture} - \tkzGetNodes - \tkzDrawCircle(I,F) - \tkzFillPolygon[color = purple](A,C,D)% - \tkzFillPolygon[color = blue!50!black](A,B,C)% - \tkzFillCircle[color = orange](I,F)% -\end{tikzpicture} +\begin{center} + \begin{tikzpicture} + \tkzGetNodes + \tkzDrawCircle(I,F) + \tkzFillPolygon[color = purple](A,C,D)% + \tkzFillPolygon[color = blue!50!black](A,B,C)% + \tkzFillCircle[color = orange](I,F)% + \end{tikzpicture} +\end{center} + +\end{minipage} +And here is the code for the \code{Lua} part: the file |ex_sangaku.lua| + +\begin{minipage}{.5\textwidth} +\begin{mybox} + \begin{Verbatim} + z.A = point : new ( 0,0 ) + z.B = point : new ( 8,0 ) + L.AB = line : new ( z.A , z.B ) + S = L.AB : square () + _,_,z.C,z.D = get_points (S) + z.F = S.ac : projection (z.B) + L.BF = line : new (z.B,z.F) + T.ABC = triangle : new ( z.A , z.B , z.C ) + L.bi = T.ABC : bisector (2) + z.c = L.bi.pb + L.Cc = line : new (z.C,z.c) + z.I = intersection (L.Cc,L.BF) + \end{Verbatim} +\end{mybox} +\end{minipage} \subsection{Scale problem} % (fold) \label{sub:scale_problem} |