summaryrefslogtreecommitdiff
path: root/info/visualtikz/Source/tkzcde.tex
blob: f241d266a43f41bde1a75a98699633ecf7db2487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


\maboite{ \TFRGB{Atention : la création de la commande doit être placée avant}{Warning: the creation of the command must be placed before} \BS{begin}\AC{document} ! }

\TFRGB{syntaxe :\BSS{newcommand}\AC{\BS{}nom}[nombre de variables]\AC{Description}}{syntax :\BSS{newcommand}\AC{\BS{}name}[
number of variables]\AC{Description}}
\bigskip


\textbf{\TFRGB{Exemple : commande avec une variable}{Example : command with one variable} :}

 \emph{\TFRGB{Création}{Creation}}


\begin{tabular}{ll}
\BS{newcommand} 	& \\ 
\AC{\BS{}maboite}[1]{\color{red} \{	}	 					& \% \TFRGB{commande nommée maboite et 1 seul d'argument}{command   named \og maboite \fg with one variable } \\ 
\BS{begin}\AC{center}								& \% \TFRGB{centrage sur la ligne}{centering the box  } \\ 
\BS{tikzpicture} \BS{node}[fill=yellow				& \% \TFRGB{un n\oe ud de texte de couleur jaune}{a yellow text box} \\ 
,text centered										& \% \TFRGB{centrage du texte dans la boite}{centering the text in the box} \\ 
,text width=.5\BS{linewidth}] 							& \% \TFRGB{largeur : la moitié de la ligne}{ to set the width of the box} \\ 
\#1\} ; \BS{end}\AC{center}				& \%  \TFRGB{\#1 correspond à l'argument}{\#1 will be replaced by the variable} \\ 
{\color{red} \}	} 		&  \\  
\end{tabular} 	

\bigskip
\emph{Utilisation} : \BS{maboite}\AC{contenu}

\maboite{contenu}


\bigskip
\label{DFR}

\textbf{\TFRGB{Exemple : commande sans variable}{Example : command without variable} :}
 
 \emph{\TFRGB{Création}{ creation}}
 
\BS{newcommand}\AC{\BS{DFR}}\AC{ \BS{tikzpicture}[scale=.25]
 \BS{draw} [fill=blue](0,0) rectangle (3,1.5);
\BS{draw} [fill=white](1,0) rectangle (2,1.5);
\BS{draw}[fill=red](2,0) rectangle (3,1.5);\BS{endtikzpicture} }
 

\emph{Utilisation}  :  \BS{DFR} \DFR