blob: 9b9446aec11739a0ecfd1b1551a06c589b763ea7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
\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 math 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
}
% Environment to explaing the meaning of the variables contained in an equation.
% TODO: Explain this macro
\RequirePackage{tabularx}
\newenvironment{conditions}[1][Où:]
{#1 \par\vspace{\abovedisplayskip}\noindent
\tabularx{\columnwidth}{>{$}l<{$} @{${}={}$} >{\raggedright\arraybackslash}X}}
{\endtabularx\par\vspace{\belowdisplayskip}}
|