Set colors of blocks and item under it.

This commit is contained in:
Jeff Lance 2017-08-25 16:58:11 +02:00
parent b9d81f6d1a
commit 9ed879a599

View File

@ -77,6 +77,7 @@
% \colorlet{green}{green!40!gray} % \colorlet{green}{green!40!gray}
% \colorlet{blue}{airforceblue} % \colorlet{blue}{airforceblue}
% If colors are not set through a theme we set a default value
\setbeamercolor*{definition}{fg=red,bg=blush!10!white} \setbeamercolor*{definition}{fg=red,bg=blush!10!white}
\setbeamercolor*{theorem}{fg=white,bg=red!90!white} \setbeamercolor*{theorem}{fg=white,bg=red!90!white}
\setbeamercolor*{property}{fg=white,bg=brickred!90!white} \setbeamercolor*{property}{fg=white,bg=brickred!90!white}
@ -267,19 +268,18 @@
% Auxiliary command to set color of certain element of beamer % Auxiliary command to set color of certain element of beamer
\NewDocumentCommand \setbeamercolorto { g }{% \NewDocumentCommand \setbeamercolorto { g }{%
% \setbeamercolor*{block title}{fg=#1,bg=#1!10!white} \setbeamercolor*{enumerate item}{fg=#1.fg}
\setbeamercolor*{enumerate item}{fg=#1} \setbeamercolor*{enumerate subitem}{fg=#1.fg}
\setbeamercolor*{enumerate subitem}{fg=#1} \setbeamercolor*{enumerate subsubitem}{fg=#1.fg}
\setbeamercolor*{enumerate subsubitem}{fg=#1} \setbeamercolor*{itemize item}{fg=#1.fg}
\setbeamercolor*{itemize item}{fg=#1} \setbeamercolor*{itemize subitem}{fg=#1.fg}
\setbeamercolor*{itemize subitem}{fg=#1} \setbeamercolor*{itemize subsubitem}{fg=#1.fg}
\setbeamercolor*{itemize subsubitem}{fg=#1} \setbeamercolor*{item}{fg=#1.fg}
\setbeamercolor*{item}{fg=#1}
} }
% déf(*)(TITRE) % déf(*)(TITRE)
\NewDocumentEnvironment{déf}{ s g }{%begin \NewDocumentEnvironment{déf}{ s g }{%begin
\setbeamercolor*{block title}{fg=definition,bg=blush!10!white} \setbeamercolor*{block title}{parent=definition}
\setbeamercolorto{definition} \setbeamercolorto{definition}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
@ -301,7 +301,7 @@
% thm(TITRE) % thm(TITRE)
\NewDocumentEnvironment{thm}{ g }{%begin \NewDocumentEnvironment{thm}{ g }{%begin
\setbeamercolor{block title}{fg=theorem,bg=red!90!white} \setbeamercolor*{block title}{parent=theorem}
\setbeamercolorto{theorem} \setbeamercolorto{theorem}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Théorème} \begin{block} {Théorème}
@ -314,7 +314,7 @@
% ppt(*)(TITRE) % ppt(*)(TITRE)
\NewDocumentEnvironment{ppt}{ s g }{%begin \NewDocumentEnvironment{ppt}{ s g }{%begin
\setbeamercolor{block title}{fg=white,bg=brickred!90!white} \setbeamercolor*{block title}{parent=property}
\setbeamercolorto{property} \setbeamercolorto{property}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
@ -336,7 +336,7 @@
% pre(TITRE) % pre(TITRE)
\NewDocumentEnvironment{pre}{ g }{%begin \NewDocumentEnvironment{pre}{ g }{%begin
\setbeamercolor{block title}{fg=hanblue,bg=airforceblue!10!white} \setbeamercolor*{block title}{parent=proof}
\setbeamercolorto{proof} \setbeamercolorto{proof}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Preuve} \begin{block} {Preuve}
@ -349,7 +349,7 @@
% voc(TITRE) % voc(TITRE)
\NewDocumentEnvironment{voc}{ g }{%begin \NewDocumentEnvironment{voc}{ g }{%begin
\setbeamercolor{block title}{fg=hanblue,bg=airforceblue!10!white} \setbeamercolor*{block title}{parent=vocabulary}
\setbeamercolorto{vocabulary} \setbeamercolorto{vocabulary}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Vocabulaire} \begin{block} {Vocabulaire}
@ -362,7 +362,7 @@
% rmq(TITRE) % rmq(TITRE)
\NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin \NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin
\setbeamercolor{block title}{fg=blush,bg=blush!10!white} \setbeamercolor*{block title}{parent=remark}
\setbeamercolorto{remark} \setbeamercolorto{remark}
\begin{block} {\faExclamationTriangle \hspace{.125em} #1} \begin{block} {\faExclamationTriangle \hspace{.125em} #1}
}{%end }{%end
@ -372,7 +372,7 @@
% met<0|i|I|a|A|1>(TITRE) % met<0|i|I|a|A|1>(TITRE)
\newcounter{methodecounter} \newcounter{methodecounter}
\NewDocumentEnvironment{met} { O{0} g }{%begin \NewDocumentEnvironment{met} { O{0} g }{%begin
\setbeamercolor{block title}{fg=black,bg=amber!75!white} \setbeamercolor*{block title}{parent=method}
\setbeamercolorto{method} \setbeamercolorto{method}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
@ -419,7 +419,7 @@
% exe(TITRE) % exe(TITRE)
\NewDocumentEnvironment{exe}{ G{Exemple} }{%begin \NewDocumentEnvironment{exe}{ G{Exemple} }{%begin
\setbeamercolor{block title}{fg=darkspringgreen,bg=green!10!white} \setbeamercolor*{block title}{parent=example}
\setbeamercolorto{example} \setbeamercolorto{example}
\begin{block} {\faLightbulbO \hspace{.125em} #1} \begin{block} {\faLightbulbO \hspace{.125em} #1}
}{%end }{%end
@ -429,7 +429,7 @@
% exo<0|i|I|a|A|1>(TITRE) % exo<0|i|I|a|A|1>(TITRE)
\newcounter{exercicecounter} \newcounter{exercicecounter}
\NewDocumentEnvironment{exo} { O{0} G{Exercice} }{%begin \NewDocumentEnvironment{exo} { O{0} G{Exercice} }{%begin
\setbeamercolor{block title}{fg=white,bg=airforceblue!90!white} \setbeamercolor*{block title}{parent=exercise}
\setbeamercolorto{exercise} \setbeamercolorto{exercise}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
@ -469,7 +469,7 @@
% app<0|i|I|a|A|1>(TITRE) % app<0|i|I|a|A|1>(TITRE)
\newcounter{applicationcounter} \newcounter{applicationcounter}
\NewDocumentEnvironment{app} { O{0} G{Application} }{%begin \NewDocumentEnvironment{app} { O{0} G{Application} }{%begin
\setbeamercolor{block title}{fg=white,bg=airforceblue!90!white} \setbeamercolor*{block title}{parent=application}
\setbeamercolorto{application} \setbeamercolorto{application}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }