summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2022-01-28 12:11:35 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2022-01-28 12:11:35 -0500
commitcf2cee3a80b8f1e7030d12649f9e82c68d2cd264 (patch)
tree58db8e52b89588ff386f027fc0012676991ac14f
parentc46a71c344026dbcc53710f9c1e4a672348c4246 (diff)
Update README to mention custom macros
-rw-r--r--README.md4
-rw-r--r--macros/math.sty24
2 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index c9995ec..9bee2eb 100644
--- a/README.md
+++ b/README.md
@@ -44,3 +44,7 @@ rédaction aux études supérieures de la faculté. Afin d'en rendre son accès
facile, je l'ai inclus dans le repo (`Protocole_Redaction_ESup.pdf`). S.V.P.
faites une PR si je m'avère à être dans le tort dans ce gabarit. PAS DE ISSUES!
S'il y a un problème, ayez une solution avant de m'en parler.
+
+Au cours du temps, il y a des macros que je me suis faites que j'utilise
+souvent. J'ai donc inclu un dossier macros qui contient toutes sorte de macros
+que j'utilise dans ma rédaction de rapports.
diff --git a/macros/math.sty b/macros/math.sty
new file mode 100644
index 0000000..17cb955
--- /dev/null
+++ b/macros/math.sty
@@ -0,0 +1,24 @@
+\ProvidesPackage{math}[
+Simple shortcuts I use when write math]
+
+\RequirePackage{amsmath}
+
+% To write dx with an upright d and an italicized x, enter \d{x}.
+% The format is variable agnostic.
+\renewcommand*{\d}{\mathop{}\!\mathrm{d}}
+
+% Upright character for Euler's constant using \e .
+\newcommand*{\e}{\mathop{}\!\mathrm{e}}
+
+% Makes variable changes for calculus easily explicit in align mode.
+% cdv stands for "Changement de variable".
+% Here is an example where u=sin(x) and du=-cos(x):
+% \cdv{ u }{ \sin(x) }{ -\cos(x) }
+% It will print out the words "Changement de variable" and make sure
+% that equations such as u= and du= do not get numbered.
+\newcommand*{\cdv}[3]{\mathop{}\!
+ \mathrm{Changement\ de\ variable:}&\nonumber\\
+ \ #1 &= #2\nonumber \\
+ \d{#1} &= #3\nonumber
+}
+