diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2022-01-28 11:51:46 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2022-01-28 11:51:46 -0500 |
commit | 5425db634b0c5fecc4393a238c72112bdbd5eeb7 (patch) | |
tree | 0a7209bbeb45a85b2b9d2a9ef66601c8890d6297 | |
parent | a003bb491b8897e85844eb17aea1f6a948fbf978 (diff) |
First math macros
-rw-r--r-- | macros/calculus.sty | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macros/calculus.sty b/macros/calculus.sty new file mode 100644 index 0000000..da749e6 --- /dev/null +++ b/macros/calculus.sty @@ -0,0 +1,22 @@ +\ProvidesPackage{math}[ +Simple shortcuts I use when write math] + +% 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 +} + |