From a752a525c98bcd62ec34005c7010bc5857ec6b47 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Sat, 2 Nov 2019 10:55:10 +0100 Subject: [PATCH] Add vertical spaces commands and column shortcut --- shortcuts/shortcuts.sty | 47 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/shortcuts/shortcuts.sty b/shortcuts/shortcuts.sty index c4f1548..7aee5e1 100644 --- a/shortcuts/shortcuts.sty +++ b/shortcuts/shortcuts.sty @@ -42,6 +42,11 @@ \newcommand{\bd}{\begin{description}} \newcommand{\ed}{\end{description}} +%% columns +%% +\newcommand{\bc}{\begin{columns}} +\newcommand{\ec}{\end{columns}} + %% questions %% \newcommand{\bq}{\begin{questions}} @@ -57,6 +62,18 @@ % % +%% positive skip. +%% +\NewDocumentCommand \pskip { G{.2} } {% + \vspace{+#1cm} +} + +%% negative skip. +%% +\NewDocumentCommand \nskip { G{.8} } {% + \vspace{-#1cm} +} + %% another shortcut to whiting text. %% \NewDocumentCommand \ghost { } {% @@ -150,14 +167,30 @@ \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} { - \!\!\!\!\ensuremath{\mathbb{R}}\!\!\! +% \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\}}\!\!\! } } @@ -239,6 +272,18 @@ } } } + +% math letter used as curve name +% +\NewDocumentCommand \mscr{ g } { + $ \mathscr{#1} $ +} + +% point +% +\NewDocumentCommand \point{ G{A} G{0} G{0} } { + $ #1\big(#2\ ;\ #3\big) $ +} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%