From cf2cee3a80b8f1e7030d12649f9e82c68d2cd264 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 28 Jan 2022 12:11:35 -0500 Subject: Update README to mention custom macros --- README.md | 4 ++++ macros/math.sty | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 macros/math.sty 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 +} + -- cgit v1.2.3