summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex466
1 files changed, 254 insertions, 212 deletions
diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex
index 6ae71f7cb5..45e4a3d3fd 100644
--- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex
+++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex
@@ -5,50 +5,65 @@ It is of course essential to draw straight lines, but before this can be done, i
\subsection{Definition of straight lines}
-\begin{NewMacroBox}{tkzDefLine}{\oarg{local options}\parg{pt1,pt2} ou \parg{pt1,pt2,pt3}}
-The argument is a list of two or three points. Depending on the case, the macro defines one or two points necessary to obtain the line sought. Either the macro \tkzcname{tkzGetPoint} or the macro \tkzcname{tkzGetPoints} must be used.
+\begin{NewMacroBox}{tkzDefLine}{\oarg{local options}\parg{pt1,pt2} or \parg{pt1,pt2,pt3}}%
+The argument is a list of two or three points. Depending on the case, the macro defines one or two points necessary to obtain the line sought. Either the macro \tkzcname{tkzGetPoint} or the macro \tkzcname{tkzGetPoints} must be used.
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
-options & default & definition \\
+arguments & example & explication \\
\midrule
-\TOline{mediator}{}{mediator. Two points are defined}
-\TOline{perpendicular=through\ldots}{}{perpendicular to a straight line passing through a point}
-\TOline{orthogonal=through\ldots}{}{see above }
-\TOline{parallel=through\ldots}{}{parallel to a straight line passing through a point}
-\TOline{bisector}{}{bisector of an angle defined by three points}
-\TOline{bisector out}{}{Exterior Angle Bisector}
-\TOline{tangent=at\ldots }{}{tangent to a circle at a given point}
-\TOline{tangent=from\ldots}{}{tangent to a circle(O,A) passing through a given point}
-\TOline{tangent=from with R\ldots}{}{tangent to a circle(O,r) passing through a given point}
-\TOline{K}{1}{Coefficient for the perpendicular line}
- \bottomrule
+\TAline{\parg{pt1,pt2}}{\parg{A,B}} {[mediator](A,B)}
+\TAline{\parg{pt1,pt2,pt3}}{\parg{A,B,C}} {[bisector](B,A,C)}
+\end{tabular}
+
+\medskip
+\begin{tabular}{lll}%
+\toprule
+options & default & definition \\
+\TOline{mediator}{}{two points are defined}
+\TOline{perpendicular=through\dots}{mediator}{perpendicular to a straight line passing through a point}
+\TOline{orthogonal=through\dots}{mediator}{see above }
+\TOline{parallel=through\dots}{mediator}{parallel to a straight line passing through a point}
+\TOline{bisector}{mediator}{bisector of an angle defined by three points}
+\TOline{bisector out}{mediator}{Exterior Angle Bisector}
+\TOline{K}{1}{coefficient for the perpendicular line}
+\TOline{normed}{false}{normalizes the created segment}
\end{tabular}
\end{NewMacroBox}
\subsubsection{Example with \tkzname{mediator}}
\begin{tkzexample}[latex=5 cm,small]
\begin{tikzpicture}[rotate=25]
- \tkzInit
- \tkzDefPoints{-2/0/A,1/2/B}
- \tkzDefLine[mediator](A,B) \tkzGetPoints{C}{D}
- \tkzDefPointWith[linear,K=.75](C,D) \tkzGetPoint{D}
- \tkzDefMidPoint(A,B) \tkzGetPoint{I}
- \tkzFillPolygon[color=orange!30](A,C,B,D)
- \tkzDrawSegments(A,B C,D)
- \tkzMarkRightAngle(B,I,C)
- \tkzDrawSegments(D,B D,A)
- \tkzDrawSegments(C,B C,A)
+ \tkzDefPoints{-2/0/A,1/2/B}
+ \tkzDefLine[mediator](A,B) \tkzGetPoints{C}{D}
+ \tkzDefPointWith[linear,K=.75](C,D) \tkzGetPoint{D}
+ \tkzDefMidPoint(A,B) \tkzGetPoint{I}
+ \tkzFillPolygon[color=orange!30](A,C,B,D)
+ \tkzDrawSegments(A,B C,D)
+ \tkzMarkRightAngle(B,I,C)
+ \tkzDrawSegments(D,B D,A)
+ \tkzDrawSegments(C,B C,A)
\end{tikzpicture}
\end{tkzexample}
-\subsubsection{Example avec \tkzname{orthogonal} et \tkzname{parallel}}
+\subsubsection{Example with \tkzname{bisector} and \tkzname{normed}}
+\begin{tkzexample}[latex=7 cm,small]
+\begin{tikzpicture}[rotate=25,scale=.75]
+ \tkzDefPoints{0/0/C, 2/-3/A, 4/0/B}
+ \tkzDefLine[bisector,normed](B,A,C) \tkzGetPoint{a}
+ \tkzDrawLines[add= 0 and .5](A,B A,C)
+ \tkzShowLine[bisector,gap=4,size=2,color=red](B,A,C)
+ \tkzDrawLines[blue!50,dashed,add= 0 and 3](A,a)
+\end{tikzpicture}
+\end{tkzexample}
+
+\subsubsection{Example with \tkzname{orthogonal} and \tkzname{parallel}}
\begin{tkzexample}[latex=5 cm,small]
\begin{tikzpicture}
\tkzDefPoints{-1.5/-0.25/A,1/-0.75/B,-0.7/1/C}
\tkzDrawLine(A,B)
- \tkzLabelLine[pos=1.25,left](A,B){$(d_1)$}
+ \tkzLabelLine[pos=1.25,below left](A,B){$(d_1)$}
\tkzDrawPoints(A,B,C)
\tkzDefLine[orthogonal=through C](B,A) \tkzGetPoint{c}
\tkzDrawLine(C,c)
@@ -57,111 +72,169 @@ options & default & definition \\
\tkzMarkRightAngle(C,I,B)
\tkzDefLine[parallel=through C](A,B) \tkzGetPoint{c'}
\tkzDrawLine(C,c')
- \tkzLabelLine[pos=1.25,left](C,c'){$(d_2)$}
+ \tkzLabelLine[pos=1.25,below left](C,c'){$(d_2)$}
\tkzMarkRightAngle(I,C,c')
\end{tikzpicture}
\end{tkzexample}
-
-\newpage
\subsubsection{An envelope}
Based on a figure from O. Reboux with pst-eucl by D Rodriguez.
\begin{tkzexample}[vbox,small]
-\begin{tikzpicture}[scale=1]
- \tkzInit[xmin=-6,ymin=-6,xmax=6,ymax=6]
- \tkzClip
- \tkzDefPoint(0,0){O}
- \tkzDefPoint(132:4){A}
- \tkzDefPoint(5,0){B}
- \foreach \ang in {5,10,...,360}{%
- \tkzDefPoint(\ang:5){M}
- \tkzDefLine[mediator](A,M)
- \tkzDrawLine[color=magenta,add= 4 and 4](tkzFirstPointResult,tkzSecondPointResult)}
+\begin{tikzpicture}[scale=.75]
+ \tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6] % necessary
+ \tkzClip
+ \tkzDefPoint(0,0){O}
+ \tkzDefPoint(132:4){A}
+ \tkzDefPoint(5,0){B}
+ \foreach \ang in {5,10,...,360}{%
+ \tkzDefPoint(\ang:5){M}
+ \tkzDefLine[mediator](A,M)
+ \tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)}
\end{tikzpicture}
\end{tkzexample}
-\subsubsection{A parable}
+\subsubsection{A parabola}
Based on a figure from O. Reboux with pst-eucl by D Rodriguez.
It is not necessary to name the two points that define the mediator.
\begin{tkzexample}[vbox,small]
-\begin{tikzpicture}[scale=1.25]
- \tkzInit[xmin=-6,ymin=-6,xmax=6,ymax=6]
- \tkzClip
- \tkzDefPoint(0,0){O}
- \tkzDefPoint(132:5){A}
- \tkzDefPoint(4,0){B}
- \foreach \ang in {5,10,...,360}{%
- \tkzDefPoint(\ang:4){M}
- \tkzDefLine[mediator](A,M)
- \tkzDrawLine[color=magenta,
- add= 4 and 4](tkzFirstPointResult,tkzSecondPointResult)}
- \end{tikzpicture}
+\begin{tikzpicture}[scale=.75]
+ \tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6]
+ \tkzClip
+ \tkzDefPoint(0,0){O}
+ \tkzDefPoint(132:5){A}
+ \tkzDefPoint(4,0){B}
+ \foreach \ang in {5,10,...,360}{%
+ \tkzDefPoint(\ang:4){M}
+ \tkzDefLine[mediator](A,M)
+ \tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)}
+\end{tikzpicture}
\end{tkzexample}
-\subsubsection{Drawing a tangent option \tkzimp{from with R} and \tkzimp{at}}
+%<---------------------------------------------------------------------------->
+\subsection{Specific lines: Tangent to a circle}
+Two constructions are proposed. The first one is the construction of a tangent to a circle at a given point of this circle and the second one is the construction of a tangent to a circle passing through a given point outside a disc.
+
+\begin{NewMacroBox}{tkzDefTangent}{\oarg{local options}\parg{pt1,pt2} or \parg{pt1,dim}}%
+The parameter in brackets is the center of the circle or the center of the circle and a point on the circle or the center and the radius. This macro replaces the old one: \tkzcname{tkzTangent}.
+
+\medskip
+\begin{tabular}{lll}%
+\toprule
+arguments & example & explication \\
+\midrule
+\TAline{\parg{pt1,pt2 or \parg{pt1,dim}} }{\parg{A,B} or \parg{A,2cm}} {$[AB]$ is radius $A$ is the center}
+\bottomrule
+\end{tabular}
+
+\medskip
+\begin{tabular}{lll}%
+options & default & definition \\
+\midrule
+\TOline{at=pt}{at}{tangent to a point on the circle}
+\TOline{from=pt} {at}{tangent to a circle passing through a point}
+\TOline{from with R=pt} {at}{idem, but the circle is defined by center = radius}
+\bottomrule
+\end{tabular}
+The tangent is not drawn. A second point of the tangent is given by \tkzname{tkzPointResult}.
+\end{NewMacroBox}
+
+\subsubsection{Example of a tangent passing through a point on the circle }
\begin{tkzexample}[latex=7cm,small]
- \begin{tikzpicture}[scale=.5]
+\begin{tikzpicture}[scale=.75]
\tkzDefPoint(0,0){O}
- \tkzDefPoint(6,6){E}
- \tkzDefRandPointOn[circle=center O radius 4cm]
+ \tkzDefPoint(6,6){E}
+ \tkzDefRandPointOn[circle=center O radius 3cm]
\tkzGetPoint{A}
- \tkzDefRandPointOn[circle=center O radius 4cm]
- \tkzGetPoint{B}
- \tkzDrawSegments(O,A O,B)
- \tkzDrawCircle(O,A)
- \tkzDefTangent[from with R=E](O,4cm)
- \tkzGetSecondPoint{k}
+ \tkzDrawSegment(O,A)
+ \tkzDrawCircle(O,A)
\tkzDefTangent[at=A](O)
\tkzGetPoint{h}
- \tkzDrawPoints(E)
- \tkzDrawLine[add = .5 and .5](A,h)
- \tkzDrawLine[add = .5 and .5](E,k)
+ \tkzDrawLine[add = 4 and 3](A,h)
\tkzMarkRightAngle[fill=red!30](O,A,h)
- \end{tikzpicture}
+\end{tikzpicture}
\end{tkzexample}
+\subsubsection{Example of tangents passing through an external point }
+\begin{tkzexample}[latex=7cm,small]
+\begin{tikzpicture}[scale=.8]
+ \tkzDefPoint(3,3){c}
+ \tkzDefPoint(6,3){a0}
+ \tkzRadius=1 cm
+ \tkzDrawCircle[R](c,\tkzRadius)
+ \foreach \an in {0,10,...,350}{
+ \tkzDefPointBy[rotation=center c angle \an](a0)
+ \tkzGetPoint{a}
+ \tkzDefTangent[from with R = a](c,\tkzRadius)
+ \tkzGetPoints{e}{f}
+ \tkzDrawLines[color=magenta](a,f a,e)
+ \tkzDrawSegments(c,e c,f)
+ }%
+\end{tikzpicture}
+\end{tkzexample}
+\subsubsection{Example of Andrew Mertz}
+\begin{tkzexample}[latex=6cm,small]
+ \begin{tikzpicture}[scale=.5]
+ \tkzDefPoint(100:8){A}\tkzDefPoint(50:8){B}
+ \tkzDefPoint(0,0){C} \tkzDefPoint(0,4){R}
+ \tkzDrawCircle(C,R)
+ \tkzDefTangent[from = A](C,R) \tkzGetPoints{D}{E}
+ \tkzDefTangent[from = B](C,R) \tkzGetPoints{F}{G}
+ \tkzDrawSector[fill=blue!80!black,opacity=0.5](A,D)(E)
+ \tkzFillSector[color=red!80!black,opacity=0.5](B,F)(G)
+ \tkzInterCC(A,D)(B,F) \tkzGetSecondPoint{I}
+ \tkzDrawPoint[color=black](I)
+ \end{tikzpicture}
+\end{tkzexample}
+\url{http://www.texample.net/tikz/examples/}
-\subsubsection{Drawing a tangent option \tkzimp{from}}
-
+\subsubsection{Drawing a tangent option \tkzimp{from with R} and \tkzimp{at}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.5]
- \tkzDefPoint(0,0){B}
- \tkzDefPoint(0,8){A}
- \tkzDefSquare(A,B)
- \tkzGetPoints{C}{D}
- \tkzDrawSquare(A,B)
- \tkzClipPolygon(A,B,C,D)
- \tkzDefPoint(4,8){F}
- \tkzDefPoint(4,0){E}
- \tkzDefPoint(4,4){Q}
- \tkzFillPolygon[color = green](A,B,C,D)
- \tkzDrawCircle[fill = orange](B,A)
- \tkzDrawCircle[fill = purple](E,B)
- \tkzDefTangent[from=B](F,A)
- \tkzInterLL(F,tkzFirstPointResult)(C,D)
- \tkzInterLL(A,tkzPointResult)(F,E)
- \tkzDrawCircle[fill = yellow](tkzPointResult,Q)
- \tkzDefPointBy[projection= onto B--A](tkzPointResult)
- \tkzDrawCircle[fill = blue!50!black](tkzPointResult,A)
+ \tkzDefPoint(0,0){O}
+ \tkzDefRandPointOn[circle=center O radius 4cm]
+ \tkzGetPoint{A}
+ \tkzDefTangent[at=A](O)
+ \tkzGetPoint{h}
+ \tkzDrawSegments(O,A)
+ \tkzDrawCircle(O,A)
+ \tkzDrawLine[add = 1 and 1](A,h)
+ \tkzMarkRightAngle[fill=red!30](O,A,h)
+ \end{tikzpicture}
+\end{tkzexample}
+
+\subsubsection{Drawing a tangent option \tkzimp{from}}
+\begin{tkzexample}[latex=5cm,small]
+\begin{tikzpicture}[scale=.5]
+ \tkzDefPoint(0,0){B}
+ \tkzDefPoint(0,8){A}
+ \tkzDefSquare(A,B)
+ \tkzGetPoints{C}{D}
+ \tkzDrawSquare(A,B)
+ \tkzClipPolygon(A,B,C,D)
+ \tkzDefPoint(4,8){F}
+ \tkzDefPoint(4,0){E}
+ \tkzDefPoint(4,4){Q}
+ \tkzFillPolygon[color = green](A,B,C,D)
+ \tkzDrawCircle[fill = orange](B,A)
+ \tkzDrawCircle[fill = purple](E,B)
+ \tkzDefTangent[from=B](F,A)
+ \tkzInterLL(F,tkzFirstPointResult)(C,D)
+ \tkzInterLL(A,tkzPointResult)(F,E)
+ \tkzDrawCircle[fill = yellow](tkzPointResult,Q)
+ \tkzDefPointBy[projection= onto B--A](tkzPointResult)
+ \tkzDrawCircle[fill = blue!50!black](tkzPointResult,A)
\end{tikzpicture}
\end{tkzexample}
\section{Drawing, naming the lines}
-
-The following macros are simply used to draw, name lines
-
-
+The following macros are simply used to draw, name lines.
\subsection{Draw a straight line}
-
-To draw a normal straight line, just give a couple of points. You can use the \tkzname{add} option to extend the line.( This option is due to \tkzimp{Mark Wibrow} ).
-
-In the special case of lines defined in a triangle, the number of arguments is a list of three points (the vertices of the triangle). The second point is where the line will come from. The first and last points determine the target segment. The old method has therefore been slightly modified. So for \tkzcname{tkzDrawMedian}, instead of |(A,B)(C)| you have to write |(B,C,A)| where C is the point that will be linked to the middle of the segment |[A,B]|.
-
+To draw a normal straight line, just give a couple of points. You can use the \tkzname{add} option to extend the line (This option is due to \tkzimp{Mark Wibrow}, see the code below).
\begin{tkzltxexample}[]
\tikzset{%
@@ -171,27 +244,27 @@ In the special case of lines defined in a triangle, the number of arguments is a
\tikztonodes}}}
\end{tkzltxexample}
- \begin{NewMacroBox}{tkzDrawLine}{\oarg{local options}\parg{pt1,pt2} ou \parg{pt1,pt2,pt3} }
+In the special case of lines defined in a triangle, the number of arguments is a list of three points (the vertices of the triangle). The second point is where the line will come from. The first and last points determine the target segment. The old method has therefore been slightly modified. So for \tkzcname{tkzDrawMedian}, instead of $(A,B)(C)$ you have to write $(B,C,A)$ where $C$ is the point that will be linked to the middle of the segment $[A,B]$.
+
+\begin{NewMacroBox}{tkzDrawLine}{\oarg{local options}\parg{pt1,pt2} or \parg{pt1,pt2,pt3}}%
The arguments are a list of two points or three points.
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
options & default & definition \\
\midrule
-\TOline{median}{none}{ [median](A,B,C) median from B}
-\TOline{altitude}{none}{[altitude](C,A,B) altitude from A}
-\TOline{bisector}{none}{[bisector](B,C,A) bisector from C }
-\TOline{none}{none}{ draw the straight line A,B }
-\TOline{add= nb1 and nb2}{.2 and .2}{Extends the segment}
+\TOline{median}{none}{[median](A,B,C) median from $B$}
+\TOline{altitude}{none}{[altitude](C,A,B) altitude from $A$}
+\TOline{bisector}{none}{[bisector](B,C,A) bisector from $C$}
+\TOline{none}{none}{draw the straight line $(AB)$}
+\TOline{add= nb1 and nb2}{.2 and .2}{extends the segment}
\bottomrule
\end{tabular}
-\medskip
-\tkzname{add} defines the length of the line passing through the points pt1 and pt2. Both numbers are percentages. The styles of \TIKZ\ are accessible for plots
+\tkzname{add} defines the length of the line passing through the points pt1 and pt2. Both numbers are percentages. The styles of \TIKZ\ are accessible for plots.
\end{NewMacroBox}
-\subsubsection{Examples of right-hand plots with \tkzname{add}}
-
+\subsubsection{Examples with \tkzname{add}}
\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}
\tkzInit[xmin=-2,xmax=3,ymin=-2.25,ymax=2.25]
@@ -208,9 +281,8 @@ options & default & definition \\
\end{tikzpicture}
\end{tkzexample}
-\newpage
It is possible to draw several lines, but with the same options.
-\begin{NewMacroBox}{tkzDrawLines}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}
+\begin{NewMacroBox}{tkzDrawLines}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}%
Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for the draws.
\end{NewMacroBox}
@@ -243,7 +315,6 @@ Arguments are a list of pairs of points separated by spaces. The styles of \TI
\end{tkzexample}
\subsubsection{Medians in a triangle}
-
\begin{tkzexample}[latex=7 cm,small]
\begin{tikzpicture}[scale=1.25]
\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}
@@ -256,7 +327,6 @@ Arguments are a list of pairs of points separated by spaces. The styles of \TI
\end{tkzexample}
\subsubsection{Altitudes in a triangle}
-
\begin{tkzexample}[latex=7 cm,small]
\begin{tikzpicture}[scale=1.25]
\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}
@@ -272,7 +342,7 @@ Arguments are a list of pairs of points separated by spaces. The styles of \TI
You have to give the angles in a straight line.
\begin{tkzexample}[latex=7 cm,small]
-\begin{tikzpicture}[scale=1.5]
+\begin{tikzpicture}[scale=1.25]
\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}
\tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C)
\tkzSetUpLine[color=purple]
@@ -282,32 +352,23 @@ You have to give the angles in a straight line.
\end{tikzpicture}
\end{tkzexample}
-
-\subsection{Add labels on a straight line \tkzcname{tkzLabelLine}}
-
- \begin{NewMacroBox}{tkzLabelLine}{\oarg{local options}\parg{pt1,pt2}\marg{label}}
-
- \begin{tabular}{lll}
- \toprule
- arguments & default & definition \\
- \midrule
- \TAline{label}{}{example \tkzcname{tkzLabelLine(A,B)\{$\delta$\}}}
- \bottomrule
- \end{tabular}
-
-\medskip
-\begin{tabular}{lll}
-\toprule
-options & default & definition \\
+\subsection{Add labels on a straight line \tkzcname{tkzLabelLine}}%
+\begin{NewMacroBox}{tkzLabelLine}{\oarg{local options}\parg{pt1,pt2}\marg{label}}
+\begin{tabular}{lll}%
+arguments & default & definition \\
\midrule
-\TOline{pos}{.5}{pos est une option de \TIKZ\ mais essentielle dans ce cas}
- \bottomrule
+\TAline{label}{}{\tkzcname{tkzLabelLine(A,B)}\{\$\tkzcname{Delta}\$\}}
+\bottomrule
\end{tabular}
-\medskip
-As an option, and in addition to the \tkzname{pos}, you can use all styles of \TIKZ\ , especially the placement with \tkzname{above}, \tkzname{right}, \dots
+\begin{tabular}{lll}%
+options & default & definition \\
+\midrule
+\TOline{pos}{.5}{\tkzname{pos} is an option for \TIKZ, but essential in this case\dots}
+\end{tabular}
- \end{NewMacroBox}
+As an option, and in addition to the \tkzname{pos}, you can use all styles of \TIKZ, especially the placement with \tkzname{above}, \tkzname{right}, \dots
+\end{NewMacroBox}
\subsubsection{Example with \tkzcname{tkzLabelLine}}
An important option is \tkzname{pos}, it's the one that allows you to place the label along the right. The value of \tkzname{pos} can be greater than 1 or negative.
@@ -319,22 +380,18 @@ An important option is \tkzname{pos}, it's the one that allows you to place the
\tkzGetPoint{c}
\tkzDrawLines(A,B C,c)
\tkzLabelLine[pos=1.25,blue,right](C,c){$(\delta)$}
- \tkzLabelLine[pos=-0.25,red,left](C,c){encore $(\delta)$}
+ \tkzLabelLine[pos=-0.25,red,left](C,c){again $(\delta)$}
\end{tikzpicture}
\end{tkzexample}
\section{Draw, Mark segments}
-
-There is, of course, a macro to simply draw a segment (it would be possible, as for a half line, to create a style with \tkzcname{add}) .
-
+There is, of course, a macro to simply draw a segment (it would be possible, as for a half line, to create a style with \tkzcname{add}).
\subsection{Draw a segment \tkzcname{tkzDrawSegment}}
-
-
- \begin{NewMacroBox}{tkzDrawSegment}{\oarg{local options}\parg{pt1,pt2}}
-The arguments are a list of two points. The styles of \TIKZ are available for the drawings
+\begin{NewMacroBox}{tkzDrawSegment}{\oarg{local options}\parg{pt1,pt2}}%
+The arguments are a list of two points. The styles of \TIKZ\ are available for the drawings.
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
argument & example & definition \\
\midrule
\TAline{(pt1,pt2)}{(A,B)}{draw the segment $[A,B]$}
@@ -342,12 +399,14 @@ argument & example & definition \\
\end{tabular}
\medskip
-\begin{tabular}{lll}
-options & exemple & définition \\
+\begin{tabular}{lll}%
+options & example & definition \\
\midrule
-\TOline{options de TikZ}{}{all TikZ options are valid.}
-\TOline{add}{}{add = kl and kr ; allows the segment to be extended to the left and right}
-\TOline{dim}{}{dim = label,dim,option ; allows you to add dimensions to a figure.}
+\TOline{\TIKZ\ options}{}{all \TIKZ\ options are valid.}
+\TOline{add}{0 and 0}{add = $kl$ and $kr$, \dots}
+\TOline{\dots}{\dots}{allows the segment to be extended to the left and right. }
+\TOline{dim}{no default}{dim = \{label,dim,option\}, \dots}
+\TOline{\dots}{\dots}{allows you to add dimensions to a figure.}
\bottomrule
\end{tabular}
@@ -366,7 +425,7 @@ This is of course equivalent to \tkzcname{draw (A)--(B);}
\end{tikzpicture}
\end{tkzexample}
-\subsubsection{Example of extending an option segment \tkzimp{add}}
+\subsubsection{Example of extending an segment with option \tkzname{add}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
@@ -380,40 +439,34 @@ This is of course equivalent to \tkzcname{draw (A)--(B);}
\end{tikzpicture}
\end{tkzexample}
-\subsubsection{Example of adding dimensions (technical figure) option \tkzimp{dim}}
- \begin{tkzexample}[latex=7cm,small]
- \begin{tikzpicture}[scale=2]
- \pgfkeys{/pgf/number format/.cd,fixed,precision=2}
- % Define the first two points
- \tkzDefPoint(0,0){A}
- \tkzDefPoint(3,0){B}
- \tkzDefPoint(1,1){C}
- % Draw the triangle and the points
- \tkzDrawPolygon(A,B,C)
- \tkzDrawPoints(A,B,C)
- % Label the sides
- \tkzCalcLength[cm](A,B)\tkzGetLength{ABl}
- \tkzCalcLength[cm](B,C)\tkzGetLength{BCl}
- \tkzCalcLength[cm](A,C)\tkzGetLength{ACl}
- % add dim
- \tkzDrawSegment[dim={\pgfmathprintnumber\BCl,
- 6pt,transform shape}](C,B)
- \tkzDrawSegment[dim={\pgfmathprintnumber\ACl,
- 6pt,transform shape}](A,C)
- \tkzDrawSegment[dim={\pgfmathprintnumber\ABl,
- -6pt,transform shape}](A,B)
- \end{tikzpicture}
- \end{tkzexample}
+\subsubsection{Example of adding dimensions with option \tkzname{dim}}
+\begin{tkzexample}[vbox,small]
+\begin{tikzpicture}[scale=4]
+ \pgfkeys{/pgf/number format/.cd,fixed,precision=2}
+ % Define the first two points
+ \tkzDefPoint(0,0){A}
+ \tkzDefPoint(3,0){B}
+ \tkzDefPoint(1,1){C}
+ % Draw the triangle and the points
+ \tkzDrawPolygon(A,B,C)
+ \tkzDrawPoints(A,B,C)
+ % Label the sides
+ \tkzCalcLength[cm](A,B)\tkzGetLength{ABl}
+ \tkzCalcLength[cm](B,C)\tkzGetLength{BCl}
+ \tkzCalcLength[cm](A,C)\tkzGetLength{ACl}
+ % add dim
+ \tkzDrawSegment[dim={\pgfmathprintnumber\BCl,6pt,transform shape}](C,B)
+ \tkzDrawSegment[dim={\pgfmathprintnumber\ACl,6pt,transform shape}](A,C)
+ \tkzDrawSegment[dim={\pgfmathprintnumber\ABl,-6pt,transform shape}](A,B)
+\end{tikzpicture}
+\end{tkzexample}
-\bigskip
-If the options are the same we can plot several segments with the same macro.
-\newpage
\subsection{Drawing segments \tkzcname{tkzDrawSegments}}
- \hypertarget{tdss}{}
+If the options are the same we can plot several segments with the same macro.
- \begin{NewMacroBox}{tkzDrawSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}
-The arguments are a two-point couple list. The styles of \TIKZ are available for the plots
+\begin{NewMacroBox}{tkzDrawSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}%
+The arguments are a two-point couple list. The styles of \TIKZ\ are available for the plots.
\end{NewMacroBox}
\begin{tkzexample}[latex=6cm,small]
@@ -439,7 +492,7 @@ The arguments are a two-point couple list. The styles of \TIKZ are available for
mark=at position .5 with {\arrow[thick]{#1}}
}}}
\tkzDefPoint(0,0){A}
- \tkzDefPoint(4,0){B}
+ \tkzDefPoint(4,-4){B}
\tkzDrawSegments[arr=stealth](A,B)
\tkzDrawPoints(A,B)
\end{tikzpicture}
@@ -448,11 +501,11 @@ The arguments are a two-point couple list. The styles of \TIKZ are available for
\subsection{Mark a segment \tkzcname{tkzMarkSegment}}
\hypertarget{tms}{}
- \begin{NewMacroBox}{tkzMarkSegment}{\oarg{local options}\parg{pt1,pt2}}
+ \begin{NewMacroBox}{tkzMarkSegment}{\oarg{local options}\parg{pt1,pt2}}%
The macro allows you to place a mark on a segment.
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
options & default & definition \\
\midrule
@@ -467,34 +520,27 @@ Possible marks are those provided by \TIKZ, but other marks have been created ba
\end{NewMacroBox}
\subsubsection{Several marks }
-\begin{tkzexample}[latex=6cm,small]
+\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}
\tkzDefPoint(2,1){A}
\tkzDefPoint(6,4){B}
\tkzDrawSegment(A,B)
- \tkzMarkSegment[color=brown,size=2pt,
- pos=0.4, mark=z](A,B)
- \tkzMarkSegment[color=blue,
- pos=0.2, mark=oo](A,B)
- \tkzMarkSegment[pos=0.8,
- mark=s,color=red](A,B)
+ \tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B)
+ \tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B)
+ \tkzMarkSegment[pos=0.8,mark=s,color=red](A,B)
\end{tikzpicture}
\end{tkzexample}
\subsubsection{Use of \tkzname{mark}}
-\begin{tkzexample}[latex=6cm,small]
+\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}
\tkzDefPoint(2,1){A}
\tkzDefPoint(6,4){B}
\tkzDrawSegment(A,B)
- \tkzMarkSegment[color=gray,
- pos=0.2,mark=s|](A,B)
- \tkzMarkSegment[color=gray,
- pos=0.4,mark=s||](A,B)
- \tkzMarkSegment[color=brown,
- pos=0.6,mark=||](A,B)
- \tkzMarkSegment[color=red,
- pos=0.8,mark=|||](A,B)
+ \tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B)
+ \tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B)
+ \tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B)
+ \tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B)
\end{tikzpicture}
\end{tkzexample}
@@ -502,11 +548,11 @@ Possible marks are those provided by \TIKZ, but other marks have been created ba
\subsection{Marking segments \tkzcname{tkzMarkSegments}}
\hypertarget{tmss}{}
-\begin{NewMacroBox}{tkzMarkSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}
+\begin{NewMacroBox}{tkzMarkSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}%
Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for plots.
\end{NewMacroBox}
-\subsubsection{Marques pour un triangle isocèle}
+\subsubsection{Marks for an isosceles triangle}
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1]
\tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C}
@@ -518,8 +564,7 @@ Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ
\end{tkzexample}
\subsection{Another marking}
-
-\begin{tkzexample}[latex=7cm,small]
+\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}[scale=1]
\tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B}
\tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P}
@@ -538,30 +583,29 @@ Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ
\end{tikzpicture}
\end{tkzexample}
-\newpage
\hypertarget{tls}{}
- \begin{NewMacroBox}{tkzLabelSegment}{\oarg{local options}\parg{pt1,pt2}\marg{label}}
-This macro allows you to place a label along a segment or a line. The options are those of \TIKZ\ for example \tkzname{pos}
+\begin{NewMacroBox}{tkzLabelSegment}{\oarg{local options}\parg{pt1,pt2}\marg{label}}
+This macro allows you to place a label along a segment or a line. The options are those of \TIKZ\ for example \tkzname{pos}.
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%%
argument & example & definition \\
\midrule
\TAline{label}{\tkzcname{tkzLabelSegment(A,B)\{$5$\}}}{label text}
-\TAline{(pt1,pt2)}{(A,B)}{label along $[A,B]$}
+\TAline{(pt1,pt2)}{(A,B)}{label along $[AB]$}
\bottomrule
\end{tabular}
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
options & default & definition \\
\midrule
\TOline{pos}{.5}{label's position}
\end{tabular}
\end{NewMacroBox}
- \subsubsection{Labels multiples}
+\subsubsection{Multiple labels}
\begin{tkzexample}[latex=7 cm,small]
\begin{tikzpicture}
\tkzInit
@@ -574,7 +618,6 @@ options & default & definition \\
\end{tkzexample}
\subsubsection{Labels and right-angled triangle}
-
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[rotate=-60]
\tikzset{label seg style/.append style = {%
@@ -605,12 +648,11 @@ options & default & definition \\
\end{tkzexample}
\hypertarget{tlss}{}
- \begin{NewMacroBox}{tkzLabelSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}
+ \begin{NewMacroBox}{tkzLabelSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}%
The arguments are a two-point couple list. The styles of \TIKZ\ are available for plotting.
\end{NewMacroBox}
\subsubsection{Labels for an isosceles triangle}
-
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1]
\tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C}