Debian Codegraph @

texmf-dist/doc/latex/visualpstricks/Source/rep3.tex

raw
1
2
3
4
5 \psset{fillcolor=yellow,fillstyle=solid,linecolor=blue,unit=1cm}
6
7
8 %
9 %\begin{tabular}{ll}
10 % \BSS{psforeach} & \\
11 %\AC{variable} & \% nom de la variable \\
12 %\AC{liste des valeurs} & \% liste des valeurs de la variable\\
13 %\AC{action} & \% qui utilise les valeurs de la variable \\
14 %\end{tabular}
15 %
16 %\bigskip
17 %\emph{Exemple: liste de valeurs}
18
19 \begin{tabular}{|l|} \hline
20 %\begin{pspicture}[0,-.5](11,0.5)
21
22 \psforeach{\nA}{0, 1, 1.5, 3, 5,10}{\psdot[dotscale=2](\nA,0)}
23
24 %\end{pspicture}
25 \\
26 \\ \hline
27 \BSS{psforeach}\Rnode{A}{\AC{{\red \BS{nA}}}}\Rnode{B}{\AC{0, 1, 1.5, 3, 5,10}}\Rnode{C}{\AC{\BS{}psdot[dotscale=2]({\red \BS{nA}},0)}} \hspace{1cm}
28 \\
29 \\
30 \hspace{1cm} \Rnode{AA}{variable} \hspace{1cm} \Rnode{BB}{\TFRGB{liste des valeurs}{list of values}} \hspace{1cm} \Rnode{CC}{action}
31 \\ \hline
32 \end{tabular}
33 \ncline[linecolor=blue]{A}{AA} \ncline[linecolor=blue]{B}{BB} \ncline[linecolor=blue]{C}{CC}
34
35
36 %\begin{tabular}{ll}
37 %$\backslash$psforeach\AC{$\backslash$nA}\AC{0, 1, 1.5, 3, 5,10} & \% variable $\backslash$nA et ses 6 valeurs \\
38 %\AC{$\backslash$psdot[dotscale=2]($\backslash$nA,0)} & \% un point à chaque abscisse $\backslash$nA \\ \
39 %\end{tabular}
40 %
41 %\smallskip
42 %
43 %\psforeach{\nA}{0, 1, 1.5, 3, 5,10}{\psdot[dotscale=2](\nA,0)}
44
45 \bigskip
46
47 %\emph{Exemple: }
48
49 \begin{tabular}{|l|} \hline
50
51 \multicolumn{1}{|c|}{ \TFRGB{liste de valeurs avec pas régulier}{list of values at a regular step} } \\ \hline
52 \psforeach{\nA}{0, 1,..,10}{\psdot[dotscale=2](\nA,0)}
53 \\
54 \\ \hline
55 \hspace{1cm} \BS{psforeach}\AC{\BS{nA}}\AC{{\red 0, 1,..,10}}\AC{\BS{psdot}[dotscale=2](\BS{nA},0)} \hspace{1cm}
56 \\ \hline
57 \end{tabular}
58
59
60 %\begin{tabular}{ll}
61 %$\backslash$psforeach\AC{$\backslash$nA}\AC{0, 1 ,..,10} & \% variable $\backslash$nA de 0 à 10 par pas de 1 \\
62 %\AC{$\backslash$psdot[dotscale=2]($\backslash$nA,0)} & \% un point à chaque abscisse $\backslash$nA \\ \
63 %\end{tabular}
64 %
65 %\smallskip
66
67
68
69 \bigskip
70
71
72
73 \begin{tabular}{|l|} \hline
74
75 \multicolumn{1}{|c|}{ \TFRGB{utilisation du numéro d'index}{use of the index number} } \\ \hline
76
77 \psforeach{\nA}{0, 1, 1.5, 2.25, 5,10}{\rput(\nA,0){\the\psLoopIndex}}
78 \\
79 \\ \hline
80 \BS{psforeach}\AC{\BS{A}}\AC{0, 1, 1.5, 2.25, 5,10}\AC{\BS{rput}(\BS{nA},0)\AC{{\red\BS{the}\BS{psLoopIndex}}}}
81 \\ \hline
82 \end{tabular}
83
84 %$\backslash$psforeach\AC{$\backslash$nA}\AC{0, 1, 1.5, 2.25, 5,10}\AC{$\backslash$rput($\backslash$nA,0)\AC{$\backslash$the$\backslash$psLoopIndex}}
85 %\smallskip
86 %
87 %\psforeach{\nA}{0, 1, 1.5, 2.25, 5,10}{\rput(\nA,0){\the\psLoopIndex}}
88