summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex25
1 files changed, 13 insertions, 12 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
index 0d59a2b80b..13b17d6a5d 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
@@ -3,24 +3,24 @@
Here's a sample organization.
-The line |% !TEX TS-program = lualatex| ensures that you don't forget to compile with Lua\LATEX{}. The “standalone” class is useful, as all you need to do here is create a figure.
+The line |% !TEX TS-program = lualatex| ensures that you compile with Lua\LATEX{}. The \code{standalone} class is useful, as all you need to do here is create a figure.
The package \pkg{ifthen} is useful if you need to use some Boolean.
The macro \tkzcname{LuaCodeDebugOn} allows you to try and find errors in Lua code.
-It is of course possible to leave the Lua code in the \tkzNameEnv{tkzelements} environment, but externalizing this code has its advantages.
+While it's possible to leave the Lua code in the \tkzNameEnv{tkzelements} environment, externalizing this code has its advantages.
-The first advantage, if you use a good editor, is to have a good presentation of the code. Styles are different between “Lua” and \LATEX{}. This makes the code clearer. This is how I proceeded, then reintegrated the code into the main code.
+The first advantage is that, if you use a good editor, you have a better presentation of the code. Styles differ between \code{Lua} and \LATEX{}, making the code clearer. This is how I proceeded, then reintegrated the code into the main code.
-Another advantage is that you don't have to comment the code incorrectly. For Lua code, you comment lines with |--| (double minus sign), whereas for \LATEX{}, you comment with |%|.
+Another advantage is that you don't have to incorrectly comment the code. For Lua code, you comment lines with |--| (double minus sign), whereas for \LATEX{}, you comment with |%|.
-Third advantage: the code can be reused.
+A third advantage is that the code can be reused.
-\begin{verbatim}
+\begin{Verbatim}
% !TEX TS-program = lualatex
% Created by Alain Matthes on 2024-01-09.
@@ -43,11 +43,11 @@ Third advantage: the code can be reused.
\tkzFillCircle[color = orange](I,F)%
\end{tikzpicture}
\end{document}
-\end{verbatim}
+\end{Verbatim}
-And here is the code for the “Lua” part: the file |ex_sangaku.lua|
+And here is the code for the \code{Lua} part: the file |ex_sangaku.lua|
-\begin{verbatim}
+\begin{Verbatim}
z.A = point : new ( 0,0 )
z.B = point : new ( 8,0 )
L.AB = line : new ( z.A , z.B )
@@ -60,7 +60,7 @@ 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{Verbatim}
\begin{tkzelements}
scale = 1.25
@@ -78,13 +78,14 @@ z.I = intersection (L.Cc,L.BF)
\subsection{Scale problem} % (fold)
\label{sub:scale_problem}
-If necessary, it's better to do the scaling in the “Lua” section. The reason is that it will be more accurate. There is, however, a problem to be aware of. I've made it a point of honor to avoid using numerical values in my codes whenever possible. In principle, these values only appear in the definition of fixed points. If the “scale” option is used, scaling is applied when points are created. Let's imagine you want to organize your code as follows:
+If necessary, it's better to perform scaling in the \code{Lua} section. This approach tends to be more accurate. However, there is a caveat to be aware of. I've made it a point to avoid using numerical values in my codes whenever possible. Generally, these values only appear in the definition of fixed points.
+ If the \code{scale} option is used, scaling is applied when points are created. Let's imagine you want to organize your code as follows:
|scale = 1.5|\\
|xB = 8|\\
|z.B = point : new ( xB,0 )|
-Scaling would then be ineffective, as the numerical values are not modified, only the point coordinates. To take scaling into account, use the function \Igfct{math}{value (v) }.
+Scaling would then be ineffective, as the numerical values are not modified, only the point coordinates. To account for scaling, use the function \Igfct{math}{value (v) }.
|scale = 1.5|\\
|xB = value (8)|\\