%%macros pour imiter le style maple
%v 0.2
%2003-03-24

\usepackage{color}

%\newif\ifMapleColor
%\MapleColorfalse

\def\yes{yes}\def\no{no}

\def\incol{\color{red}}
\def\outcol{\color{blue}}

\def\UseMapleColor#1{%
\ifx#1\yes\gdef\incol{\color{red}}\gdef\outcol{\color{blue}}%
\else\edef\incol{}\edef\outcol{}%
\fi}

\newlength{\abovemapleskip}
\newlength{\belowmapleskip}
\abovemapleskip=.5\abovedisplayskip
\belowmapleskip=.0\belowdisplayskip

\newenvironment{maplelike}{%
\par%
\vskip\abovemapleskip%
\bgroup%
\parindent=0mm%
\parskip=0mm%
\abovedisplayskip=0mm%
\abovedisplayshortskip=0mm%
\belowdisplayskip=0mm%
\belowdisplayshortskip=0mm%
}{%
\vskip\belowmapleskip%
%\rule{0mm}{1mm}%
\egroup%
%\ignorespaces%
%\noindent
}

\newlength{\tmplgtha}
\newcommand{\mwsin}[1]{%
\par
\bgroup%
\incol
\hskip2mm{\footnotesize$>$}\hskip3mm%
\settowidth{\tmplgtha}{\hskip2mm{\footnotesize$>$}\hskip3mm}%
\tmplgtha=-\tmplgtha%
\advance\tmplgtha by\textwidth%
\begin{minipage}[t]{\tmplgtha}%
{\tt#1}%
%\begin{verbatim}
%#1
%\end{verbatim}
\end{minipage}%
\egroup%
\par%
}

\newcommand{\mwsout}[1]{%
\outcol#1%
}%

%\newcommand{\mwsout}[2][c]{%
%$$
%\begin{array}{#1}
%\outcol#2%
%\end{array}%
%$$%
%}%
\newlength{\mapleind}
\setlength{\mapleind}{2ex}
\newcommand{\mapleIndent}[1]{\hspace{#1\mapleind}}