This commit is contained in:
Jeff Lance 2018-02-16 15:56:32 +01:00
parent f06ceac1cf
commit f3ba1e5721
4 changed files with 35 additions and 21 deletions

View File

@ -36,7 +36,7 @@
\RequirePackage{polyglossia} % => babel \RequirePackage{polyglossia} % => babel
\setdefaultlanguage{french} % => inputenc \setdefaultlanguage{french} % => inputenc
\RequirePackage{luatextra} % charge fontspec => fontenc \RequirePackage{luatextra} % charge fontspec => fontenc
\defaultfontfeatures{Ligatures=TeX} % \defaultfontfeatures{Ligatures=TeX}
\else \else
\RequirePackage[francais]{babel} % => polyglossia \RequirePackage[francais]{babel} % => polyglossia
\RequirePackage[utf8]{inputenc} % => fontspec \RequirePackage[utf8]{inputenc} % => fontspec

View File

@ -295,7 +295,7 @@
% déf(*)(TITRE) % déf(*)(TITRE)
\NewDocumentEnvironment{déf}{ s g }{%begin \NewDocumentEnvironment{déf}{ s g }{%begin
\setbeamercolor*{block title}{parent=definition} \setbeamercolor*{block title}{parent=definition}
% \setbeamercolorofitem{definition} % \setbeamercolorofitem{definition}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
@ -317,7 +317,7 @@
% défn(*)(TITRE) % défn(*)(TITRE)
\NewDocumentEnvironment{défn}{ s g }{%begin \NewDocumentEnvironment{défn}{ s g }{%begin
\setbeamercolor*{block title}{parent=definition} \setbeamercolor*{block title}{parent=definition}
% \setbeamercolorofitem{definition} % \setbeamercolorofitem{definition}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
@ -339,7 +339,7 @@
% thm(TITRE) % thm(TITRE)
\NewDocumentEnvironment{thm}{ g }{%begin \NewDocumentEnvironment{thm}{ g }{%begin
\setbeamercolor*{block title}{parent=theorem} \setbeamercolor*{block title}{parent=theorem}
% \setbeamercolorofitem{theorem} % \setbeamercolorofitem{theorem}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Théorème} \begin{block} {Théorème}
}{ }{
@ -352,7 +352,7 @@
% thmn(TITRE) % thmn(TITRE)
\NewDocumentEnvironment{thmn}{ g }{%begin \NewDocumentEnvironment{thmn}{ g }{%begin
\setbeamercolor*{block title}{parent=theorem} \setbeamercolor*{block title}{parent=theorem}
% \setbeamercolorofitem{theorem} % \setbeamercolorofitem{theorem}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {\faPencil \hspace{.125em}\ Théorème} \begin{block} {\faPencil \hspace{.125em}\ Théorème}
}{ }{
@ -365,7 +365,7 @@
% ppt(*)(TITRE) % ppt(*)(TITRE)
\NewDocumentEnvironment{ppt}{ s g }{%begin \NewDocumentEnvironment{ppt}{ s g }{%begin
\setbeamercolor*{block title}{parent=property} \setbeamercolor*{block title}{parent=property}
% \setbeamercolorofitem{property} % \setbeamercolorofitem{property}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
@ -387,7 +387,7 @@
% pptn(*)(TITRE) % pptn(*)(TITRE)
\NewDocumentEnvironment{pptn}{ s g }{%begin \NewDocumentEnvironment{pptn}{ s g }{%begin
\setbeamercolor*{block title}{parent=property} \setbeamercolor*{block title}{parent=property}
% \setbeamercolorofitem{property} % \setbeamercolorofitem{property}
\IfBooleanTF #1 \IfBooleanTF #1
{ {
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
@ -409,7 +409,7 @@
% pre(TITRE) % pre(TITRE)
\NewDocumentEnvironment{pre}{ g }{%begin \NewDocumentEnvironment{pre}{ g }{%begin
\setbeamercolor*{block title}{parent=proof} \setbeamercolor*{block title}{parent=proof}
% \setbeamercolorofitem{proof} % \setbeamercolorofitem{proof}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Preuve} \begin{block} {Preuve}
}{ }{
@ -422,7 +422,7 @@
% voc(TITRE) % voc(TITRE)
\NewDocumentEnvironment{voc}{ g }{%begin \NewDocumentEnvironment{voc}{ g }{%begin
\setbeamercolor*{block title}{parent=vocabulary} \setbeamercolor*{block title}{parent=vocabulary}
% \setbeamercolorofitem{vocabulary} % \setbeamercolorofitem{vocabulary}
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{block} {Vocabulaire} \begin{block} {Vocabulaire}
}{ }{
@ -435,7 +435,7 @@
% rmq(TITRE) % rmq(TITRE)
\NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin \NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin
\setbeamercolor*{block title}{parent=remark} \setbeamercolor*{block title}{parent=remark}
% \setbeamercolorofitem{remark} % \setbeamercolorofitem{remark}
\begin{block} {\faExclamationTriangle \hspace{.125em} #1} \begin{block} {\faExclamationTriangle \hspace{.125em} #1}
}{%end }{%end
\end{block} \end{block}
@ -445,7 +445,7 @@
\newcounter{methodecounter} \newcounter{methodecounter}
\NewDocumentEnvironment{met} { O{0} g }{%begin \NewDocumentEnvironment{met} { O{0} g }{%begin
\setbeamercolor*{block title}{parent=method} \setbeamercolor*{block title}{parent=method}
% \setbeamercolorofitem{method} % \setbeamercolorofitem{method}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
{ {
@ -492,7 +492,7 @@
% exe(TITRE) % exe(TITRE)
\NewDocumentEnvironment{exe}{ G{Exemple} }{%begin \NewDocumentEnvironment{exe}{ G{Exemple} }{%begin
\setbeamercolor*{block title}{parent=example} \setbeamercolor*{block title}{parent=example}
% \setbeamercolorofitem{example} % \setbeamercolorofitem{example}
\begin{block} {\faLightbulbO \hspace{.125em} #1} \begin{block} {\faLightbulbO \hspace{.125em} #1}
}{%end }{%end
\end{block} \end{block}
@ -502,7 +502,7 @@
\newcounter{exercicecounter} \newcounter{exercicecounter}
\NewDocumentEnvironment{exo} { O{0} G{Exercice} }{%begin \NewDocumentEnvironment{exo} { O{0} G{Exercice} }{%begin
\setbeamercolor*{block title}{parent=exercise} \setbeamercolor*{block title}{parent=exercise}
% \setbeamercolorofitem{exercise} % \setbeamercolorofitem{exercise}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
{ {
@ -542,7 +542,7 @@
\newcounter{applicationcounter} \newcounter{applicationcounter}
\NewDocumentEnvironment{app} { O{0} G{Application} }{%begin \NewDocumentEnvironment{app} { O{0} G{Application} }{%begin
\setbeamercolor*{block title}{parent=application} \setbeamercolor*{block title}{parent=application}
% \setbeamercolorofitem{application} % \setbeamercolorofitem{application}
\ifthenelse{ \NOT \equal{#1}{0} }{ \ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
{ {

View File

@ -14,11 +14,12 @@
%-- definitions %-- definitions
\DeclareOption*{\PassOptionsToClass{\CurrentOption, handout}{cours_beamer}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{cours_beamer}}
%--% %--%
%-- options %-- options
% \ExecuteOptions{} % \ExecuteOptions{}
\PassOptionsToClass{handout}{cours_beamer}
\ProcessOptions\relax \ProcessOptions\relax
%--% %--%

View File

@ -32,9 +32,10 @@
% mise en page % mise en page
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage{scrlayer-scrpage} \RequirePackage{scrlayer-scrpage}
% \RequirePackage{mdframed} \RequirePackage{titling}
\RequirePackage{titlesec} \RequirePackage{titlesec}
\RequirePackage{pageslts} \RequirePackage{pageslts}
\RequirePackage{enumitem}
%--% %--%
\makeatletter \makeatletter
@ -54,13 +55,13 @@
% titre, en-tête, pied de page % titre, en-tête, pied de page
\cofoot*{\thepage\ /\ \pageref{LastPage}} \cofoot*{\thepage\ /\ \pageref{LastPage}}
\pagestyle{scrheadings} \pagestyle{scrheadings}
\setkomafont{title}{\Comic} % \setkomafont{title}{\Comic}
% (sub)sections % (sub)sections
\titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[] % \titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[]
\titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[] % \titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[]
\renewcommand \thesection{\Roman{section}} % \renewcommand \thesection{\Roman{section}}
\renewcommand \thesubsection{\arabic{subsection}} % \renewcommand \thesubsection{\arabic{subsection}}
% paths % paths
\graphicspath{{images/}} \graphicspath{{images/}}
@ -400,6 +401,7 @@
\mdtheorem[style=dotted, theoremseparator={ -}, theoremspace={}]{exe}{Exemple} \mdtheorem[style=dotted, theoremseparator={ -}, theoremspace={}]{exe}{Exemple}
\mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{exo}{Exercice} \mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{exo}{Exercice}
\mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{app}{Application} \mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{app}{Application}
\mdtheorem[style=todo, theoremseparator={}, theoremspace={}]{appn}{}
\mdtheorem[style=method, theoremseparator={ -}, theoremspace={}]{met}{Méthode} \mdtheorem[style=method, theoremseparator={ -}, theoremspace={}]{met}{Méthode}
% Redirect all standard previously defined environments to their starred version % Redirect all standard previously defined environments to their starred version
@ -544,6 +546,16 @@
\end{app*} \end{app*}
} }
\RenewDocumentEnvironment{appn}{ o } {%begin
\IfNoValueTF {#1} {
\begin{appn*}
}{
\begin{appn*}[#1]
}
}{%end
\end{appn*}
}
\RenewDocumentEnvironment{met}{ o } {%begin \RenewDocumentEnvironment{met}{ o } {%begin
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{met*} \begin{met*}
@ -564,6 +576,7 @@
%-- Macros personnelles %-- Macros personnelles
% titre % titre
\NewDocumentCommand \titre { G{Titre} G{Sous-titre} } {% \NewDocumentCommand \titre { G{Titre} G{Sous-titre} } {%
\setlength{\droptitle}{-2cm}
\title{#1} \title{#1}
\subtitle{#2} \subtitle{#2}
\date{} \date{}