up
This commit is contained in:
@@ -16,7 +16,6 @@ contributes:
|
||||
format-resources:
|
||||
- extra/couleurs.sty
|
||||
- extra/shortcuts.sty
|
||||
- extra/polices.sty
|
||||
- extra/mdframed.tex
|
||||
- extra/mdtheorem.tex
|
||||
- extra/environments.tex
|
||||
@@ -33,4 +32,7 @@ contributes:
|
||||
cours: false
|
||||
exercice: false
|
||||
activite: false
|
||||
|
||||
filters:
|
||||
- latex-environment
|
||||
environments: [definition, propriete, theoreme, questions]
|
||||
commands: [tanColor]
|
||||
|
||||
1604
_extensions/cours/extra/couleurs.sty
Normal file
1604
_extensions/cours/extra/couleurs.sty
Normal file
File diff suppressed because it is too large
Load Diff
443
_extensions/cours/extra/shortcuts.sty
Normal file
443
_extensions/cours/extra/shortcuts.sty
Normal file
@@ -0,0 +1,443 @@
|
||||
%%%
|
||||
%%%
|
||||
%%% Extensions : shortcuts.sty
|
||||
%%% Version : 1.0
|
||||
%%% Date : 10/05/16
|
||||
%%% Auteur : Jeff LANCE
|
||||
%%% Notes : Cette extension peut demander l'ajout de certains packages.
|
||||
%%% Il est conseillé de l'appeler dans un(e) classe/(package) appelant
|
||||
%%% elle(lui)-même ces packages.
|
||||
%%%
|
||||
%%%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{shortcuts}[2016/05/16 Définitions de raccourcis vers des macros
|
||||
existantes, v1.0]
|
||||
|
||||
|
||||
|
||||
\makeatletter
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% ENVIRONMENTS
|
||||
%
|
||||
%
|
||||
|
||||
%% itemize
|
||||
%%
|
||||
\newcommand{\bi}{\begin{itemize}}
|
||||
\newcommand{\ei}{\end{itemize}}
|
||||
|
||||
%% enumerate
|
||||
%%
|
||||
\newcommand{\be}{\begin{enumerate}}
|
||||
\newcommand{\ee}{\end{enumerate}}
|
||||
|
||||
%% descriptions
|
||||
%%
|
||||
\newcommand{\bd}{\begin{description}}
|
||||
\newcommand{\ed}{\end{description}}
|
||||
|
||||
%% columns
|
||||
%%
|
||||
\newcommand{\bc}{\begin{columns}}
|
||||
\newcommand{\ec}{\end{columns}}
|
||||
|
||||
%% questions
|
||||
%%
|
||||
\newcommand{\bq}{\begin{questions}}
|
||||
\newcommand{\eq}{\end{questions}}
|
||||
|
||||
%% tasks
|
||||
%%
|
||||
\newcommand{\bt}{\begin{tasks}}
|
||||
\newcommand{\et}{\end{tasks}}
|
||||
|
||||
%% minipage
|
||||
%%
|
||||
% \newcommand{\bm}{\begin{minipage}}
|
||||
% \newcommand{\em}{\end{minipage}}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% TEXT
|
||||
%
|
||||
%
|
||||
|
||||
%% positive skip.
|
||||
%%
|
||||
\NewDocumentCommand \pskip { G{.2} } {%
|
||||
\vspace*{+#1cm}
|
||||
}
|
||||
|
||||
%% negative skip.
|
||||
%%
|
||||
\NewDocumentCommand \nskip { G{.8} } {%
|
||||
\vspace*{-#1cm}
|
||||
}
|
||||
|
||||
%% another shortcut to whiting text.
|
||||
%%
|
||||
\NewDocumentCommand \ghost { } {%
|
||||
\white
|
||||
}
|
||||
|
||||
%% c'est-à-dire
|
||||
%%
|
||||
\NewDocumentCommand \cad { } {
|
||||
{c'est-à-dire}
|
||||
}
|
||||
\NewDocumentCommand \Cad { } {
|
||||
{C'est-à-dire}
|
||||
}
|
||||
|
||||
%% textsuperscript and textsubscript
|
||||
%%
|
||||
\NewDocumentCommand \up { g } {
|
||||
\textsuperscript{#1}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \ub { g } {
|
||||
\textsubscript{#1}
|
||||
}
|
||||
|
||||
%% smileys
|
||||
%%
|
||||
\NewDocumentCommand \wink { } {
|
||||
{\DejaVuSans 😉}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \lol { } {
|
||||
{\DejaVuSans 😂}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \sad { } {
|
||||
{\DejaVuSans 😞}
|
||||
}
|
||||
|
||||
% double quoting
|
||||
%%
|
||||
\providecommand{\og}{
|
||||
<<
|
||||
}
|
||||
\providecommand{\fg}{
|
||||
>>
|
||||
}
|
||||
|
||||
% column sep rule
|
||||
%%
|
||||
\NewDocumentCommand \filet { G{0} } {
|
||||
\setlength{\columnseprule}{#1}
|
||||
}
|
||||
|
||||
% \num shortcut
|
||||
%%
|
||||
\NewDocumentCommand \n { g } {
|
||||
\num{#1}
|
||||
}
|
||||
|
||||
% point médian
|
||||
%%
|
||||
\def\cdt{\kern-0.pt\ensuremath\cdot\kern-0.5pt}
|
||||
|
||||
% fonts
|
||||
%%
|
||||
\newfontfamily\Jd{j.d.}[
|
||||
Ligatures=TeX,
|
||||
]
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% MATHS
|
||||
%
|
||||
%
|
||||
|
||||
%% i, j & k vectors
|
||||
%%
|
||||
\NewDocumentCommand \veci { } {
|
||||
\ensuremath{ \vec{\imath} }
|
||||
}
|
||||
\NewDocumentCommand \vecj { } {
|
||||
\ensuremath{ \vec{\jmath} }
|
||||
}
|
||||
\NewDocumentCommand \veck { } {
|
||||
\ensuremath{ \vec{k} }
|
||||
}
|
||||
|
||||
%% basis (i,j)
|
||||
%%
|
||||
\RenewDocumentCommand \ij { } {
|
||||
\ensuremath{ \left(\vec{\imath}\: ;\: \vec{\jmath}\right) }
|
||||
}
|
||||
|
||||
%% basis (i,j,k)
|
||||
%%
|
||||
\NewDocumentCommand \ijk { } {
|
||||
\ensuremath{ \left(\vec{\imath}\: ;\: \vec{\jmath}\: ;\: \vec{k}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;i;j)
|
||||
%%
|
||||
\NewDocumentCommand \oij { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{\imath}\: ;\: \vec{\jmath}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;i;j;k)
|
||||
%%
|
||||
\NewDocumentCommand \oijk { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{\imath}\: ;\: \vec{\jmath}\: ;\: \vec{k}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;I;I)
|
||||
%%
|
||||
\NewDocumentCommand \OIJ { } {
|
||||
\ensuremath{ \left(O\: ;\: I\: ;\: J\right) }
|
||||
}
|
||||
|
||||
%% frame (O;x;y)
|
||||
%%
|
||||
\NewDocumentCommand \oxy { } {
|
||||
\ensuremath{ \left(O\: ;\: x\: ;\: y\right) }
|
||||
}
|
||||
|
||||
%% frame (O;u;v)
|
||||
%%
|
||||
\NewDocumentCommand \ouv { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{u}\: ;\: \vec{v}\right) }
|
||||
}
|
||||
|
||||
%% vector arrow redefinition
|
||||
%%
|
||||
\renewcommand{\vec}[1]{
|
||||
\ensuremath{ \overrightarrow{\, \mathstrut#1 \,} }
|
||||
}
|
||||
|
||||
% \renewcommand{\vec}[1]{
|
||||
% \ensuremath{ \overrightarrow{#1\vphantom(} }
|
||||
% }
|
||||
|
||||
%% coordinates
|
||||
%%
|
||||
\NewDocumentCommand \coord { s m }{
|
||||
\IfBooleanTF { #1 } {
|
||||
\uplet*{#2}
|
||||
}{
|
||||
\uplet{#2}
|
||||
}
|
||||
}
|
||||
|
||||
%% positional notation
|
||||
%%
|
||||
\newcommand{\base}[2]{
|
||||
\ensuremath{ \overline{#1\vphantom(}^{#2} }
|
||||
}
|
||||
|
||||
%% sets: N, Z, D, Q, R\Q and R with possibility to minus some numbers
|
||||
%%
|
||||
\NewDocumentCommand \R { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
% \mathchoice{\! \mathbb{R} \setminus \{0\} \!}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{0\} }}
|
||||
% {\! \mathbb{R} \setminus \{0\} \!}
|
||||
% {\! \mathbb{R} \setminus \{0\} \!}
|
||||
\ensuremath{\mathbb{R} \setminus \{0\}}
|
||||
}{
|
||||
% \mathchoice{\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{0, #2\} }}
|
||||
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
\ensuremath{\mathbb{R} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
% \mathchoice{\mathbb{R}}
|
||||
% {\ensuremath{ \mathbb{R} }}
|
||||
% {\mathbb{R}}
|
||||
% {\mathbb{R}}
|
||||
\ensuremath{ \mathbb{R} }
|
||||
}{
|
||||
% \mathchoice{\mathbb{R} \setminus \{#2\}}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{#2\} }}
|
||||
% {\mathbb{R} \setminus \{#2\}}
|
||||
% {\mathbb{R} \setminus \{#2\}}
|
||||
\ensuremath{\mathbb{R} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \RQ { } {
|
||||
\( \mathbb{R} \setminus \mathbb{Q} \)
|
||||
}
|
||||
\NewDocumentCommand \Q { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Q} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Q} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Q}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Q} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \D { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{D} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{D} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{D}}
|
||||
}{
|
||||
\ensuremath{\mathbb{D} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \Z { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Z} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Z} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Z}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Z} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \N { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{N}^{*}}
|
||||
}{
|
||||
\ensuremath{\mathbb{N} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{N}}
|
||||
}{
|
||||
\ensuremath{\mathbb{N} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\ProvideDocumentCommand \C { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{C} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{C} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{C}}
|
||||
}{
|
||||
\ensuremath{\mathbb{C} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%% dot product
|
||||
%%
|
||||
\NewDocumentCommand \dotprod{ s g g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\ensuremath{
|
||||
\vec{#2} \cdot \vec{#3}
|
||||
}
|
||||
}{
|
||||
\ensuremath{
|
||||
\overrightarrow{#2\vphantom(} \cdot \overrightarrow{#3\vphantom(}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%% math letter used as curve name
|
||||
%%
|
||||
\NewDocumentCommand \ronde{ G{f} } {
|
||||
\ensuremath{\mathscr{#1}}
|
||||
}
|
||||
|
||||
%% point
|
||||
%%
|
||||
\NewDocumentCommand \point{ G{A} G{0} G{0} } {
|
||||
$ #1\big(#2\ ;\ #3\big) $
|
||||
}
|
||||
|
||||
%% cardinal
|
||||
%%
|
||||
\NewDocumentCommand \card{ G{E} }{
|
||||
\text{Card($ #1 $)}
|
||||
}
|
||||
|
||||
%% print the acronym F.I. for "Forme indéterminée" in bold and sans-serif font.
|
||||
%%
|
||||
\NewDocumentCommand \FI{ } {
|
||||
\textsf{\textbf{F.I.}}
|
||||
}
|
||||
|
||||
%% \nicefrac shortcut
|
||||
%%
|
||||
\NewDocumentCommand \sfrac{ G{1} G{2} } {
|
||||
\nicefrac{#1}{#2}
|
||||
}
|
||||
|
||||
%% limits
|
||||
%%
|
||||
\NewDocumentCommand \limite{ G{f(x)} G{x \to +\infty} }{
|
||||
\ensuremath{\lim\limits_{ #2 } #1}
|
||||
}
|
||||
|
||||
%% exponential
|
||||
%%%
|
||||
\NewDocumentCommand \e{} {
|
||||
\text{e}
|
||||
}
|
||||
|
||||
%%% l
|
||||
%%%
|
||||
%\RenewDocumentCommand \l { } {
|
||||
% \ensuremath{\ell}
|
||||
%}
|
||||
|
||||
%% renewed \bar command
|
||||
%%
|
||||
\NewDocumentCommand \barre { g } {
|
||||
{\overline{\,\mathstrut#1\,}}
|
||||
}
|
||||
\RenewDocumentCommand \bar { g } {
|
||||
{\overline{\,\mathstrut#1\,}}
|
||||
}
|
||||
|
||||
%% Complex numbers
|
||||
%%
|
||||
\NewDocumentCommand \re { G{z} } {
|
||||
\ensuremath{\operatorname{Re}(#1)}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \im { G{z} } {
|
||||
\ensuremath{\operatorname{Im}(#1)}
|
||||
}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
\makeatother
|
||||
@@ -69,6 +69,5 @@
|
||||
|
||||
% Custom packages
|
||||
\usepackage{couleurs} % colors definitions
|
||||
\usepackage{polices} % shortcuts definitions
|
||||
\usepackage{shortcuts} % shortcuts definitions
|
||||
|
||||
|
||||
1604
couleurs.sty
Normal file
1604
couleurs.sty
Normal file
File diff suppressed because it is too large
Load Diff
493
environments.tex
Normal file
493
environments.tex
Normal file
@@ -0,0 +1,493 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% ENVIRONMENTS
|
||||
%
|
||||
%
|
||||
|
||||
% definition
|
||||
\NewDocumentEnvironment{definition}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@def1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@def1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@def2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@def2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@def1}
|
||||
}{
|
||||
\end{@def2}
|
||||
}
|
||||
}
|
||||
|
||||
% theoreme
|
||||
\NewDocumentEnvironment{theoreme}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@thm1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@thm1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@thm2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@thm2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@thm1}
|
||||
}{
|
||||
\end{@thm2}
|
||||
}
|
||||
}
|
||||
|
||||
% corollaire
|
||||
\NewDocumentEnvironment{corollaire}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@coro1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@coro1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@coro2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@coro2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@coro1}
|
||||
}{
|
||||
\end{@coro2}
|
||||
}
|
||||
}
|
||||
|
||||
% propriete
|
||||
\NewDocumentEnvironment{propriete}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@ppt1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@ppt1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@ppt2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@ppt2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@ppt1}
|
||||
}{
|
||||
\end{@ppt2}
|
||||
}
|
||||
}
|
||||
|
||||
% demonstration
|
||||
\NewDocumentEnvironment{demonstration}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@dem1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@dem1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@dem2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@dem2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@dem1}
|
||||
}{
|
||||
\end{@dem2}
|
||||
}
|
||||
}
|
||||
|
||||
% consequence
|
||||
\NewDocumentEnvironment{consequence}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@csq2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@csq2}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@csq1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@csq1}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@csq2}
|
||||
}{
|
||||
\end{@csq1}
|
||||
}
|
||||
}
|
||||
|
||||
% vocabulaire
|
||||
\NewDocumentEnvironment{vocabulaire}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@voc1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@voc1}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: without logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@voc2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@voc2}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@voc1}
|
||||
}{
|
||||
\end{@voc2}
|
||||
}
|
||||
}
|
||||
|
||||
% citation
|
||||
\NewDocumentEnvironment{commentaire}{ o }{
|
||||
\IfNoValueTF {#1} {
|
||||
% if no subtitle
|
||||
\begin{@com}
|
||||
% \vspace{-.5cm}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@com}[#1]
|
||||
|
||||
}
|
||||
}{
|
||||
\end{@com}
|
||||
}
|
||||
|
||||
% remarque
|
||||
\NewDocumentEnvironment{remarque}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@rmq2}
|
||||
% \vspace{-.3cm}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@rmq2}[#2]
|
||||
% \vspace{-.3cm}
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@rmq1}
|
||||
\vspace{-.5cm}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@rmq1}[#2]
|
||||
\vspace{-.5cm}
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@rmq2}
|
||||
}{
|
||||
\end{@rmq1}
|
||||
}
|
||||
}
|
||||
|
||||
% exemple
|
||||
\NewDocumentEnvironment{exemple}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@exe2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@exe2}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@exe1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@exe1}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@exe2}
|
||||
}{
|
||||
\end{@exe1}
|
||||
}
|
||||
}
|
||||
|
||||
% application
|
||||
\NewDocumentEnvironment{application}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without logo and title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@app2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@app2}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@app1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@app1}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@app2}
|
||||
}{
|
||||
\end{@app1}
|
||||
}
|
||||
}
|
||||
|
||||
% methode
|
||||
\NewDocumentEnvironment{methode}{ s o }{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without logo and title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@met2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@met2}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with logo
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{@met1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{@met1}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{@met2}
|
||||
}{
|
||||
\end{@met1}
|
||||
}
|
||||
}
|
||||
|
||||
% Need to adapt the code in order to get numbering and
|
||||
% framing
|
||||
%% application
|
||||
%\NewDocumentEnvironment{application}{ s o o o}{
|
||||
% \IfBooleanTF {#1} {
|
||||
% % if starred: without logo and title
|
||||
% \IfNoValueTF {#2} {
|
||||
% % if no subtitle
|
||||
% \begin{application2}
|
||||
%
|
||||
% }{
|
||||
% % if subtitle
|
||||
% \begin{application2}[#2]
|
||||
%
|
||||
% }
|
||||
% }{
|
||||
% % if not starred: with number
|
||||
% \IfNoValueTF {#2} {
|
||||
% % if no subtitle
|
||||
% \begin{application1}
|
||||
%
|
||||
% }{
|
||||
% % if subtitle
|
||||
% \begin{application1}[#2]
|
||||
%
|
||||
% }
|
||||
% }
|
||||
% }{
|
||||
% \IfBooleanTF {#1} {
|
||||
% \end{application2}
|
||||
% }{
|
||||
% \end{application1}
|
||||
% }
|
||||
% }
|
||||
|
||||
% exercice
|
||||
\NewDocumentEnvironment{exercice}{ s o o o}{
|
||||
\IfBooleanTF {#1} {
|
||||
% if starred: without logo and title
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{exercice2}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{exercice2}[#2]
|
||||
|
||||
}
|
||||
}{
|
||||
% if not starred: with number
|
||||
\IfNoValueTF {#2} {
|
||||
% if no subtitle
|
||||
\begin{exercice1}
|
||||
|
||||
}{
|
||||
% if subtitle
|
||||
\begin{exercice1}[#2]
|
||||
|
||||
}
|
||||
}
|
||||
}{
|
||||
\IfBooleanTF {#1} {
|
||||
\end{exercice2}
|
||||
}{
|
||||
\end{exercice1}
|
||||
}
|
||||
}
|
||||
|
||||
% rappel
|
||||
\NewDocumentEnvironment{rappel}{ o }{
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{bclogo}[logo=\bclivre, noborder=true]{Rappel}
|
||||
}{
|
||||
\begin{bclogo}[logo=\bclivre, noborder=true]{#1}
|
||||
}
|
||||
}{
|
||||
\end{bclogo}
|
||||
}
|
||||
|
||||
% aide
|
||||
\NewDocumentEnvironment{aide}{ o }{
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{bclogo}[logo=\bcaide, noborder=true, barre=motif, motifBarre=$ $]{ }
|
||||
\vspace{-1.1em}\em
|
||||
}{
|
||||
\begin{bclogo}[logo=\bcaide, noborder=true, barre=motif, motifBarre=$ $]{\textnormal{\em #1}}
|
||||
\em
|
||||
}
|
||||
}{
|
||||
\end{bclogo}
|
||||
}
|
||||
|
||||
%% objectif
|
||||
%% Tentative d'environnement utilisant bclogo
|
||||
%\NewDocumentEnvironment{objectif}{ }{
|
||||
% \vspace{1cm}
|
||||
% \begin{center}
|
||||
% \Annie\textbf{Objectif :}
|
||||
%}{
|
||||
% \end{center}
|
||||
% \vspace{1cm}
|
||||
%}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
240
mdframed.tex
Normal file
240
mdframed.tex
Normal file
@@ -0,0 +1,240 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% MDFRAMED
|
||||
%
|
||||
%
|
||||
|
||||
|
||||
%% global options
|
||||
%%
|
||||
\mdfsetup{
|
||||
frametitlealignment=\raggedright,%
|
||||
innerbottommargin=2em,%
|
||||
}
|
||||
|
||||
%% styles
|
||||
%%
|
||||
\tikzset{
|
||||
symbol/.style={
|
||||
rectangle, draw=white,
|
||||
fill=white, scale=1,
|
||||
overlay
|
||||
}
|
||||
}
|
||||
|
||||
% nologo: a standard square frame with thick border and without a logo
|
||||
\mdfdefinestyle{nologo}{%
|
||||
linecolor=black,linewidth=1pt,%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=.5em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
}
|
||||
% noborder: a no border frame
|
||||
\mdfdefinestyle{noborder}{%
|
||||
linecolor=white,linewidth=0pt,%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=.5em,innerbottommargin=.5em,%
|
||||
innerleftmargin=.5em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
xcolor,%
|
||||
}
|
||||
% pencil: a square frame with a pencil icon in upper left corner
|
||||
\mdfdefinestyle{pencil}{%
|
||||
linecolor=black,linewidth=1pt,%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faPencil };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faPencil };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faPencil };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faPencil };
|
||||
},%
|
||||
}
|
||||
% eye: square frame with an eye logo
|
||||
\mdfdefinestyle{eye}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
tikzsetting={draw=black,line width=.5pt},%
|
||||
leftmargin=2pt,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=.75em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=false,%
|
||||
xcolor,%
|
||||
hidealllines=true, leftline=true,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faEye };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faEye };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faEye };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faEye };
|
||||
},%
|
||||
}
|
||||
% comment: frame with no borders but with a beginning quote at upper left and
|
||||
% an ending quote at lower right
|
||||
\mdfdefinestyle{comment}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faQuoteLeft };
|
||||
\path let \p1=(P), \p2=(O) in ($(\x1,.4)+(0,\y2)$)
|
||||
node[symbol] { \faQuoteRight };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faQuoteLeft };
|
||||
\path let \p1=(P), \p2=(O) in ($(\x1,.4)+(0,\y2)$)
|
||||
node[symbol] { \faQuoteRight };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faQuoteLeft };
|
||||
\path let \p1=(P), \p2=(O) in ($(\x1,.4)+(0,\y2)$)
|
||||
node[symbol] { \faQuoteRight };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faQuoteLeft };
|
||||
\path let \p1=(P), \p2=(O) in ($(\x1,.4)+(0,\y2)$)
|
||||
node[symbol] { \faQuoteRight };
|
||||
},%
|
||||
}
|
||||
% cogs: a shadowed square frame with a file text icon at upper left
|
||||
\mdfdefinestyle{cogs}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
tikzsetting={draw=black,line width=1pt},%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
shadow=true,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faCogs };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faCogs };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faCogs };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faCogs };
|
||||
},%
|
||||
}
|
||||
% tips: a shadowed square frame with a light bulb icon at upper left
|
||||
\mdfdefinestyle{tips}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
tikzsetting={draw=black,line width=1pt},%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
hidealllines=true, leftline=true,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faLightbulbO };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faLightbulbO };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faLightbulbO };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faLightbulbO };
|
||||
},%
|
||||
}
|
||||
% bookmark: a shadowed square frame with cogs icon at upper left
|
||||
\mdfdefinestyle{bookmark}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
tikzsetting={draw=black,line width=1pt},%
|
||||
leftmargin=0,rightmargin=0,%
|
||||
innertopmargin=0em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
hidealllines=true, leftline=true,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faBookmarkO };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faBookmarkO };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faBookmarkO };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faBookmarkO };
|
||||
},%
|
||||
}
|
||||
% warn: frame with only left border and warning icon at upper left
|
||||
\mdfdefinestyle{warning}{%
|
||||
linecolor=white,linewidth=1pt,%
|
||||
innerlinewidth=1pt,outerlinewidth=1pt,
|
||||
tikzsetting={draw=black,
|
||||
decorate,
|
||||
decoration={snake, amplitude=.5mm},
|
||||
line width=.5pt},%
|
||||
leftmargin=2pt,rightmargin=0,%
|
||||
innertopmargin=1em,innerbottommargin=1em,%
|
||||
innerleftmargin=1em,innerrightmargin=.5em,%
|
||||
skipabove=0,skipbelow=0,%
|
||||
frametitlerule=false,%
|
||||
frametitlebackgroundcolor=white!0,%
|
||||
nobreak=true,%
|
||||
xcolor,%
|
||||
hidealllines=true, leftline=true,%
|
||||
firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faExclamationTriangle };
|
||||
},%
|
||||
secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faExclamationTriangle };
|
||||
},%
|
||||
middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faExclamationTriangle };
|
||||
},%
|
||||
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
||||
node[symbol] { \faExclamationTriangle };
|
||||
},%
|
||||
}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
380
mdtheorem.tex
Normal file
380
mdtheorem.tex
Normal file
@@ -0,0 +1,380 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% MDTHEOREM
|
||||
%
|
||||
%
|
||||
|
||||
|
||||
%% New theorem declarations and redirection of all standard previously defined
|
||||
%% environments to their starred version as they don't display numbering.
|
||||
%%
|
||||
|
||||
% definition
|
||||
\mdtheorem[style=pencil, theoremseparator={},
|
||||
theoremspace={}, roundcorner=6pt]{@def1}{\Jd Définition}
|
||||
\mdtheorem[style=nologo, theoremseparator={},
|
||||
theoremspace={}, roundcorner=6pt]{@def2}{\Jd Définition}
|
||||
|
||||
\RenewDocumentEnvironment{@def1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@def1*}
|
||||
}{
|
||||
\begin{@def1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@def1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@def2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@def2*}
|
||||
}{
|
||||
\begin{@def2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@def2*}
|
||||
}
|
||||
|
||||
% theoreme
|
||||
\mdtheorem[style=pencil, theoremseparator={},
|
||||
theoremspace={}, roundcorner=6pt,
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@thm1}{\Jd Théorème}
|
||||
\mdtheorem[style=nologo, theoremseparator={},
|
||||
theoremspace={}, roundcorner=6pt,
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@thm2}{\Jd Théorème}
|
||||
|
||||
\RenewDocumentEnvironment{@thm1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@thm1*}
|
||||
}{
|
||||
\begin{@thm1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@thm1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@thm2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@thm2*}
|
||||
}{
|
||||
\begin{@thm2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@thm2*}
|
||||
}
|
||||
|
||||
% coroallaire
|
||||
\mdtheorem[style=pencil, theoremseparator={},
|
||||
theoremspace={}, roundcorner=3pt,
|
||||
outerlinecolor=black]{@coro1}{\Jd Corollaire}
|
||||
\mdtheorem[style=nologo, theoremseparator={},
|
||||
theoremspace={}, roundcorner=3pt,
|
||||
outerlinecolor=black]{@coro2}{\Jd Corollaire}
|
||||
|
||||
\RenewDocumentEnvironment{@coro1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@coro1*}
|
||||
}{
|
||||
\begin{@coro1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@coro1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@coro2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@coro2*}
|
||||
}{
|
||||
\begin{@coro2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@coro2*}
|
||||
}
|
||||
|
||||
% propriete
|
||||
\mdtheorem[style=pencil, theoremseparator={}, theoremspace={},
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@ppt1}{\Jd Propriété}
|
||||
\mdtheorem[style=nologo, theoremseparator={}, theoremspace={},
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@ppt2}{\Jd Propriété}
|
||||
|
||||
\RenewDocumentEnvironment{@ppt1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@ppt1*}
|
||||
}{
|
||||
\begin{@ppt1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@ppt1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@ppt2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@ppt2*}
|
||||
}{
|
||||
\begin{@ppt2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@ppt2*}
|
||||
}
|
||||
|
||||
% demonstration
|
||||
\mdtheorem[style=pencil, theoremseparator={},
|
||||
theoremspace={}]{@dem1}{\Jd Démonstration}
|
||||
\mdtheorem[style=nologo, theoremseparator={},
|
||||
theoremspace={}]{@dem2}{\Jd Démonstration}
|
||||
|
||||
\RenewDocumentEnvironment{@dem1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@dem1*}
|
||||
}{
|
||||
\begin{@dem1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@dem1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@dem2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@dem2*}
|
||||
}{
|
||||
\begin{@dem2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@dem2*}
|
||||
}
|
||||
|
||||
% consequence
|
||||
\mdtheorem[style=nologo, theoremseparator={}, theoremspace={},
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@csq1}{\Jd Conséquence(s)}
|
||||
\mdtheorem[style=nologo, theoremseparator={}, theoremspace={},
|
||||
outerlinewidth=1pt, outerlinecolor=black]{@csq2}{}
|
||||
|
||||
\RenewDocumentEnvironment{@csq1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@csq1*}
|
||||
}{
|
||||
\begin{@csq1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@csq1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@csq2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@csq2*}
|
||||
}{
|
||||
\begin{@csq2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@csq2*}
|
||||
}
|
||||
|
||||
% vocabulaire
|
||||
\mdtheorem[style=noborder, theoremseparator={},
|
||||
theoremspace={}]{@voc1}{\Jd Vocabulaire}
|
||||
\mdtheorem[style=nologo, theoremseparator={},
|
||||
theoremspace={}]{@voc2}{\Jd Vocabulaire}
|
||||
|
||||
\RenewDocumentEnvironment{@voc1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@voc1*}
|
||||
}{
|
||||
\begin{@voc1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@voc1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@voc2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@voc2*}
|
||||
}{
|
||||
\begin{@voc2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@voc2*}
|
||||
}
|
||||
|
||||
% commentaire
|
||||
\mdtheorem[style=comment, frametitle=none,
|
||||
frametitleaboveskip=0em, frametitlebelowskip=0em]{@com}{}
|
||||
|
||||
\RenewDocumentEnvironment{@com}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@com*}
|
||||
}{
|
||||
\begin{@com*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@com*}
|
||||
}
|
||||
|
||||
% remarque
|
||||
\mdtheorem[style=warning, theoremseparator={ -},
|
||||
theoremspace={}]{@rmq1}{\Jd Remarque(s)}
|
||||
\mdtheorem[style=warning, theoremseparator={},
|
||||
theoremspace={}]{@rmq2}{}
|
||||
|
||||
\RenewDocumentEnvironment{@rmq1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@rmq1*}
|
||||
}{
|
||||
\begin{@rmq1*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@rmq1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@rmq2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@rmq2*}
|
||||
}{
|
||||
\begin{@rmq2*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@rmq2*}
|
||||
}
|
||||
|
||||
% exemple
|
||||
\mdtheorem[style=eye, theoremseparator={ -}, theoremspace={}]{@exe1}{\Jd Exemple}
|
||||
\mdtheorem[style=eye, theoremseparator={}, theoremspace={}]{@exe2}{}
|
||||
|
||||
\RenewDocumentEnvironment{@exe1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@exe1*}
|
||||
}{
|
||||
\begin{@exe1*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@exe1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@exe2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@exe2*}
|
||||
}{
|
||||
\begin{@exe2*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@exe2*}
|
||||
}
|
||||
|
||||
% application
|
||||
\mdtheorem[style=cogs, theoremseparator={},
|
||||
theoremspace={}]{@app1}{\Jd Application}
|
||||
\mdtheorem[style=cogs, theoremseparator={},
|
||||
theoremspace={}]{@app2}{}
|
||||
|
||||
\RenewDocumentEnvironment{@app1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@app1*}
|
||||
}{
|
||||
\begin{@app1*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@app1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@app2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@app2*}
|
||||
}{
|
||||
\begin{@app2*}[\hfill{\normalfont\slshape#1}]
|
||||
}
|
||||
}{%end
|
||||
\end{@app2*}
|
||||
}
|
||||
|
||||
% methode
|
||||
\mdtheorem[style=bookmark, theoremseparator={ -},
|
||||
theoremspace={}]{@met1}{\Jd Méthode}
|
||||
\mdtheorem[style=noborder, theoremseparator={},
|
||||
theoremspace={}]{@met2}{}
|
||||
|
||||
\RenewDocumentEnvironment{@met1}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@met1*}
|
||||
}{
|
||||
\begin{@met1*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@met1*}
|
||||
}
|
||||
|
||||
\RenewDocumentEnvironment{@met2}{ o } {%begin
|
||||
\IfNoValueTF {#1} {
|
||||
\begin{@met2*}
|
||||
}{
|
||||
\begin{@met2*}[#1]
|
||||
}
|
||||
}{%end
|
||||
\end{@met2*}
|
||||
}
|
||||
|
||||
% Need to adapt the code in order to get numbering and
|
||||
% framing
|
||||
%% application
|
||||
%\newtheoremstyle{@app1}
|
||||
% {\topsep}% espace avant
|
||||
% {\topsep}% espace apres
|
||||
% {}% Police utilisee par le style de thm
|
||||
% {}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
||||
% {\bfseries}% Police du titre de thm
|
||||
% {}% Signe de ponctuation apres le titre du thm
|
||||
% {\newline}% Espace apres le titre du thm (\newline = linebreak)
|
||||
% {\thmname{#1}\thmnumber{ #2}\thmnote{ - \normalfont{\textit{#3}}}}
|
||||
% % composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre
|
||||
%
|
||||
%\theoremstyle{@app1}
|
||||
%\newtheorem{application1}{\Jd Application}
|
||||
%
|
||||
%% application
|
||||
%\newtheoremstyle{@app2}
|
||||
%{\topsep}% espace avant
|
||||
%{\topsep}% espace apres
|
||||
%{}% Police utilisee par le style de thm
|
||||
%{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
||||
%{\bfseries}% Police du titre de thm
|
||||
%{}% Signe de ponctuation apres le titre du thm
|
||||
%{\newline}% Espace apres le titre du thm (\newline = linebreak)
|
||||
%{\thmname{#1}\thmnote{ - \normalfont{\textit{#2}}}}
|
||||
%% composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre
|
||||
%
|
||||
%\theoremstyle{@app2}
|
||||
%\newtheorem*{application2}{\Jd Application}
|
||||
%
|
||||
%\counterwithin*{application1}{section}
|
||||
|
||||
% exercice
|
||||
\newtheoremstyle{@exo1}
|
||||
{\topsep}% espace avant
|
||||
{\topsep}% espace apres
|
||||
{}% Police utilisee par le style de thm
|
||||
{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
||||
{\bfseries}% Police du titre de thm
|
||||
{}% Signe de ponctuation apres le titre du thm
|
||||
{\newline}% Espace apres le titre du thm (\newline = linebreak)
|
||||
{\thmname{#1}\thmnumber{ #2}\thmnote{ - \normalfont{\textit{#3}}}}
|
||||
% composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre
|
||||
|
||||
\theoremstyle{@exo1}
|
||||
\newtheorem{exercice1}{\Jd Exercice}
|
||||
|
||||
% exercice
|
||||
\newtheoremstyle{@exo2}
|
||||
{\topsep}% espace avant
|
||||
{\topsep}% espace apres
|
||||
{}% Police utilisee par le style de thm
|
||||
{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
||||
{\bfseries}% Police du titre de thm
|
||||
{}% Signe de ponctuation apres le titre du thm
|
||||
{\newline}% Espace apres le titre du thm (\newline = linebreak)
|
||||
{\thmname{#1}\thmnote{ - \normalfont{\textit{#2}}}}
|
||||
% composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre
|
||||
|
||||
\theoremstyle{@exo2}
|
||||
\newtheorem*{exercice2}{\Jd Exercice}
|
||||
|
||||
\counterwithin*{exercice1}{section}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
@@ -13,11 +13,6 @@
|
||||
\ProvidesPackage{polices}[2015/05/03 Définitions de polices d'écriture, v1.0]
|
||||
|
||||
|
||||
%-- DÉFINITION DES COULEURS
|
||||
|
||||
|
||||
|
||||
|
||||
%-- MACROS
|
||||
|
||||
% \newFontCommand{police}
|
||||
@@ -25,15 +20,7 @@
|
||||
% création de la famille de police via luatex n'est pas possible.
|
||||
% Cette macro permet de la police d'écriture spécifiée.
|
||||
\newfontfamily\Jd{j.d.}[
|
||||
Path=_extensions/jd/,
|
||||
Ligatures=TeX
|
||||
Extension = .ttf,
|
||||
UprightFont=*-Regular,
|
||||
BoldFont=*-Bold,
|
||||
ItalicFont=*-Italic,
|
||||
]
|
||||
|
||||
|
||||
|
||||
Ligatures=TeX,
|
||||
]
|
||||
|
||||
|
||||
443
shortcuts.sty
Normal file
443
shortcuts.sty
Normal file
@@ -0,0 +1,443 @@
|
||||
%%%
|
||||
%%%
|
||||
%%% Extensions : shortcuts.sty
|
||||
%%% Version : 1.0
|
||||
%%% Date : 10/05/16
|
||||
%%% Auteur : Jeff LANCE
|
||||
%%% Notes : Cette extension peut demander l'ajout de certains packages.
|
||||
%%% Il est conseillé de l'appeler dans un(e) classe/(package) appelant
|
||||
%%% elle(lui)-même ces packages.
|
||||
%%%
|
||||
%%%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{shortcuts}[2016/05/16 Définitions de raccourcis vers des macros
|
||||
existantes, v1.0]
|
||||
|
||||
|
||||
|
||||
\makeatletter
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% ENVIRONMENTS
|
||||
%
|
||||
%
|
||||
|
||||
%% itemize
|
||||
%%
|
||||
\newcommand{\bi}{\begin{itemize}}
|
||||
\newcommand{\ei}{\end{itemize}}
|
||||
|
||||
%% enumerate
|
||||
%%
|
||||
\newcommand{\be}{\begin{enumerate}}
|
||||
\newcommand{\ee}{\end{enumerate}}
|
||||
|
||||
%% descriptions
|
||||
%%
|
||||
\newcommand{\bd}{\begin{description}}
|
||||
\newcommand{\ed}{\end{description}}
|
||||
|
||||
%% columns
|
||||
%%
|
||||
\newcommand{\bc}{\begin{columns}}
|
||||
\newcommand{\ec}{\end{columns}}
|
||||
|
||||
%% questions
|
||||
%%
|
||||
\newcommand{\bq}{\begin{questions}}
|
||||
\newcommand{\eq}{\end{questions}}
|
||||
|
||||
%% tasks
|
||||
%%
|
||||
\newcommand{\bt}{\begin{tasks}}
|
||||
\newcommand{\et}{\end{tasks}}
|
||||
|
||||
%% minipage
|
||||
%%
|
||||
% \newcommand{\bm}{\begin{minipage}}
|
||||
% \newcommand{\em}{\end{minipage}}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% TEXT
|
||||
%
|
||||
%
|
||||
|
||||
%% positive skip.
|
||||
%%
|
||||
\NewDocumentCommand \pskip { G{.2} } {%
|
||||
\vspace*{+#1cm}
|
||||
}
|
||||
|
||||
%% negative skip.
|
||||
%%
|
||||
\NewDocumentCommand \nskip { G{.8} } {%
|
||||
\vspace*{-#1cm}
|
||||
}
|
||||
|
||||
%% another shortcut to whiting text.
|
||||
%%
|
||||
\NewDocumentCommand \ghost { } {%
|
||||
\white
|
||||
}
|
||||
|
||||
%% c'est-à-dire
|
||||
%%
|
||||
\NewDocumentCommand \cad { } {
|
||||
{c'est-à-dire}
|
||||
}
|
||||
\NewDocumentCommand \Cad { } {
|
||||
{C'est-à-dire}
|
||||
}
|
||||
|
||||
%% textsuperscript and textsubscript
|
||||
%%
|
||||
\NewDocumentCommand \up { g } {
|
||||
\textsuperscript{#1}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \ub { g } {
|
||||
\textsubscript{#1}
|
||||
}
|
||||
|
||||
%% smileys
|
||||
%%
|
||||
\NewDocumentCommand \wink { } {
|
||||
{\DejaVuSans 😉}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \lol { } {
|
||||
{\DejaVuSans 😂}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \sad { } {
|
||||
{\DejaVuSans 😞}
|
||||
}
|
||||
|
||||
% double quoting
|
||||
%%
|
||||
\providecommand{\og}{
|
||||
<<
|
||||
}
|
||||
\providecommand{\fg}{
|
||||
>>
|
||||
}
|
||||
|
||||
% column sep rule
|
||||
%%
|
||||
\NewDocumentCommand \filet { G{0} } {
|
||||
\setlength{\columnseprule}{#1}
|
||||
}
|
||||
|
||||
% \num shortcut
|
||||
%%
|
||||
\NewDocumentCommand \n { g } {
|
||||
\num{#1}
|
||||
}
|
||||
|
||||
% point médian
|
||||
%%
|
||||
\def\cdt{\kern-0.pt\ensuremath\cdot\kern-0.5pt}
|
||||
|
||||
% fonts
|
||||
%%
|
||||
\newfontfamily\Jd{j.d.}[
|
||||
Ligatures=TeX,
|
||||
]
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
%
|
||||
% MATHS
|
||||
%
|
||||
%
|
||||
|
||||
%% i, j & k vectors
|
||||
%%
|
||||
\NewDocumentCommand \veci { } {
|
||||
\ensuremath{ \vec{\imath} }
|
||||
}
|
||||
\NewDocumentCommand \vecj { } {
|
||||
\ensuremath{ \vec{\jmath} }
|
||||
}
|
||||
\NewDocumentCommand \veck { } {
|
||||
\ensuremath{ \vec{k} }
|
||||
}
|
||||
|
||||
%% basis (i,j)
|
||||
%%
|
||||
\RenewDocumentCommand \ij { } {
|
||||
\ensuremath{ \left(\vec{\imath}\: ;\: \vec{\jmath}\right) }
|
||||
}
|
||||
|
||||
%% basis (i,j,k)
|
||||
%%
|
||||
\NewDocumentCommand \ijk { } {
|
||||
\ensuremath{ \left(\vec{\imath}\: ;\: \vec{\jmath}\: ;\: \vec{k}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;i;j)
|
||||
%%
|
||||
\NewDocumentCommand \oij { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{\imath}\: ;\: \vec{\jmath}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;i;j;k)
|
||||
%%
|
||||
\NewDocumentCommand \oijk { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{\imath}\: ;\: \vec{\jmath}\: ;\: \vec{k}\right) }
|
||||
}
|
||||
|
||||
%% frame (O;I;I)
|
||||
%%
|
||||
\NewDocumentCommand \OIJ { } {
|
||||
\ensuremath{ \left(O\: ;\: I\: ;\: J\right) }
|
||||
}
|
||||
|
||||
%% frame (O;x;y)
|
||||
%%
|
||||
\NewDocumentCommand \oxy { } {
|
||||
\ensuremath{ \left(O\: ;\: x\: ;\: y\right) }
|
||||
}
|
||||
|
||||
%% frame (O;u;v)
|
||||
%%
|
||||
\NewDocumentCommand \ouv { } {
|
||||
\ensuremath{ \left(O\: ;\: \vec{u}\: ;\: \vec{v}\right) }
|
||||
}
|
||||
|
||||
%% vector arrow redefinition
|
||||
%%
|
||||
\renewcommand{\vec}[1]{
|
||||
\ensuremath{ \overrightarrow{\, \mathstrut#1 \,} }
|
||||
}
|
||||
|
||||
% \renewcommand{\vec}[1]{
|
||||
% \ensuremath{ \overrightarrow{#1\vphantom(} }
|
||||
% }
|
||||
|
||||
%% coordinates
|
||||
%%
|
||||
\NewDocumentCommand \coord { s m }{
|
||||
\IfBooleanTF { #1 } {
|
||||
\uplet*{#2}
|
||||
}{
|
||||
\uplet{#2}
|
||||
}
|
||||
}
|
||||
|
||||
%% positional notation
|
||||
%%
|
||||
\newcommand{\base}[2]{
|
||||
\ensuremath{ \overline{#1\vphantom(}^{#2} }
|
||||
}
|
||||
|
||||
%% sets: N, Z, D, Q, R\Q and R with possibility to minus some numbers
|
||||
%%
|
||||
\NewDocumentCommand \R { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
% \mathchoice{\! \mathbb{R} \setminus \{0\} \!}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{0\} }}
|
||||
% {\! \mathbb{R} \setminus \{0\} \!}
|
||||
% {\! \mathbb{R} \setminus \{0\} \!}
|
||||
\ensuremath{\mathbb{R} \setminus \{0\}}
|
||||
}{
|
||||
% \mathchoice{\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{0, #2\} }}
|
||||
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
||||
\ensuremath{\mathbb{R} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
% \mathchoice{\mathbb{R}}
|
||||
% {\ensuremath{ \mathbb{R} }}
|
||||
% {\mathbb{R}}
|
||||
% {\mathbb{R}}
|
||||
\ensuremath{ \mathbb{R} }
|
||||
}{
|
||||
% \mathchoice{\mathbb{R} \setminus \{#2\}}
|
||||
% {\ensuremath{ \mathbb{R} \setminus \{#2\} }}
|
||||
% {\mathbb{R} \setminus \{#2\}}
|
||||
% {\mathbb{R} \setminus \{#2\}}
|
||||
\ensuremath{\mathbb{R} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \RQ { } {
|
||||
\( \mathbb{R} \setminus \mathbb{Q} \)
|
||||
}
|
||||
\NewDocumentCommand \Q { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Q} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Q} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Q}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Q} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \D { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{D} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{D} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{D}}
|
||||
}{
|
||||
\ensuremath{\mathbb{D} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \Z { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Z} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Z} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{Z}}
|
||||
}{
|
||||
\ensuremath{\mathbb{Z} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\NewDocumentCommand \N { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{N}^{*}}
|
||||
}{
|
||||
\ensuremath{\mathbb{N} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{N}}
|
||||
}{
|
||||
\ensuremath{\mathbb{N} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
\ProvideDocumentCommand \C { s g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{C} \setminus \{0\}}
|
||||
}{
|
||||
\ensuremath{\mathbb{C} \setminus \{0, #2\}}
|
||||
}
|
||||
}{
|
||||
\IfNoValueTF {#2} {
|
||||
\ensuremath{\mathbb{C}}
|
||||
}{
|
||||
\ensuremath{\mathbb{C} \setminus \{#2\}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%% dot product
|
||||
%%
|
||||
\NewDocumentCommand \dotprod{ s g g } {
|
||||
\IfBooleanTF {#1} {
|
||||
\ensuremath{
|
||||
\vec{#2} \cdot \vec{#3}
|
||||
}
|
||||
}{
|
||||
\ensuremath{
|
||||
\overrightarrow{#2\vphantom(} \cdot \overrightarrow{#3\vphantom(}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%% math letter used as curve name
|
||||
%%
|
||||
\NewDocumentCommand \ronde{ G{f} } {
|
||||
\ensuremath{\mathscr{#1}}
|
||||
}
|
||||
|
||||
%% point
|
||||
%%
|
||||
\NewDocumentCommand \point{ G{A} G{0} G{0} } {
|
||||
$ #1\big(#2\ ;\ #3\big) $
|
||||
}
|
||||
|
||||
%% cardinal
|
||||
%%
|
||||
\NewDocumentCommand \card{ G{E} }{
|
||||
\text{Card($ #1 $)}
|
||||
}
|
||||
|
||||
%% print the acronym F.I. for "Forme indéterminée" in bold and sans-serif font.
|
||||
%%
|
||||
\NewDocumentCommand \FI{ } {
|
||||
\textsf{\textbf{F.I.}}
|
||||
}
|
||||
|
||||
%% \nicefrac shortcut
|
||||
%%
|
||||
\NewDocumentCommand \sfrac{ G{1} G{2} } {
|
||||
\nicefrac{#1}{#2}
|
||||
}
|
||||
|
||||
%% limits
|
||||
%%
|
||||
\NewDocumentCommand \limite{ G{f(x)} G{x \to +\infty} }{
|
||||
\ensuremath{\lim\limits_{ #2 } #1}
|
||||
}
|
||||
|
||||
%% exponential
|
||||
%%%
|
||||
\NewDocumentCommand \e{} {
|
||||
\text{e}
|
||||
}
|
||||
|
||||
%%% l
|
||||
%%%
|
||||
%\RenewDocumentCommand \l { } {
|
||||
% \ensuremath{\ell}
|
||||
%}
|
||||
|
||||
%% renewed \bar command
|
||||
%%
|
||||
\NewDocumentCommand \barre { g } {
|
||||
{\overline{\,\mathstrut#1\,}}
|
||||
}
|
||||
\RenewDocumentCommand \bar { g } {
|
||||
{\overline{\,\mathstrut#1\,}}
|
||||
}
|
||||
|
||||
%% Complex numbers
|
||||
%%
|
||||
\NewDocumentCommand \re { G{z} } {
|
||||
\ensuremath{\operatorname{Re}(#1)}
|
||||
}
|
||||
|
||||
\NewDocumentCommand \im { G{z} } {
|
||||
\ensuremath{\operatorname{Im}(#1)}
|
||||
}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
\makeatother
|
||||
BIN
template.pdf
Normal file
BIN
template.pdf
Normal file
Binary file not shown.
41
template.qmd
41
template.qmd
@@ -3,7 +3,9 @@ title: "Template Quarto"
|
||||
subtitle: "pour mes documents"
|
||||
type-document:
|
||||
cours: true
|
||||
format: cours-pdf
|
||||
format:
|
||||
cours-pdf:
|
||||
toc: false
|
||||
author: Jeff LANCE
|
||||
date: last-modified
|
||||
---
|
||||
@@ -31,7 +33,7 @@ Ce document est un exemple d'usage de ce template.
|
||||
|
||||
\begin{center}
|
||||
\begin{tblr}{
|
||||
colspec={Q[red9,l]cccQ[green9,r]},
|
||||
colspec={Q[red9,l]Q[c,capri,3cm]ccQ[green9,r]},
|
||||
hlines, vlines
|
||||
}
|
||||
cell 1-1 & cell 1-2 & cell 1-3 & cell 1-4 & cell 1-5 \\
|
||||
@@ -41,7 +43,9 @@ Ce document est un exemple d'usage de ce template.
|
||||
|
||||
# Besoin de sauter une page
|
||||
|
||||
\lipsum
|
||||
:::{.center}
|
||||
Blabla.
|
||||
:::
|
||||
|
||||
# Test des couleurs
|
||||
|
||||
@@ -49,10 +53,37 @@ Test : \textcolor{crimsonglory}{Ce texte est en `crimsonglory`}. Ici en normal.
|
||||
|
||||
# Test des environnements
|
||||
|
||||
\begin{definition}
|
||||
Ceci est un test
|
||||
\begin{definition}[sous-titre]
|
||||
Ceci est une définition.
|
||||
\end{definition}
|
||||
|
||||
\begin{definition}*[\textcolor{amber}{sous-titre}]
|
||||
Ceci est un définition.
|
||||
\end{definition}
|
||||
|
||||
[En utilisant]{.tanColor} l'extension `latex-environment`.\
|
||||
:::
|
||||
|
||||
:::{.definition options="nouveau"}
|
||||
Ceci est encore une définition.
|
||||
:::
|
||||
|
||||
\begin{propriete}[sous-titre]
|
||||
Ceci est une propriété.
|
||||
\end{propriete}
|
||||
|
||||
\begin{propriete}*[\textcolor{brickred}{sous-titre}]
|
||||
Ceci est un propriété.
|
||||
\end{propriete}
|
||||
|
||||
\begin{theoreme}[sous-titre]
|
||||
Ceci est une théorème.
|
||||
\end{theoreme}
|
||||
|
||||
\begin{theoreme}*[\textcolor{columbiablue}{\textbf{sous-titre}}]
|
||||
Ceci est un théorème.
|
||||
\end{theoreme}
|
||||
|
||||
# More Information
|
||||
|
||||
You can learn more about controlling the appearance of PDF output here: <https://quarto.org/docs/output-formats/pdf-basics.html>
|
||||
|
||||
Reference in New Issue
Block a user