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