diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2022-01-28 12:11:35 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2022-01-28 12:11:35 -0500 |
commit | cf2cee3a80b8f1e7030d12649f9e82c68d2cd264 (patch) | |
tree | 58db8e52b89588ff386f027fc0012676991ac14f /macros/math.sty | |
parent | c46a71c344026dbcc53710f9c1e4a672348c4246 (diff) |
Update README to mention custom macros
Diffstat (limited to 'macros/math.sty')
-rw-r--r-- | macros/math.sty | 24 |
1 files changed, 24 insertions, 0 deletions
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 +} + |