This commit is contained in:
Jeff Lance 2018-09-03 16:08:40 +02:00
parent bce0884381
commit e8d30abc7b
3 changed files with 110 additions and 22 deletions

View File

@ -74,6 +74,7 @@
\RequirePackage{asymptote} \RequirePackage{asymptote}
\RequirePackage{mathrsfs} \RequirePackage{mathrsfs}
\RequirePackage{tabvar} \RequirePackage{tabvar}
\RequirePackage{xlop}
% tables % tables
\RequirePackage{array} \RequirePackage{array}
@ -88,6 +89,7 @@
% text % text
\RequirePackage[dash,phantomtext]{dashundergaps} \RequirePackage[dash,phantomtext]{dashundergaps}
\RequirePackage{comment} \RequirePackage{comment}
\RequirePackage{caption}
@ -181,6 +183,16 @@
; ;
} }
%
%
% Captions
%
%
\DeclareCaptionFormat{source}{\textbf{\textit{source#2}} #3}
%--------------------------------------------- %---------------------------------------------
% \NewDocumentCommand \hcancel { O{black} O{1pt} } { % \NewDocumentCommand \hcancel { O{black} O{1pt} } {
% \setbox0=\hbox{$#3$}% % \setbox0=\hbox{$#3$}%
@ -232,6 +244,7 @@
\newfontfamily\FingerPaint[Ligatures=TeX]{Finger Paint} \newfontfamily\FingerPaint[Ligatures=TeX]{Finger Paint}
\newfontfamily\Handlee[Ligatures=TeX]{Handlee} \newfontfamily\Handlee[Ligatures=TeX]{Handlee}
\newfontfamily\Julee[Ligatures=TeX]{Julee} \newfontfamily\Julee[Ligatures=TeX]{Julee}
\newfontfamily\Morse[Ligatures=TeX]{Morse}
\newfontfamily\NixieOne[Ligatures=TeX]{Nixie One} \newfontfamily\NixieOne[Ligatures=TeX]{Nixie One}
\newfontfamily\PenguinAttack[Ligatures=TeX]{PenguinAttack} \newfontfamily\PenguinAttack[Ligatures=TeX]{PenguinAttack}
\newfontfamily\PokemonHollow[Ligatures=TeX]{Pokemon Hollow} \newfontfamily\PokemonHollow[Ligatures=TeX]{Pokemon Hollow}
@ -264,8 +277,23 @@
% Create some color commands % Create some color commands
\newColorCommand{red} \newColorCommand{red}
\newColorCommand{black}
\newColorCommand{white} \newColorCommand{white}
\newColorCommand{gray} \newColorCommand{gray}
\newColorCommand{lapislazuli}
%
%
% Maths
%
%
\newcommand\OPoval[3]{%
\dimen1=#2\opcolumnwidth
\ovalnode{#1}
{\kern\dimen1 #3\kern\dimen1}}

View File

@ -202,7 +202,7 @@
%-- OWN COMMANDS %-- OWN COMMANDS
% \titre{TITRE}{ANNÉE}{AUTEUR}{LIEU} % \titre{TITRE}{SOUS-TITRE}{ANNÉE}{LIEU}
% defini le titre du document % defini le titre du document
\newcommand{\titre}[4]{% \newcommand{\titre}[4]{%
\title{#1} \title{#1}
@ -251,7 +251,7 @@
} }
\NewDocumentCommand \sspartie { G{Sous-Partie} } {% \NewDocumentCommand \sspartie { G{Sous-Partie} } {%
\usebeamercolor{subsectioncolor} \usebeamercolor{subsectioncolor}
\def\cType{\arabic} \def\cType{\arabic}
\stepcounter{sspartiecounter} \stepcounter{sspartiecounter}
\subsection{#1} \subsection{#1}
@ -474,15 +474,15 @@
} }
\stepcounter{methodecounter} \stepcounter{methodecounter}
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
\begin{block}{\faCogs \hspace{.125em} Méthode \cType{methodecounter}\ } \begin{block}{\faBookmarkO \hspace{.125em} Méthode \cType{methodecounter}\ }
}{ }{
\begin{block}{\faCogs \hspace{.125em} Méthode \cType{methodecounter}\ - #2} \begin{block}{\faBookmarkO \hspace{.125em} Méthode \cType{methodecounter}\ - #2}
} }
}{ }{
\IfNoValueTF {#2} { \IfNoValueTF {#2} {
\begin{block}{\faCogs \hspace{.125em} Méthode\ } \begin{block}{\faBookmarkO \hspace{.125em} Méthode\ }
}{ }{
\begin{block}{\faCogs \hspace{.125em} Méthode\ - #2} \begin{block}{\faBookmarkO \hspace{.125em} Méthode\ - #2}
} }
} }
}{%end }{%end
@ -493,7 +493,7 @@
\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} {\faPaperclip \hspace{.125em} #1}
}{%end }{%end
\end{block} \end{block}
} }
@ -570,9 +570,9 @@
} }
} }
\stepcounter{applicationcounter} \stepcounter{applicationcounter}
\begin{block}{\faFileTextO \hspace{.125em} #2 \cType{applicationcounter}\ } \begin{block}{\faCogs \hspace{.125em} #2 \cType{applicationcounter}\ }
}{ }{
\begin{block}{\faFileTextO \hspace{.125em} #2\ } \begin{block}{\faCogs \hspace{.125em} #2\ }
} }
}{%end }{%end
\end{block} \end{block}

View File

@ -26,15 +26,18 @@
% PACKAGES % PACKAGES
% %
% %
% Others
\RequirePackage{xkeyval}
% Own packages. Those contains some global settings and definitions. % Own packages. Those contains some global settings and definitions.
\RequirePackage{commun} \RequirePackage{commun}
\RequirePackage{couleurs}
\RequirePackage{shortcuts} \RequirePackage{shortcuts}
% output % Output
\RequirePackage{comment} \RequirePackage{comment}
% layout % Layout
\RequirePackage{geometry} \RequirePackage{geometry}
\RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage} \RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage}
\RequirePackage{titling} \RequirePackage{titling}
@ -49,6 +52,21 @@
%
%
% OPTIONS
%
%
\DeclareOptionX{type}[cours]{%
\def\type{#1}%
}
\ExecuteOptionsX{type}
\ProcessOptionsX
% %
% %
% FIXES % FIXES
@ -170,7 +188,16 @@
% KOMA-Script version (preferred) % KOMA-Script version (preferred)
\ohead{} \ohead{}
\rohead[Cours]{Cours - \@title} \ifthenelse{ \equal{\type}{activity} }{
\IfNoValueTF{ \subtitle }{
\rohead[Activité]{Activité}
}{
\rohead[Activité]{Activité - \@subtitle}
}
\cohead[\@title]{\@title}
}{
\rohead[Cours]{Cours - \@title}
}
\cofoot*{\thepage\ /\ \pageref{LastPage}} \cofoot*{\thepage\ /\ \pageref{LastPage}}
\pagestyle{scrheadings} \pagestyle{scrheadings}
\setkomafont{pagehead}{\normalfont\bfseries} \setkomafont{pagehead}{\normalfont\bfseries}
@ -197,9 +224,14 @@
% paths % paths
\graphicspath{{images/}} \graphicspath{{images/}}
% mdframed
%
%
% MDFRAMED
%
%
% global options % global options
\mdfsetup{ \mdfsetup{
frametitlealignment=\raggedright,% frametitlealignment=\raggedright,%
@ -270,7 +302,7 @@
skipabove=0,skipbelow=0,% skipabove=0,skipbelow=0,%
frametitlerule=false,% frametitlerule=false,%
frametitlebackgroundcolor=white!0,%innertopmargin=\topskip,% frametitlebackgroundcolor=white!0,%innertopmargin=\topskip,%
nobreak=true,% nobreak=false,%
xcolor,% xcolor,%
} }
% quote: frame with no borders but with a beginning quote at upper left and % quote: frame with no borders but with a beginning quote at upper left and
@ -322,16 +354,16 @@
shadow=true,% shadow=true,%
% backgroundcolor=gray!40,% FOR TEST ONLY % backgroundcolor=gray!40,% FOR TEST ONLY
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faFileTextO }; node[symbol] { \faCogs };
},% },%
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faFileTextO }; node[symbol] { \faCogs };
},% },%
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faFileTextO }; node[symbol] { \faCogs };
},% },%
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faFileTextO }; node[symbol] { \faCogs };
},% },%
} }
% tips: a shadowed square frame with a light bulb icon at upper left % tips: a shadowed square frame with a light bulb icon at upper left
@ -378,16 +410,16 @@
% shadow=true,% % shadow=true,%
% backgroundcolor=gray!40,% FOR TEST ONLY % backgroundcolor=gray!40,% FOR TEST ONLY
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faCogs }; node[symbol] { \faBookmarkO };
},% },%
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faCogs }; node[symbol] { \faBookmarkO };
},% },%
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faCogs }; node[symbol] { \faBookmarkO };
},% },%
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$) singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
node[symbol] { \faCogs }; node[symbol] { \faBookmarkO };
},% },%
} }
% warn: frame with only left border and warning icon at upper left % warn: frame with only left border and warning icon at upper left
@ -428,7 +460,9 @@
\mdtheorem[style=default, theoremseparator={ -}, theoremspace={}]{vocn}{Vocabulaire} \mdtheorem[style=default, theoremseparator={ -}, theoremspace={}]{vocn}{Vocabulaire}
\mdtheorem[style=quote, frametitle=none, frametitleaboveskip=0em, frametitlebelowskip=0em]{qte}{} \mdtheorem[style=quote, frametitle=none, frametitleaboveskip=0em, frametitlebelowskip=0em]{qte}{}
\mdtheorem[style=warning, theoremseparator={ -}, theoremspace={}]{rmq}{Remarque} \mdtheorem[style=warning, theoremseparator={ -}, theoremspace={}]{rmq}{Remarque}
\mdtheorem[style=warning, theoremseparator={}, theoremspace={}]{rmqn}{}
\mdtheorem[style=dotted, theoremseparator={ -}, theoremspace={}]{exe}{Exemple} \mdtheorem[style=dotted, theoremseparator={ -}, theoremspace={}]{exe}{Exemple}
\mdtheorem[style=dotted, theoremseparator={}, theoremspace={}]{exen}{}
\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=todo, theoremseparator={}, theoremspace={}]{appn}{}
@ -534,6 +568,16 @@
\end{exe*} \end{exe*}
} }
\RenewDocumentEnvironment{exen}{ o } {%begin
\IfNoValueTF {#1} {
\begin{exen*}
}{
\begin{exen*}[#1]
}
}{%end
\end{exen*}
}
\RenewDocumentEnvironment{qte}{ o } {%begin \RenewDocumentEnvironment{qte}{ o } {%begin
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{qte*} \begin{qte*}
@ -554,6 +598,16 @@
\end{rmq*} \end{rmq*}
} }
\RenewDocumentEnvironment{rmqn}{ o } {%begin
\IfNoValueTF {#1} {
\begin{rmqn*}
}{
\begin{rmqn*}[#1]
}
}{%end
\end{rmqn*}
}
\RenewDocumentEnvironment{voc}{ o } {%begin \RenewDocumentEnvironment{voc}{ o } {%begin
\IfNoValueTF {#1} { \IfNoValueTF {#1} {
\begin{voc*} \begin{voc*}
@ -636,6 +690,12 @@
\subsection{#1} \subsection{#1}
} }
% lists
\newlist{questions}{enumerate}{2}
\setlist[questions]{labelindent=0em, leftmargin=*, labelsep=0.5em}
\setlist[questions, 1]{label=\textbf{\arabic*.}}
\setlist[questions, 2]{label=\textbf{\alph*)}}
\makeatother \makeatother