summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex32
1 files changed, 20 insertions, 12 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
index 90e07b1ef7..70b61fb902 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
@@ -8,7 +8,7 @@
\begin{itemize}
\item Numerical variable: the writing conventions for real numbers are the same as for \pkg{Lua}.
- \item Complex numbers: as for real numbers but to define them you must write |za = point (1,2)|. Mathematically, this corresponds to 1+2i, which you can find with |tex.print(tostring(za))|.(see \ref{sub:complex_numbers})
+ \item Complex numbers: Similar to real numbers, but to define them, you must write |za = point (1,2)|. Mathematically, this corresponds to 1+2i, which you can find with |tex.print(tostring(za))|.(Refer \ref{sub:complex_numbers})
\item Boolean: you can write |bool = true| or |bool = false| then with Lua you can use the code :\\
\begin{mybox}
|if bool == ... then ... else ... end|
@@ -32,16 +32,16 @@
\subsection{Assigning a Name to a Point} % (fold)
\label{sub:assigning_a_name_to_a_point}
-Currently the only obligation is to store the points in the table |z| \footnote{To place the point M in the table, simply write |z.M| = \ldots or |z["M"]|= \ldots} if you want to use them in \TIKZ\ or \pkg{tkz-euclide}. If it is a point which will not be used, then you can designate it as you wish by respecting the conventions of Lua.
+At present, the only obligation is to store the points in the table |z| \footnote{To place the point M in the table, simply write |z.M| = \ldots or |z["M"]|= \ldots} if you intend to use them in \TIKZ\ or \pkg{tkz-euclide}. f a point will not be used, you can designate it as you wish while adhering to Lua conventions.
- The points which occur in the environment \tkzNameEnv{tkzelements} must respect a convention which is |z.name| such that |name| will be the name of the corresponding \tkzname{node}.
+ Points within the \tkzNameEnv{tkzelements} environment must follow a convention in the form |z.name|, where |name| represents the name of the corresponding \tkzname{node}.
-What are the conventions for designating |name|? You have to respect the Lua conventions in particular cases.
+As for the conventions for designating |name| you must adhere to Lua conventions in particular cases.
\begin{enumerate}
- \item The use of prime is problematic. If the point name contains more than one symbol and ends with |p| then when passing into \pkg{TikZ} or \pkg{tkz-euclide}, the letters |p| will be replaced by |'| using the macro \tkzcname{tkzGetNodes}; \index{prime}
+ \item The use of prime can be problematic. If the point name contains more than one symbol and ends with |p| then when passing into \pkg{TikZ} or \pkg{tkz-euclide}, the letters |p| will be replaced by |'| using the macro \tkzcname{tkzGetNodes}; \index{prime}
- \item One possibility, however, in order to have a more explicit code is to suppose that you want to designate a point by "euler". It would be possible for example to write |euler = ...|, and at the end of the code for the transfer, |z.E = euler|. It is also possible to use a temporary name |euler| and to replace it in \TIKZ{}. Either at the time of placing the labels, or for example by using |pgfnodealias{E}{euler}|. This possibility also applies in other cases: prime, double prime, etc.
+ \item Alternatively, for a more explicit code, suppose you want to designate a point as "euler". You could, for example, write |euler = ...|, and at the end of the code for the transfer, |z.E = euler|. It is also possible to use a temporary name |euler| and to replace it in \TIKZ{}. Either at the time of placing the labels, or for example by using |pgfnodealias{E}{euler}|. This possibility also applies in other cases: prime, double prime, etc.
\end{enumerate}
@@ -58,16 +58,24 @@ Here are some different ways of naming a point:
\subsection{Assigning a Name to Other Objects} % (fold)
\label{sub:assigning_a_name_to_other_objects}
-You have the choice to give a name to objects other than points. That said, it is preferable to respect certain rules in order to make the code easier to read.
-I have chosen for my examples the following conventions: first of all I store the objects in tables: |L.name| for lines and segments, |C.name| for circles, |T.name| for triangles, |E.name| for ellipses.
+You have the flexibility to assign names to objects other than points. However, it's advisable to adhere to certain conventions to enhance code readability. For my examples, I've chosen the following conventions: first of all, I store the objects in tables: |L| for lines and segments, |C| for circles, |T| for triangles, |E| for ellipses.
-For lines, I use the names of the two points. So if a line passes through points $A$ and $B$, I name the line |L.AB|.
+\begin{itemize}
+ \item
+ For lines, I use the names of the two points they pass through. For example, if a line passes through points $A$ and $B$, I name the line |L.AB|.
+
+\item Circles are stored in table named |C|.
+ For example, I name |C.AB| the circle of center $A$ passing through $B$. Other names like C.euler or C.external are also acceptable.
-For circles, I name |C.AB| the circle of center $A$ passing through $B$, but something like |C.euler| or |C.external| is fine.
+\item Triangles are stored in table named |T|.
+ For example, I name |T.ABC| the triangle whose vertices are $A$, $B$ and $C$. However, names like |T.feuerbach| are also acceptable.
+
+\item Ellipses are stored in table named |E|.
+ For ellipses, I name |E.ABC| the ellipse with center $A$ through vertex $B$ and covertex $C$.
+\end{itemize}
-For triangles, I name |T.ABC| the triangle whose vertices are $A$, $B$ and $C$ but |T.feuerbach|.
+Adhering to these conventions can help improve the readability of the code.
-For ellipses, I name |E.ABC| the ellipse with center $A$ through vertex $B$ and covertex $C$.
% subsection assigning_a_name_to_other_objects(end)
\subsection{Writing conventions for attributes, methods.} % (fold)