From d88055f74e1704eb1d33ac0cbad87215a9df74e6 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Wed, 23 Sep 2020 20:39:21 +0200 Subject: [PATCH] Up ! --- commun/commun.sty | 8 +++++++ shortcuts/shortcuts.sty | 51 +++++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/commun/commun.sty b/commun/commun.sty index 026b140..616be23 100644 --- a/commun/commun.sty +++ b/commun/commun.sty @@ -118,6 +118,8 @@ \RequirePackage{tasks} \RequirePackage{dashrule} \RequirePackage{qrcode} +\RequirePackage{verse} +\RequirePackage{nicefrac} %-- @@ -198,6 +200,12 @@ % % +% \attrib +% Set author, source and date for a text +\newcommand{\attrib}[1]{ + \nopagebreak{\raggedleft\footnotesize #1\par} +} + % \hcancel[color][size]{text} % Strike text with a color and a defined thickness. \newcommand\hcancel[2][black]{ diff --git a/shortcuts/shortcuts.sty b/shortcuts/shortcuts.sty index 9769466..d12f416 100644 --- a/shortcuts/shortcuts.sty +++ b/shortcuts/shortcuts.sty @@ -225,45 +225,45 @@ \NewDocumentCommand \Q { s g } { \IfBooleanTF {#1} { \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{Q} \setminus \{0\} \!\!} + \ensuremath{\mathbb{Q} \setminus \{0\}} }{ - \ensuremath{\!\!\! \mathbb{Q} \setminus \{0, #2\} \!\!} + \ensuremath{\mathbb{Q} \setminus \{0, #2\}} } }{ \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{Q} \!\!} + \ensuremath{\mathbb{Q}} }{ - \ensuremath{\!\!\! \mathbb{Q} \setminus \{#2\} \!\!} + \ensuremath{\mathbb{Q} \setminus \{#2\}} } } } \NewDocumentCommand \D { s g } { \IfBooleanTF {#1} { \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{D} \setminus \{0\} \!\!} + \ensuremath{\mathbb{D} \setminus \{0\}} }{ - \ensuremath{\!\!\! \mathbb{D} \setminus \{0, #2\} \!\!} + \ensuremath{\mathbb{D} \setminus \{0, #2\}} } }{ \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{D} \!\!} + \ensuremath{\mathbb{D}} }{ - \ensuremath{\!\!\! \mathbb{D} \setminus \{#2\} \!\!} + \ensuremath{\mathbb{D} \setminus \{#2\}} } } } \NewDocumentCommand \Z { s g } { \IfBooleanTF {#1} { \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{Z} \setminus \{0\} \!\!} + \ensuremath{\mathbb{Z} \setminus \{0\}} }{ - \ensuremath{\!\!\! \mathbb{Z} \setminus \{0, #2\} \!\!} + \ensuremath{\mathbb{Z} \setminus \{0, #2\}} } }{ \IfNoValueTF {#2} { - \ensuremath{\!\!\! \mathbb{Z} \!\!} + \ensuremath{\mathbb{Z}} }{ - \ensuremath{\!\!\! \mathbb{Z} \setminus \{#2\} \!\!} + \ensuremath{\mathbb{Z} \setminus \{#2\}} } } } @@ -282,6 +282,21 @@ } } } +\NewDocumentCommand \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 %% @@ -309,11 +324,23 @@ $ #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} +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%