From f3ba1e572144bab578c52e2a4d6741fbcd6f8b2c Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Fri, 16 Feb 2018 15:56:32 +0100 Subject: [PATCH] Update. --- commun/commun.sty | 2 +- cours/cours_beamer.cls | 26 +++++++++++++------------- cours/cours_handout.cls | 3 ++- cours/cours_prof.cls | 25 +++++++++++++++++++------ 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/commun/commun.sty b/commun/commun.sty index 685c33c..139fe8c 100644 --- a/commun/commun.sty +++ b/commun/commun.sty @@ -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 diff --git a/cours/cours_beamer.cls b/cours/cours_beamer.cls index 3ba5946..28b8879 100644 --- a/cours/cours_beamer.cls +++ b/cours/cours_beamer.cls @@ -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} } { diff --git a/cours/cours_handout.cls b/cours/cours_handout.cls index 10cd276..7f7ef35 100644 --- a/cours/cours_handout.cls +++ b/cours/cours_handout.cls @@ -14,11 +14,12 @@ %-- definitions -\DeclareOption*{\PassOptionsToClass{\CurrentOption, handout}{cours_beamer}} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{cours_beamer}} %--% %-- options % \ExecuteOptions{} +\PassOptionsToClass{handout}{cours_beamer} \ProcessOptions\relax %--% diff --git a/cours/cours_prof.cls b/cours/cours_prof.cls index c375314..1a911c8 100644 --- a/cours/cours_prof.cls +++ b/cours/cours_prof.cls @@ -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{}