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