summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex154
1 files changed, 154 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex b/Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex
new file mode 100644
index 00000000000..8b7fb13c484
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tkz-base/latex/TKZdoc-base-texte.tex
@@ -0,0 +1,154 @@
+\section{Textes et Légendes}
+
+\subsection{Placer un titre}
+On peut bien sûr utiliser \TIKZ, mais la macro que je propose permet de placer le texte en utilisant les unités choisies pour le dessin.
+
+\emph{les options sont toujours celles de \TIKZ, en particulier les suivantes~:}
+\begin{NewMacroBox}{tkzText}{\oarg{local options}\parg{point}\var{text}}
+Le point peut soit être donné par ses coordonnées, soit par son nom.
+\hypertarget{text}{}
+
+\begin{tabular}{lll}
+\toprule
+options & défaut & définition\\
+\midrule
+\TOline{color }{|black|}{couleur courante}
+\TOline{text }{|black|}{couleur du texte}
+\TOline{fill }{|white|}{couleur du fond}
+\TOline{opacity }{|1| }{opacité}
+\end{tabular}
+\end{NewMacroBox}
+
+\subsubsection{Un titre}
+
+\begin{tkzexample}[latex=8cm]
+\begin{tikzpicture}
+ \tkzInit[xmax = 6, ymin = 1000,%
+ ymax = 4000,ystep = 1000]
+ \tkzAxeXY
+ \tkzText[draw,
+ line width = 1pt,%
+ color = red,%
+ fill = orange!20](3,4000)%
+ {Recette en fonction du mois}
+\end{tikzpicture}
+\end{tkzexample}
+
+\subsubsection{Draft}
+
+\begin{tkzexample}[latex=8cm]
+\begin{tikzpicture}
+ \tkzInit[xmax = 6, ymin = 1000,%
+ ymax = 4000,ystep = 1000]
+ \tkzGrid \tkzAxeXY
+ \tkzText[draw,opacity=.2,
+ rotate=45,inner sep=.6 cm,
+ line width = 1pt,
+ color = black,
+ fill = purple!20](3,2500)
+ {\Huge DRAFT}
+\end{tikzpicture}
+\end{tkzexample}
+
+\subsubsection{Texte avec un point}
+Il est possible de donner la référence d'un point à la place de ses coordonnées.
+
+\begin{tkzexample}[latex=8cm]
+\begin{tikzpicture}
+ \tkzInit[ymax=5,xmax=6]
+ \tkzAxeXY
+ \tkzDefPoint(3,3){A}
+ \tkzText[draw,opacity=.6,
+ inner sep=.6 cm,
+ line width = 1pt,
+ color = black,
+ fill = purple!20](A)
+ {Mon texte}
+\end{tikzpicture}
+\end{tkzexample}
+
+\subsubsection{Format du texte}
+ L'option \tkzname{text width} est intéressante, voir le pgfmanual pour plus d'informations.
+\begin{tkzexample}[latex=8cm,small]
+\begin{tikzpicture}
+ \tkzInit[ymax=5,xmax=6]
+ \tkzAxeXY
+ \tkzText[draw,opacity=.6,
+ inner sep=.6 cm,
+ line width = 1pt,
+ color = black,
+ fill = purple!20,
+ text width=3cm](3,3)
+ {Mon texte\\ Référence}
+\end{tikzpicture}
+\end{tkzexample}
+
+\subsection{Placer des légendes}
+Il y a deux façons d'utiliser cette macro. Soit on place des légendes pour des courbes. Alors, il faut représenter des lignes avec leur style propre, soit il s'agit de différencier des symboles (mark).
+
+\begin{NewMacroBox}{tkzLegend}{\oarg{local options}\var{mark/couleur/size/text}}\hypertarget{legend}{}
+Les arguments diffèrent en fonction du booléen \tkzname{line}.
+
+\medskip
+\begin{tabular}{lll}
+\toprule
+options & défaut & définition\\
+\midrule
+\TOline{line}{false}{booléen :ligne ou symbole}
+\end{tabular}
+
+Avec |line=true|
+
+\begin{tabular}{lll}
+\toprule
+arguments & défaut & exemple\\
+\midrule
+\TAline{style/line width/couleur/texte}{pas de défaut}{dashed/1pt/red/Recette}
+\end{tabular}
+
+\medskip
+Avec |line=false|
+
+\begin{tabular}{lll}
+\toprule
+arguments & défaut & exemple\\
+\midrule
+\TAline{mark/mark size/couleur/texte}{pas de défaut}{heart/1ex/red!30/Recette produit A}
+\end{tabular}
+
+\medskip
+{On peut modifier la longueur de la ligne dans \tkzname{tkz-base.cfg}}
+\begin{tkzltxexample}[]
+ \def\tkz@legend@line@len{.5cm}
+\end{tkzltxexample}
+\end{NewMacroBox}
+
+\subsubsection{Légendes avec des symboles}
+
+\begin{tkzexample}[vbox]
+ \begin{tikzpicture}
+\tkzInit[xmax=12,ymin=1000,ymax=11000,ystep=2000]
+\tkzGrid[color=orange!30]
+\tkzDrawX[below right,label=Mois]
+\tkzDrawY[above left,label=Recette]
+\tkzLabelX
+\tkzLabelY
+\tkzDefSetOfPoints{1/2000,2/3000,3/2000,4/2500,5/4200,6/4800,7/4600,
+ 8/5200,9/6200,10/7000,11/7400,12/10000}
+\tkzDefSetOfPoints[prefix=P]{1/3200,2/4100,3/3300,4/3300,5/5000,6/5500,7/5200,8/4000,
+ 9/3000,10/6000,11/8400,12/9000}
+\tkzSetUpMark[mark=heart,color=black,fill=red!30,size=4pt]
+\tkzJoinSetOfPoints[thick,color=brown,double]
+\tkzDrawSetOfPoints
+\tkzJoinSetOfPoints[prefix=P,thick,color=orange,double]
+\tkzDrawSetOfPoints[prefix=P,mark=square*,mark size=4pt,
+ mark options={color=blue,fill=blue!40}]
+\tkzLegend[draw,rounded corners,fill=orange!20,text=brown,
+ line width=2pt](5,10000){heart/1ex/red!30/Recette produit A,%
+ square*/0.75ex/blue!40/Recette produit B}
+\end{tikzpicture}
+\end{tkzexample}
+
+
+
+\endinput