| 1 |
%\section{Syntaxe} |
| 2 |
|
| 3 |
\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} ! } |
| 4 |
|
| 5 |
\TFRGB{syntaxe :\BSS{newcommand}\AC{\BS{}nom}[nombre de variables]\AC{Description}}{syntax :\BSS{newcommand}\AC{\BS{}name}[ |
| 6 |
number of variables]\AC{Description}} |
| 7 |
\bigskip |
| 8 |
|
| 9 |
|
| 10 |
\textbf{\TFRGB{Exemple : commande avec une variable}{Example : command with one variable} :} |
| 11 |
|
| 12 |
\emph{\TFRGB{Création}{Creation}} |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
\begin{tabular}{ll} |
| 17 |
\BS{newcommand} & \\ %\% début de la nouvelle commande \\ |
| 18 |
\AC{\BS{}maboite}[1]{\red\{ } & \% \TFRGB{commande nommée ma boite et 1 seul d'argument}{command named \og maboite \fg with one variable } \\ |
| 19 |
\BS{}begin\AC{center} & \% \TFRGB{centrage sur la ligne}{centering the box } \\ |
| 20 |
\BS{}psframebox[fillcolor=yellow,fillstyle=solid]{\magenta\{} & \% \TFRGB{une boite de texte de couleur jaune}{a yellow text box} \\ |
| 21 |
\BS{}parbox\{ .5\BS{}linewidth \} & \% \TFRGB{parbox pour limiter la largeur de la boite}{use of \BS{parbox} to set the width of the box} \\ |
| 22 |
\{\BS{}centering & \% \TFRGB{centrage du texte dans la boite}{centering the text in the box} \\ |
| 23 |
\#1\} {\magenta\}}\BS{}end\AC{center} & \% \TFRGB{\#1 correspond à l'argument}{\#1 will be replaced by the variable} \\ |
| 24 |
{\red\} } & \\ %\% fin de la nouvelle commande \\ |
| 25 |
\end{tabular} |
| 26 |
|
| 27 |
\bigskip |
| 28 |
\emph{Utilisation} : \BS{maboite}\AC{contenu} |
| 29 |
|
| 30 |
\maboite{contenu} |
| 31 |
|
| 32 |
|
| 33 |
\bigskip |
| 34 |
\textbf{\TFRGB{Exemple : commande sans variable}{Example : command without variable} :} |
| 35 |
|
| 36 |
\emph{\TFRGB{Création}{ creation}} |
| 37 |
|
| 38 |
\BS{}newcommand\AC{\BS{}DFR}{\BS{}psset\AC{unit=.25cm,fillstyle=solid,linewidth=0pt} \BS{}begin\AC{pspicture*}(3,1.5) \BS{}psframe[fillcolor=blue](1,1.5) |
| 39 |
\BS{}psframe[fillcolor=white](1,0)(2,1.5)\BS{}psframe[fillcolor=red](2,0)(3,1.5) |
| 40 |
\BS{}end\AC{pspicture*} |
| 41 |
|
| 42 |
|
| 43 |
\emph{Utilisation} : \BS{DFR} \DFR |