% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % %                                                                                                   % % %
\section{About the theatre.sty extension}%                                                              % % %
% % %                                                                                                   % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%
\subsection{Purpose}%

The point of this extension is to insert dialogues in a text while being able to customize the printout for each actor.

To do so, the roles must be defined and saved in a separated file. Each role is parametrized by its name, its printout color and two font sizes (one for short-range reading and one for long-range reading).

The lines can then be written in an environment named \textit{theatre}. These lines are automatically numbered in order to ease the reading as several layouts can be generated according to the demands of readers.

\bigskip{}

\subsection{Commands}
This extension provides one can create as many roles as necessary, by using the command \chicom{TheatreCreerUnRole}.
Two other commands are available. One adds comments, the other describes motions.

\subsubsection{Preparing the roles}
The roles are created in a separated file. This is done using the \chicom{chicreerunrole} command and the following arguments:

\begin{chicitecommandelarge}
\TheatreCreerUnRole{nomcourt}{nomlong}{petit}{grand}{couleur}
\end{chicitecommandelarge}
%\begin{chicitecommande}\chicom[nomcourt\}\{nomlong\}\{petit\}\{grand\}\{couleur]{chicreerunrole}\end{chicitecommande}

\begin{enumerate}
  \item \chivar{nomcourt} is used to generate the name of the macro of this role. This name is composed of a \emph{\textbf{r}}, two others letters and finally the \textbf{nomcourt}. The \emph{\textbf{r}} refers to \textit{répliques}, which is the french word for \textit{line}. The two other letters depend on the size of the text:
  
    \begin{itemize}
      \item pt for a small font size -> the macro name is then \chicom{rptnomcourt},
      \item gd for a large font size -> the macro name is then \chicom{rgdnomcourt}.
    \end{itemize}
  \item \chivar{nomlong} is printed above each line.   
  \item \chivar{petit} and \chivar{grand} define the text size for both created macro. These sizes must be either large (large, Large, LARGE, huge or HUGE), standard (normalsize) or small (small, footnotesize, scriptsize or tiny).
  \item \chivar{color} allows to customize a role with a color. It can be black, white, red, green, blue, cyan, magenta or yellow. Dedicated packages can provide a larger choice.
\end{enumerate}

\medskip{}

Two variables respectively define two other sizes.
\begin{itemize}
\item \chivar{chitaillerolecpte} defines the size of the counter printed before the line. Default value: small.
\item \chivar{chitaillenomrole} defines the size of the role name printed above the line. Default value: small.
\end{itemize}

\medskip{}

Two lengths can be redefined with the command \chicom[nom\}\{1ex]{setlength}. The length unit must be specified!

\begin{itemize}
\item \chivar{chientrenometreplique}  increases the space between the name and the line.%
\item \chivar{chiecarterlesrepliques} increases the space between each line.%
\end{itemize}
%-------------------------------------
\subsubsection{Using the roles}
The commands of \textit{theatre} allow to write a comment on the name line of the role. This comment is optional, so it will be written between \og{}[\,]\fg{}.

\bigskip{}

\begin{center}
\begin{minipage}[h]{0.9\textwidth}
\def\TheatreEcarterRepliques{3mm}
\begin{SideBySideExample}[gobble=0,fontfamily=lmss,fontseries=b,fontsize=\footnotesize,xrightmargin=0.5\textwidth,baselinestretch=2]
\CommandeEcrite
\begin{theatre}
\rptflore[\emph{commentaire}]{Quittez,\dots}
\rptclimdaph{Berger,\dots}
\rgdtirdor{Mais\dots}
\end{theatre}
\end{SideBySideExample}
\end{minipage}
\end{center}

\bigskip{}

The only challenge is to remember the name given to each role.


%---------------
\subsubsection{\chicom{TheatreMvt} : to describe the motions.}
\begin{itemize}
\item \chivar{TheatreMvtHt} defines the text height,
\item \chivar{TheatreMvtCouleur} fixes its color.
\end{itemize}

\bigskip{}

\begin{center}
\begin{minipage}[h]{0.9\textwidth}
\begin{SideBySideExample}[gobble=0,fontfamily=lmss,fontseries=b,fontsize=\footnotesize,xrightmargin=0.5\textwidth,baselinestretch=2]
\CommandeEcrite

\TheatreMvt[commentaire]{Le texte\dots}

\TheatreMvt{Le texte\dots}
\end{SideBySideExample}
\end{minipage}
\end{center}

\bigskip{}

%----------------------------
\subsubsection{\chicom{TheatreComment} : to add comments in the text}
\begin{itemize}
\item \chivar{TheatreCommentHt} defines the text height,
\item \chivar{TheatreCommentCouleur} fixes its color.
\end{itemize}

\bigskip{}

\begin{center}
\begin{minipage}[h]{0.9\textwidth}
\begin{SideBySideExample}[gobble=0,fontfamily=lmss,fontseries=b,fontsize=\footnotesize,xrightmargin=0.5\textwidth,baselinestretch=2]
\CommandeEcrite

\TheatreComment[commentaire]{Le texte\dots}

\TheatreComment{Le texte\dots}
\end{SideBySideExample}
\end{minipage}
\end{center}
