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{mathrsfs}
\RequirePackage{tabvar}
\RequirePackage{xlop}
% tables
\RequirePackage{array}
@ -88,6 +89,7 @@
% text
\RequirePackage[dash,phantomtext]{dashundergaps}
\RequirePackage{comment}
\RequirePackage{caption}
@ -181,6 +183,16 @@
;
}
%
%
% Captions
%
%
\DeclareCaptionFormat{source}{\textbf{\textit{source#2}} #3}
%---------------------------------------------
% \NewDocumentCommand \hcancel { O{black} O{1pt} } {
% \setbox0=\hbox{$#3$}%
@ -232,6 +244,7 @@
\newfontfamily\FingerPaint[Ligatures=TeX]{Finger Paint}
\newfontfamily\Handlee[Ligatures=TeX]{Handlee}
\newfontfamily\Julee[Ligatures=TeX]{Julee}
\newfontfamily\Morse[Ligatures=TeX]{Morse}
\newfontfamily\NixieOne[Ligatures=TeX]{Nixie One}
\newfontfamily\PenguinAttack[Ligatures=TeX]{PenguinAttack}
\newfontfamily\PokemonHollow[Ligatures=TeX]{Pokemon Hollow}
@ -264,8 +277,23 @@
% Create some color commands
\newColorCommand{red}
\newColorCommand{black}
\newColorCommand{white}
\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
% \titre{TITRE}{ANNÉE}{AUTEUR}{LIEU}
% \titre{TITRE}{SOUS-TITRE}{ANNÉE}{LIEU}
% defini le titre du document
\newcommand{\titre}[4]{%
\title{#1}
@ -251,7 +251,7 @@
}
\NewDocumentCommand \sspartie { G{Sous-Partie} } {%
\usebeamercolor{subsectioncolor}
\usebeamercolor{subsectioncolor}
\def\cType{\arabic}
\stepcounter{sspartiecounter}
\subsection{#1}
@ -474,15 +474,15 @@
}
\stepcounter{methodecounter}
\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} {
\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
@ -493,7 +493,7 @@
\NewDocumentEnvironment{exe}{ G{Exemple} }{%begin
\setbeamercolor*{block title}{parent=example}
% \setbeamercolorofitem{example}
\begin{block} {\faLightbulbO \hspace{.125em} #1}
\begin{block} {\faPaperclip \hspace{.125em} #1}
}{%end
\end{block}
}
@ -570,9 +570,9 @@
}
}
\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{block}

View File

@ -26,15 +26,18 @@
% PACKAGES
%
%
% Others
\RequirePackage{xkeyval}
% Own packages. Those contains some global settings and definitions.
\RequirePackage{commun}
\RequirePackage{couleurs}
\RequirePackage{shortcuts}
% output
% Output
\RequirePackage{comment}
% layout
% Layout
\RequirePackage{geometry}
\RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage}
\RequirePackage{titling}
@ -49,6 +52,21 @@
%
%
% OPTIONS
%
%
\DeclareOptionX{type}[cours]{%
\def\type{#1}%
}
\ExecuteOptionsX{type}
\ProcessOptionsX
%
%
% FIXES
@ -170,7 +188,16 @@
% KOMA-Script version (preferred)
\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}}
\pagestyle{scrheadings}
\setkomafont{pagehead}{\normalfont\bfseries}
@ -197,9 +224,14 @@
% paths
\graphicspath{{images/}}
% mdframed
%
%
% MDFRAMED
%
%
% global options
\mdfsetup{
frametitlealignment=\raggedright,%
@ -270,7 +302,7 @@
skipabove=0,skipbelow=0,%
frametitlerule=false,%
frametitlebackgroundcolor=white!0,%innertopmargin=\topskip,%
nobreak=true,%
nobreak=false,%
xcolor,%
}
% quote: frame with no borders but with a beginning quote at upper left and
@ -322,16 +354,16 @@
shadow=true,%
% backgroundcolor=gray!40,% FOR TEST ONLY
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)$)
node[symbol] { \faFileTextO };
node[symbol] { \faCogs };
},%
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)$)
node[symbol] { \faFileTextO };
node[symbol] { \faCogs };
},%
}
% tips: a shadowed square frame with a light bulb icon at upper left
@ -378,16 +410,16 @@
% shadow=true,%
% backgroundcolor=gray!40,% FOR TEST ONLY
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)$)
node[symbol] { \faCogs };
node[symbol] { \faBookmarkO };
},%
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)$)
node[symbol] { \faCogs };
node[symbol] { \faBookmarkO };
},%
}
% 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=quote, frametitle=none, frametitleaboveskip=0em, frametitlebelowskip=0em]{qte}{}
\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={}]{exen}{}
\mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{exo}{Exercice}
\mdtheorem[style=todo, theoremseparator={ -}, theoremspace={}]{app}{Application}
\mdtheorem[style=todo, theoremseparator={}, theoremspace={}]{appn}{}
@ -534,6 +568,16 @@
\end{exe*}
}
\RenewDocumentEnvironment{exen}{ o } {%begin
\IfNoValueTF {#1} {
\begin{exen*}
}{
\begin{exen*}[#1]
}
}{%end
\end{exen*}
}
\RenewDocumentEnvironment{qte}{ o } {%begin
\IfNoValueTF {#1} {
\begin{qte*}
@ -554,6 +598,16 @@
\end{rmq*}
}
\RenewDocumentEnvironment{rmqn}{ o } {%begin
\IfNoValueTF {#1} {
\begin{rmqn*}
}{
\begin{rmqn*}[#1]
}
}{%end
\end{rmqn*}
}
\RenewDocumentEnvironment{voc}{ o } {%begin
\IfNoValueTF {#1} {
\begin{voc*}
@ -636,6 +690,12 @@
\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