\url{http://melusine.eu.org/syracuse/G/mp-scratch/}
\end{center}
et l'ensemble des fichiers sera à placer correctement dans une arborescence \TeX\footnote{Arborescence locale de préférence, par exemple dans {\sffamily /home/christophe/texmf/metapost/} sous Linux.}.
+\\Pour l'utilisation, il sera nécessaire de veiller :
+\begin{itemize}
+\item à installer, si ce n'est pas fait, la fonte {\sffamily Carlito}\footnote{\url{http://www.tug.dk/FontCatalogue/carlito/} pour un exemple. Le choix reste personnalisable évidemment mais Thierry Pasquier, à juste titre, m'a préconisé d'utiliser une fonte sans serif.};
+\item à modifier, dans le fichier {\sffamily LATEXScratch.mp}, la ligne
+\vspace{1em}
+\begin{center}
+ \lstinline! write "\graphicspath{{/home/cp/texmf/metapost/Scratch/}}" to "mptextmp.mp";!
+\end{center}
+\vspace{1em}
+pour indiquer le chemin correspondant à votre installation.
+\end{itemize}
\section{Utilisation}
\begin{figure}[h]
\centering
\vspace*{2em}\par
\item[Groupe {\sffamily Apparence}]\hfil\newline
\begin{itemize}
- \item[\textbullet]\lstinline!draw DireT("Hello",2);!
+ \item[\textbullet]\lstinline!draw DireT("\opSimple{Hello}",2);!
\par\hfill\includegraphics{CommandeApparence.1}
- \item[\textbullet]\lstinline!draw Dire("Hello");!
+ \item[\textbullet]\lstinline!draw Dire("\opSimple{Hello}");!
\par\hfill\includegraphics{CommandeApparence.2}
- \item[\textbullet]\lstinline!draw PenserT("Hmm...",2);!
+ \item[\textbullet]\lstinline!draw PenserT("\opSimple{Hmm...}",2);!
\par\hfill\includegraphics{CommandeApparence.3}
- \item[\textbullet]\lstinline!draw Penser("Hmm...");!
+ \item[\textbullet]\lstinline!draw Penser("\opSimple{Hmm...}");!
\par\hfill\includegraphics{CommandeApparence.4}
\item[\textbullet]\lstinline!draw Montrer;!
\par\hfill\includegraphics{CommandeApparence.5}
\item[\textbullet]\lstinline!draw Cacher;!
\par\hfill\includegraphics{CommandeApparence.6}
- \item[\textbullet]\lstinline!draw Basculer("\opAp{costume2}");!
+ \item[\textbullet]\lstinline!draw Basculer("\opApMenu{costume2}");!
\par\hfill\includegraphics{CommandeApparence.7}
\item[\textbullet]\lstinline!draw CostumeSuivant;!
\par\hfill\includegraphics{CommandeApparence.8}
- \item[\textbullet]\lstinline!draw BasculerAR("\opAp{arriere-plan2}");!
+ \item[\textbullet]\lstinline!draw BasculerAR("\opApMenu{arriere-plan2}");!
\par\hfill\includegraphics{CommandeApparence.9}
- \item[\textbullet]\lstinline!draw AjouterEffet("\opAp{couleur}",10);!
+ \item[\textbullet]\lstinline!draw AjouterEffet("\opApMenu{couleur}",10);!
\par\hfill\includegraphics{CommandeApparence.10}
- \item[\textbullet]\lstinline!draw MettreEffet("\opAp{couleur}",10);!
+ \item[\textbullet]\lstinline!draw MettreEffet("\opApMenu{couleur}",10);!
\par\hfill\includegraphics{CommandeApparence.11}
\item[\textbullet]\lstinline!draw AnnulerEffet;!
\par\hfill\includegraphics{CommandeApparence.12}
\item[\textbullet]\lstinline!draw DeplacerAP("\opOp{$\opMouv{abscisse x}\bm{+}\opSimple{10}$}");!
\par\hfill\includegraphics{CommandeApparence.16}
\end{itemize}
+\vspace{1em}\par Quand \og la scène\fg\ est sélectionnée, on dispose également des commandes :
+ \begin{itemize}
+ \item[\textbullet]\lstinline!draw BasculerARA("\opApMenu{arriere-plan2}");!
+ \par\hfill\includegraphics{CommandeApparence.20}
+ \item [\textbullet]\lstinline!draw ARSuivant;!
+ \par\hfill\includegraphics{CommandeApparence.21}
+ \end{itemize}
\par\vspace*{2em}\par Les \og opérateurs\fg\
-\[\includegraphics{CommandeApparence.17}\kern0.1\linewidth\includegraphics{CommandeApparence.18}\kern0.1\linewidth\includegraphics{CommandeApparence.19}\]
+\[\includegraphics{CommandeApparence.17}\kern0.1\linewidth\includegraphics{CommandeApparence.18}\kern0.1\linewidth\includegraphics{CommandeApparence.19}\kern0.1\linewidth\includegraphics{CommandeApparence.22}\]
s'obtiennent avec la commande \LaTeX\ \lstinline!\opAp{}!.
- %\par\vspace*{2em}\par
+ \par\vspace*{2em}\par
\item[Groupe {\sffamily Son}]\hfil\newline
\begin{itemize}
\item[\textbullet]\lstinline!draw Jouer("miaou");!
\end{minipage}
\end{center}
s'obtiennent par les commandes \LaTeX\ \lstinline!\opVar{}!, \lstinline!\opList{}! et \lstinline!\opSousList{}!.
+\vspace{0.5em}
+\begin{center}
+ \includegraphics{CommandeVariable.15}
+% \begin{minipage}{0.6\linewidth}
+ \begin{lstlisting}[frame=tb]
+label(LATEX("\opList{\opSousList{Pythagore}
+ contient \opSimple{(3;4;5)} ?}"),(0,0));
+ \end{lstlisting}
+% \end{minipage}
+\end{center}
\par\vspace*{2em}\par
\item[Groupe {\sffamily \'Evènement}]\hfil\newline
\begin{itemize}
\item[\textbullet]\lstinline!draw EnvoyerMessageA("message1");!
\par\hfill\includegraphics{CommandeEvenements.8}
\end{itemize}
+\vspace{1em}\par
+Quand \og la scène\fg\ est sélectionnée, on dispose de :
+\begin{itemize}
+ \item[\textbullet]\lstinline!draw QScenePressee;!
+ \par\hfill\includegraphics{CommandeEvenements.9}\footnote{C'est le seul endroit où il y a une majuscule dans les notations {\sffamily Scratch}\ldots}
+\end{itemize}
\vspace*{2em}\par
\item[Groupe {\sffamily Contrôle}]\hfil\newline
\begin{itemize}
\par\hfill\includegraphics{CommandeControle.6}
\item[\textbullet]\lstinline!draw Stop("ce script");!
\par\hfill\includegraphics{CommandeControle.8}
+\newpage
\item[\textbullet]\lstinline!draw CommencerClone;!
\par\hfill\includegraphics{CommandeControle.9}
\item[\textbullet]\lstinline!draw CreerClone("Lutin1");!
\end{center}
s'obtiennent par les commandes \LaTeX\ \lstinline!\opCap{}! et \lstinline!\opCapCap{}!.
Néanmoins, il faut parfois un codage conséquent. Par exemple, voici un capteur et son code.
-\par\begin{minipage}{0.3\linewidth}
+\par\vspace{1em}\par\begin{minipage}{0.3\linewidth}
\includegraphics{CommandeCapteurs.7}
\end{minipage}
\hfill
\end{minipage}
\end{center}
s'obtiennent par les commandes \LaTeX\ \lstinline!\opOp{}! et \lstinline!\opSousOp{}!.
+\\Afin de rapprocher le package des conventions d'écriture des opérations, le choix du $\times$ à la place de * s'est imposé. Néanmoins, cela peut être discuté et modifié\ldots
\vspace*{2em}\par
\item[Groupe {\sffamily Ajouter blocs}]\hfil\newline
\begin{itemize}
\end{figure}
\end{description}
Terminons cette liste de commandes par un algorithme associé à la suite de Syracuse :)
-\[\includegraphics[scale=0.8]{Syracuse.1}\]
+\[\includegraphics[scale=0.9]{Syracuse.1}\]
\begin{filecontents*}{Syracuse.txt}
beginfig(1);
draw Drapeau;
\newpage
\section{Historique}
\begin{description}
+\item[17/02/2017] {\bfseries Version 0.61} - Ajout des commandes correspondantes à la sélection de \og la scène\fg. Mise à jour de la documentation.
+\item[16/02/2017] {\bfseries Version 0.59} - Correction des commandes {\sffamily Dire}, {\sffamily DireT}, {\sffamily Penser}, {\sffamily PenserT}. Mise à jour de la documentation (informations sur l'installation du package).
\item[15/02/2017] {\bfseries Version 0.57} - Correction de problèmes mineurs d'affichage. Correction de la documentation.
\item[14/02/2017] {\bfseries Version 0.55} - Mise à jour de la documentation.
\item[13/02/2017] {\bfseries Version 0.53} - Ajout des chanfreins sur les blocs. Correction de \og doublons\fg\ de commandes. Mise à jour de la documentation.