From a1c8564d103b24937d0727ce8d46456b64b74c98 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Wed, 1 Jun 2016 13:25:43 +0200 Subject: [PATCH] =?UTF-8?q?modification=20of=20"d=C3=A9f"=20and=20"pre"=20?= =?UTF-8?q?environments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cours/cours_beamer.cls | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/cours/cours_beamer.cls b/cours/cours_beamer.cls index f730723..93feaf7 100644 --- a/cours/cours_beamer.cls +++ b/cours/cours_beamer.cls @@ -186,12 +186,22 @@ % blocks % definition de divers blocks personnels : definition, theoreme, exemple, % exercice (avec numerotation), remarque, methode. -\NewDocumentEnvironment{déf}{ g }{%begin +\NewDocumentEnvironment{déf}{ s g }{%begin \setbeamercolor{block title}{fg=white,bg=amethyst!95!white} - \IfNoValueTF {#1} { - \begin{block} {Définition} - }{ - \begin{block} {Définition - #1} + \IfBooleanTF #1 + { + \IfNoValueTF {#2} { + \begin{block} {} + }{ + \begin{block} {#2} + } + } + { + \IfNoValueTF {#2} { + \begin{block} {Définition} + }{ + \begin{block} {Définition - #2} + } } }{%end \end{block} @@ -219,13 +229,24 @@ \end{block} } % -\newenvironment<>{pre}[1][]{%begin - \setbeamercolor{block title}{fg=white,bg=airforceblue!75!black}% - \begin{block}{Preuve}{#1} +\NewDocumentEnvironment{pre}{ g }{%begin + \setbeamercolor{block title}{fg=white,bg=airforceblue!75!white} + \IfNoValueTF {#1} { + \begin{block} {Preuve} + }{ + \begin{block} {#1} + } }{%end \end{block} } % +% \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}% \begin{block} {#1}