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
\setdefaultlanguage{french} % => inputenc
\RequirePackage{luatextra} % charge fontspec => fontenc
\defaultfontfeatures{Ligatures=TeX}
% \defaultfontfeatures{Ligatures=TeX}
\else
\RequirePackage[francais]{babel} % => polyglossia
\RequirePackage[utf8]{inputenc} % => fontspec

View File

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

View File

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

View File

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