File: tkzstyl.tex

package info (click to toggle)
texlive-lang 2016.20170123-5
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,093,148 kB
  • ctags: 15,901
  • sloc: perl: 46,074; xml: 29,603; makefile: 5,248; sh: 3,179; python: 2,949; ansic: 2,846; ruby: 945; lisp: 726; awk: 636; java: 159; sed: 142; cpp: 12
file content (59 lines) | stat: -rw-r--r-- 1,841 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%\subsection{Style sans variable}
\SbSSCT{Styles sans variable}{Styles without variable}

\begin{tabular}{|c|c|} \hline  
\begin{tikzpicture}[mon style/.style={draw=blue,fill=red!20,very thick},baseline=0pt]
\draw (0,0) circle (2cm);
\draw[mon style] (0,0) circle (1cm);
\end{tikzpicture}
&  
\parbox{10cm}{ 
\BS{begin}\AC{tikzpicture} [mon style\RDD{/.style}=\AC{draw=blue, fill=red!20, very thick}]\\
\BS{draw} (0,0) circle (2cm); \\
\BS{draw}[mon style] (0,0) circle (1cm); \\
\BS{end}\AC{tikzpicture} \\ } 
\\ \hline 
\end{tabular} 



%\subsection{Style à variable}
\SbSSCT{Styles avec variable}{Styles with variable}

\begin{tabular}{|c|c|} \hline  
\begin{tikzpicture}[mon style/.style={draw=#1,thick,fill=#1!50,scale=.5}]
\filldraw [mon style=red] (0,0) rectangle (2,1);
\filldraw [mon style=blue] (3,0) rectangle (5,1);
\end{tikzpicture}
&  
\parbox{12cm}{ 
\BS{begin}\AC{tikzpicture} [mon style/\RDD{.style}=\AC{draw={\color{red}  \#1}, thick, fill={\color{red}  \#1}!50, scale=.5}]\\
\BS{filldraw} [mon style=red] (0,0) rectangle (2,1);\\
\BS{filldraw} [mon style=blue] (3,0) rectangle (5,1);\\
\BS{end}\AC{tikzpicture} \\ 
} 
\\ \hline   

\end{tabular} 




\begin{tabular}{|c|c|} \hline 
 \multicolumn{2}{|c|}{\TFRGB{valeur par défaut}{With a default value }}
 \\ \hline
\begin{tikzpicture}[mon style/.style={draw=#1,thick,fill=#1!50,scale=.5},
mon style/.default=black]
\filldraw [mon style] (0,0) rectangle (2,1);
\filldraw [mon style=blue] (3,0) rectangle (5,1);
\end{tikzpicture}
&  
\parbox{12cm}{ 
\BS{begin}\AC{tikzpicture} [mon style/\RDD{.style}=\AC{draw={\color{red}  \#1},fill={\color{red}  \#1}!20,very thick},\\
mon style/\RDD{.default}=black] \\
\BS{filldraw} [mon style] (0,0) rectangle (2,1);\\
\BS{filldraw} [mon style=blue] (3,0) rectangle (5,1);\\
\BS{end}\AC{tikzpicture} }  
\\ \hline   

\end{tabular}