redefinition des environnements theoreme, remarque,...

This commit is contained in:
Jeff Lance 2016-04-05 16:52:16 +02:00
parent b9772a4f78
commit 763b5d6c89

View File

@ -78,54 +78,75 @@
% blocks % blocks
\newenvironment<>{déf}[1][]{%begin \newenvironment<>{déf}[1][]{%begin
\setbeamercolor{block title}{fg=crimson,bg=pink!95!white}% \setbeamercolor{block title}{fg=crimson,bg=pink!95!white}%
\begin{block}{Définition}{#1}}{\end{block} \begin{block}{Définition}{#1}
}{%end
\end{block}
} }
% %
\newenvironment<>{thm}[1][]{%begin \NewDocumentEnvironment{thm}{ G{Théorème} }{%begin
\setbeamercolor{block title}{fg=white,bg=cerisepink!95!white}% \setbeamercolor{block title}{fg=white,bg=cerisepink!95!white}
\begin{block}{Théorème}{#1}}{\end{block} \begin{block} {#1}
}{%end
\end{block}
} }
% %
\newenvironment<>{rmq}[1][]{%begin \newenvironment<>{pre}[1][]{%begin
\setbeamercolor{block title}{fg=white,bg=airforceblue!75!black}%
\begin{block}{Preuve}{#1}
}{%end
\end{block}
}
%
\NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin
\setbeamercolor{block title}{fg=white,bg=red!75!black}% \setbeamercolor{block title}{fg=white,bg=red!75!black}%
\begin{block}#1}{\end{block} \begin{block}{#1}
}{%end
\end{block}
} }
% %
\newenvironment<>{exp}[1][]{%begin \newenvironment<>{exp}[1][]{%begin
\setbeamercolor{block title}{fg=white,bg=green!75!black}% \setbeamercolor{block title}{fg=white,bg=green!75!black}%
\begin{block}#1}{\end{block} \begin{block}#1
}{%end
\end{block}
} }
% %
\newcounter{exercicecounter} \newcounter{exercicecounter}
\newenvironment<>{exo}[1][]{%begin \newenvironment<>{exo}[1][]{%begin
\setbeamercolor{block title}{fg=white,bg=blue!75!black}% \setbeamercolor{block title}{fg=white,bg=blue!75!black}%
\ifthenelse{ \equal{#1}{i} } \IfNoValueTF{ #1 }{
{ \ifthenelse{ \equal{#1}{i} }
\def\cType{\roman}
}
{
\ifthenelse{ \equal{#1}{I} }
{ {
\def\cType{\Roman} \def\cType{\roman}
} }
{ {
\ifthenelse{ \equal{#1}{a} } \ifthenelse{ \equal{#1}{I} }
{ {
\def\cType{\alph} \def\cType{\Roman}
} }
{ {
\ifthenelse{ \equal{#1}{A} } \ifthenelse{ \equal{#1}{a} }
{ {
\def\cType{\Alph} \def\cType{\alph}
} }
{ {
\def\cType{\arabic} \ifthenelse{ \equal{#1}{A} }
{
\def\cType{\Alph}
}
{
\def\cType{\arabic}
}
} }
} }
} }
} \stepcounter{exercicecounter}
\stepcounter{exercicecounter} \begin{block}{Exercice \cType{exercicecounter}\ }
\begin{block}{Exercice \cType{exercicecounter}\ }}{\end{block} }{
\begin{block}{Exercice\ }
}
}{%end
\end{block}
} }