2017-02-17 15:06:56 +00:00
|
|
|
%%%
|
2016-05-10 21:16:20 +00:00
|
|
|
%%%
|
2017-03-19 15:27:16 +00:00
|
|
|
%%% Extensions : shortcuts.sty
|
2016-05-10 21:16:20 +00:00
|
|
|
%%% Version : 1.0
|
|
|
|
%%% Date : 10/05/16
|
|
|
|
%%% Auteur : Jeff LANCE
|
2016-05-28 21:33:38 +00:00
|
|
|
%%% Notes : Cette extension peut demander l'ajout de certains packages.
|
|
|
|
%%% Il est conseillé de l'appeler dans un(e) classe/(package) appelant
|
2016-08-11 16:07:45 +00:00
|
|
|
%%% elle(lui)-même ces packages.
|
2016-05-10 21:16:20 +00:00
|
|
|
%%%
|
|
|
|
%%%
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2017-03-19 15:22:05 +00:00
|
|
|
\ProvidesPackage{shortcuts}[2016/05/16 Définitions de raccourcis vers des macros
|
|
|
|
existantes, v1.0]
|
2016-05-10 21:16:20 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
|
|
|
|
|
2017-02-17 14:09:27 +00:00
|
|
|
\makeatletter
|
2016-05-10 21:16:20 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-10-04 20:32:37 +00:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% ENVIRONMENTS
|
|
|
|
%
|
|
|
|
%
|
2018-11-04 09:16:13 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% itemize
|
|
|
|
%%
|
2016-05-10 21:16:20 +00:00
|
|
|
\newcommand{\bi}{\begin{itemize}}
|
|
|
|
\newcommand{\ei}{\end{itemize}}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% enumerate
|
|
|
|
%%
|
2016-05-10 21:16:20 +00:00
|
|
|
\newcommand{\be}{\begin{enumerate}}
|
|
|
|
\newcommand{\ee}{\end{enumerate}}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% descriptions
|
|
|
|
%%
|
2016-09-14 22:12:20 +00:00
|
|
|
\newcommand{\bd}{\begin{description}}
|
|
|
|
\newcommand{\ed}{\end{description}}
|
|
|
|
|
2019-11-12 20:38:21 +00:00
|
|
|
%% columns
|
2019-11-02 09:55:10 +00:00
|
|
|
%%
|
|
|
|
\newcommand{\bc}{\begin{columns}}
|
|
|
|
\newcommand{\ec}{\end{columns}}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% questions
|
|
|
|
%%
|
2016-05-10 21:16:20 +00:00
|
|
|
\newcommand{\bq}{\begin{questions}}
|
|
|
|
\newcommand{\eq}{\end{questions}}
|
2020-06-21 20:42:38 +00:00
|
|
|
|
|
|
|
%% tasks
|
|
|
|
%%
|
2020-08-20 15:19:11 +00:00
|
|
|
\newcommand{\bt}{\begin{tasks}}
|
|
|
|
\newcommand{\et}{\end{tasks}}
|
2019-05-23 18:31:21 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2016-05-28 21:20:44 +00:00
|
|
|
|
|
|
|
|
2016-05-28 21:33:38 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-10-04 20:32:37 +00:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% TEXT
|
|
|
|
%
|
|
|
|
%
|
2018-11-04 09:16:13 +00:00
|
|
|
|
2019-11-02 09:55:10 +00:00
|
|
|
%% positive skip.
|
|
|
|
%%
|
|
|
|
\NewDocumentCommand \pskip { G{.2} } {%
|
2019-11-17 18:15:17 +00:00
|
|
|
\vspace*{+#1cm}
|
2019-11-02 09:55:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
%% negative skip.
|
|
|
|
%%
|
|
|
|
\NewDocumentCommand \nskip { G{.8} } {%
|
2019-11-17 18:15:17 +00:00
|
|
|
\vspace*{-#1cm}
|
2019-11-02 09:55:10 +00:00
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% another shortcut to whiting text.
|
|
|
|
%%
|
2017-03-18 21:41:47 +00:00
|
|
|
\NewDocumentCommand \ghost { } {%
|
|
|
|
\white
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% c'est-à-dire
|
|
|
|
%%
|
2016-08-11 16:20:46 +00:00
|
|
|
\NewDocumentCommand \cad { } {
|
|
|
|
{c'est-à-dire}
|
|
|
|
}
|
2016-08-19 14:56:15 +00:00
|
|
|
\NewDocumentCommand \Cad { } {
|
|
|
|
{C'est-à-dire}
|
|
|
|
}
|
2016-08-11 16:20:46 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% textsuperscript and textsubscript
|
|
|
|
%%
|
2020-06-21 20:42:38 +00:00
|
|
|
\NewDocumentCommand \tup { g } {
|
2019-05-23 11:14:19 +00:00
|
|
|
\textsuperscript{#1}
|
|
|
|
}
|
|
|
|
|
|
|
|
\NewDocumentCommand \tub { g } {
|
|
|
|
\textsubscript{#1}
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% smileys
|
|
|
|
%%
|
2018-10-20 06:56:57 +00:00
|
|
|
\NewDocumentCommand \wink { } {
|
|
|
|
{\DejaVuSans 😉}
|
|
|
|
}
|
|
|
|
|
|
|
|
\NewDocumentCommand \lol { } {
|
|
|
|
{\DejaVuSans 😂}
|
|
|
|
}
|
|
|
|
|
|
|
|
\NewDocumentCommand \sad { } {
|
|
|
|
{\DejaVuSans 😞}
|
|
|
|
}
|
2019-11-12 20:40:17 +00:00
|
|
|
|
|
|
|
% double quoting
|
|
|
|
%%
|
|
|
|
\NewDocumentCommand \og { }{
|
|
|
|
<<
|
|
|
|
}
|
2019-11-20 17:39:01 +00:00
|
|
|
\NewDocumentCommand \fg { }{
|
2019-11-12 20:40:17 +00:00
|
|
|
>>
|
|
|
|
}
|
2019-05-23 18:31:21 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-10-20 06:56:57 +00:00
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2018-10-04 20:32:37 +00:00
|
|
|
%
|
|
|
|
%
|
|
|
|
% MATHS
|
|
|
|
%
|
|
|
|
%
|
2018-11-04 09:16:13 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% i & j vectors
|
|
|
|
%%
|
2016-05-28 21:20:44 +00:00
|
|
|
\NewDocumentCommand \veci { } {
|
2017-05-12 19:22:03 +00:00
|
|
|
\ensuremath{ \vec{\imath} }
|
2016-05-28 21:20:44 +00:00
|
|
|
}
|
|
|
|
\NewDocumentCommand \vecj { } {
|
2017-05-12 19:22:03 +00:00
|
|
|
\ensuremath{ \vec{\jmath} }
|
2016-05-28 21:20:44 +00:00
|
|
|
}
|
2016-08-11 16:07:45 +00:00
|
|
|
|
2020-04-29 19:49:48 +00:00
|
|
|
%% basis (i,j)
|
|
|
|
%%
|
|
|
|
\RenewDocumentCommand \ij { } {
|
|
|
|
\ensuremath{ \left(\vec{\imath}\; ;\; \vec{\jmath}\right) }
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% frame (O;i;j)
|
|
|
|
%%
|
2018-10-04 20:32:37 +00:00
|
|
|
\NewDocumentCommand \oij { } {
|
|
|
|
\ensuremath{ \left(O\; ;\; \vec{\imath}\; ;\; \vec{\jmath}\right) }
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% frame (O;I;I)
|
|
|
|
%%
|
2018-10-04 20:32:37 +00:00
|
|
|
\NewDocumentCommand \OIJ { } {
|
|
|
|
\ensuremath{ \left(O\; ;\; I\; ;\; J\right) }
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% frame (O;x;y)
|
|
|
|
%%
|
2018-10-16 21:08:59 +00:00
|
|
|
\NewDocumentCommand \oxy { } {
|
|
|
|
\ensuremath{ \left(O\; ;\; x\; ;\; y\right) }
|
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% vector arrow redefinition
|
|
|
|
%%
|
2018-10-04 20:32:37 +00:00
|
|
|
\renewcommand{\Vec}[1]{
|
2020-04-29 19:49:48 +00:00
|
|
|
\ensuremath{ \overrightarrow{#1\vphantom(} }
|
|
|
|
}
|
|
|
|
|
|
|
|
\renewcommand{\vec}[1]{
|
|
|
|
\ensuremath{ \overrightarrow{#1\vphantom(} }
|
2018-10-04 20:32:37 +00:00
|
|
|
}
|
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% positional notation
|
|
|
|
%%
|
2018-10-04 20:32:37 +00:00
|
|
|
\newcommand{\base}[2]{
|
|
|
|
\ensuremath{ \overline{#1\vphantom(}^{#2} }
|
|
|
|
}
|
2018-09-25 04:42:35 +00:00
|
|
|
|
2019-05-23 18:31:21 +00:00
|
|
|
%% sets: N, Z, D, Q, R\Q and R with possibility to minus some numbers
|
|
|
|
%%
|
2016-08-16 11:17:38 +00:00
|
|
|
\NewDocumentCommand \R { s g } {
|
2016-08-14 22:26:16 +00:00
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\IfNoValueTF {#2} {
|
2019-11-02 09:55:10 +00:00
|
|
|
% \mathchoice{\! \mathbb{R} \setminus \{0\} \!}
|
|
|
|
% {\ensuremath{ \mathbb{R} \setminus \{0\} }}
|
|
|
|
% {\! \mathbb{R} \setminus \{0\} \!}
|
|
|
|
% {\! \mathbb{R} \setminus \{0\} \!}
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{R} \setminus \{0\}}
|
2016-08-14 22:26:16 +00:00
|
|
|
}{
|
2019-11-02 09:55:10 +00:00
|
|
|
% \mathchoice{\! \mathbb{R} \setminus \{0, #2\} \!}
|
|
|
|
% {\ensuremath{ \mathbb{R} \setminus \{0, #2\} }}
|
|
|
|
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
|
|
|
% {\! \mathbb{R} \setminus \{0, #2\} \!}
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{R} \setminus \{0, #2\}}
|
2016-08-14 22:26:16 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
\IfNoValueTF {#2} {
|
2019-11-02 09:55:10 +00:00
|
|
|
% \mathchoice{\mathbb{R}}
|
|
|
|
% {\ensuremath{ \mathbb{R} }}
|
|
|
|
% {\mathbb{R}}
|
|
|
|
% {\mathbb{R}}
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{ \mathbb{R} }
|
2016-08-14 22:26:16 +00:00
|
|
|
}{
|
2019-11-02 09:55:10 +00:00
|
|
|
% \mathchoice{\mathbb{R} \setminus \{#2\}}
|
|
|
|
% {\ensuremath{ \mathbb{R} \setminus \{#2\} }}
|
|
|
|
% {\mathbb{R} \setminus \{#2\}}
|
|
|
|
% {\mathbb{R} \setminus \{#2\}}
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{R} \setminus \{#2\}}
|
2016-08-14 22:26:16 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-11 22:23:22 +00:00
|
|
|
}
|
|
|
|
\NewDocumentCommand \RQ { } {
|
2016-08-16 11:14:07 +00:00
|
|
|
\( \mathbb{R} \setminus \mathbb{Q} \)
|
2016-08-11 22:23:22 +00:00
|
|
|
}
|
2016-08-16 11:14:07 +00:00
|
|
|
\NewDocumentCommand \Q { s g } {
|
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Q} \setminus \{0\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Q} \setminus \{0, #2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Q} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Q} \setminus \{#2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-11 22:23:22 +00:00
|
|
|
}
|
2016-08-16 11:14:07 +00:00
|
|
|
\NewDocumentCommand \D { s g } {
|
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{D} \setminus \{0\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{D} \setminus \{0, #2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{D} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{D} \setminus \{#2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-11 22:23:22 +00:00
|
|
|
}
|
2016-08-16 11:14:07 +00:00
|
|
|
\NewDocumentCommand \Z { s g } {
|
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Z} \setminus \{0\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Z} \setminus \{0, #2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
\IfNoValueTF {#2} {
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Z} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2016-09-29 20:02:27 +00:00
|
|
|
\ensuremath{\!\!\! \mathbb{Z} \setminus \{#2\} \!\!}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-11 22:23:22 +00:00
|
|
|
}
|
2016-08-16 11:14:07 +00:00
|
|
|
\NewDocumentCommand \N { s g } {
|
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\IfNoValueTF {#2} {
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{N} \setminus \{0\}}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{N} \setminus \{0, #2\}}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}{
|
|
|
|
\IfNoValueTF {#2} {
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{N}}
|
2016-08-16 11:14:07 +00:00
|
|
|
}{
|
2020-08-20 15:19:11 +00:00
|
|
|
\ensuremath{\mathbb{N} \setminus \{#2\}}
|
2016-08-16 11:14:07 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-11 16:07:45 +00:00
|
|
|
}
|
2019-05-23 20:21:50 +00:00
|
|
|
|
|
|
|
%% dot product
|
|
|
|
%%
|
|
|
|
\NewDocumentCommand \dotprod{ s g g } {
|
|
|
|
\IfBooleanTF {#1} {
|
|
|
|
\ensuremath{
|
|
|
|
\vec{#2} \cdot \vec{#3}
|
|
|
|
}
|
|
|
|
}{
|
|
|
|
\ensuremath{
|
|
|
|
\overrightarrow{#1\vphantom(} \cdot \overrightarrow{#2\vphantom(}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-02 09:55:10 +00:00
|
|
|
|
2019-11-12 20:38:21 +00:00
|
|
|
%% math letter used as curve name
|
|
|
|
%%
|
2019-11-17 22:56:12 +00:00
|
|
|
\NewDocumentCommand \mscr{ G{f} } {
|
2019-11-02 09:55:10 +00:00
|
|
|
$ \mathscr{#1} $
|
|
|
|
}
|
|
|
|
|
2019-11-12 20:38:21 +00:00
|
|
|
%% point
|
|
|
|
%%
|
2019-11-02 09:55:10 +00:00
|
|
|
\NewDocumentCommand \point{ G{A} G{0} G{0} } {
|
|
|
|
$ #1\big(#2\ ;\ #3\big) $
|
|
|
|
}
|
2020-08-13 11:31:46 +00:00
|
|
|
|
|
|
|
%% print the acronym F.I. for "Forme indéterminée" in bold and sans-serif font.
|
|
|
|
%%
|
|
|
|
\NewDocumentCommand \FI{ } {
|
|
|
|
\textsf{\textbf{F.I.}}
|
|
|
|
}
|
2019-05-23 18:31:21 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
2017-03-02 20:58:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-17 14:09:27 +00:00
|
|
|
\makeatother
|