From 0ff072f78e66a1d2d260cfdb99fb0d50e10dbffd Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Sun, 15 Oct 2017 20:54:31 +0200 Subject: [PATCH] =?UTF-8?q?-=20Correct=20global=20counter=20of=20slides=20?= =?UTF-8?q?and=20Add=20env.=20with=20icons=20for=20d=C3=A9f,=20ppt=20and?= =?UTF-8?q?=20thm.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cours/cours_beamer.cls | 69 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/cours/cours_beamer.cls b/cours/cours_beamer.cls index d16e82e..48f519a 100644 --- a/cours/cours_beamer.cls +++ b/cours/cours_beamer.cls @@ -215,9 +215,11 @@ % \debut et \fin % renvoie les slides d'intro et de cloture du document \newcommand{\debut}{% - \begin{frame} - \titlepage - \end{frame} + \begin{frame}[plain] + \titlepage + \end{frame} + \addtocounter{framenumber}{-1} + } \newcommand{\fin}{% @@ -312,6 +314,28 @@ \end{block} } +% défn(*)(TITRE) +\NewDocumentEnvironment{défn}{ s g }{%begin + \setbeamercolor*{block title}{parent=definition} +% \setbeamercolorofitem{definition} + \IfBooleanTF #1 + { + \IfNoValueTF {#2} { + \begin{block} {\faPencil \hspace{.125em}\ } + }{ + \begin{block} {\faPencil \hspace{.125em}\ #2} + } + }{ + \IfNoValueTF {#2} { + \begin{block} {\faPencil \hspace{.125em}\ Définition} + }{ + \begin{block} {\faPencil \hspace{.125em}\ Définition - #2} + } + } +}{%end + \end{block} +} + % thm(TITRE) \NewDocumentEnvironment{thm}{ g }{%begin \setbeamercolor*{block title}{parent=theorem} @@ -325,6 +349,19 @@ \end{block} } +% thmn(TITRE) +\NewDocumentEnvironment{thmn}{ g }{%begin + \setbeamercolor*{block title}{parent=theorem} +% \setbeamercolorofitem{theorem} + \IfNoValueTF {#1} { + \begin{block} {\faPencil \hspace{.125em}\ Théorème} + }{ + \begin{block} {\faPencil \hspace{.125em}\ Théorème - #1} + } +}{%end + \end{block} +} + % ppt(*)(TITRE) \NewDocumentEnvironment{ppt}{ s g }{%begin \setbeamercolor*{block title}{parent=property} @@ -347,6 +384,28 @@ \end{block} } +% pptn(*)(TITRE) +\NewDocumentEnvironment{pptn}{ s g }{%begin + \setbeamercolor*{block title}{parent=property} +% \setbeamercolorofitem{property} + \IfBooleanTF #1 + { + \IfNoValueTF {#2} { + \begin{block} {\faPencil \hspace{.125em}\ } + }{ + \begin{block} {\faPencil \hspace{.125em}\ #2} + } + }{ + \IfNoValueTF {#2} { + \begin{block} {\faPencil \hspace{.125em}\ Propriété} + }{ + \begin{block} {\faPencil \hspace{.125em}\ Propriété - #2} + } + } +}{%end + \end{block} +} + % pre(TITRE) \NewDocumentEnvironment{pre}{ g }{%begin \setbeamercolor*{block title}{parent=proof} @@ -469,8 +528,8 @@ } } } - } - \stepcounter{exercicecounter} + } + \stepcounter{exercicecounter} \begin{block}{#2 \cType{exercicecounter}\ } }{ \begin{block}{#2\ }