forked from ungdev/ScribUTT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.sty
181 lines (159 loc) · 5.11 KB
/
commands.sty
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{src/packages/commands}
% Taking derivatives
\newcommand { \dd } [ 2 ] { \dfrac { d #1 } { d #2 } }
\newcommand { \dydx } { \dd yx }
\newcommand { \ddx } [1] { \dd {#1} x }
\newcommand { \ddt } [1] { \dd {#1} t }
% Taking partial derivatives
\newcommand { \pp } [ 2 ] { \frac { \partial #1 } { \partial
#2 } }
\newcommand { \ppx } [1] { \pp {#1} x }
\newcommand { \ppy } [1] { \pp {#1} y }
\newcommand { \ppz } [1] { \pp {#1} z }
% evaluating anti - derivatives
\newcommand { \eval } { \Big | }
% formatting some important single letters
\newcommand { \e } { \mbox { \large $ e $ \rule { 0 in } { 1.6 ex
}}}
% Labelling L ' Hospital ' s Rule
\newcommand { \LH } { \stackrel { \text { LH } } { = } }
% Asking if two things are equal
\newcommand { \eq } { \stackrel { \text { ? } } { = } }
% making a larger decimal point
\newcommand { \bd } { \mbox { \Large . } }
% For using in integrals , like \int\newcommand { \dx } { \ , dx }
\newcommand { \dy } { \ , dy }
\newcommand { \dz } { \ , dz }
\newcommand { \dt } { \ , dt }
\newcommand { \du } { \ , du }
\newcommand { \dv } { \ , dv }
\newcommand { \dtheta } { \ , d \theta }
% For specially formatted fractions
\newcommand { \textfrac } [ 2 ] { \frac { \text { #1 } } {
\text { #2 } } }
\newcommand { \change } [ 2 ] { \frac { \text { change in
#1 } } { \text { change in #2 } } }
% Better appearance for a " skinny frac "
% like \frac 1 x
\newcommand { \sfrac } [ 2 ] { \frac { \ #1 \ } { #2 } }
% domain , image and identity functions
\newcommand { \dom } { \mathop { \rm dom } \nolimits }
\newcommand { \im } { \mathop { \rm im } \nolimits }
\newcommand { \id } { \mathop { \rm id } \nolimits }
% Real numbers , etc .
\usepackage { amsfonts }
\newcommand { \R } { \mathbb { R } }
\newcommand { \Z } { \mathbb { Z } }
\newcommand { \Q } { \mathbb { Q } }
\newcommand { \C } { \mathbb { C } }
% inverse functions
\newcommand { \inv } { { -1 } }
% Making answer blanks
\newcommand { \blank } [ 1 ] { \underline { \hspace * { #1 } }
}
\usepackage { amssymb }
% stands for " not divides "
\newcommand { \notdiv } { \nmid }
% for labeling parts of proofs
\newcommand { \forwards } { ``$ \Rightarrow $ ''}
\newcommand { \contra } { \ensuremath { \Rightarrow
\Leftarrow } }
\newcommand { \backwards } { ``$ \Leftarrow $ ''}
%%% Quantic
\usepackage{braket}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Fancy boxes for theorem lemma and proof and codes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{theo}[section]\setcounter{theo}{0}
\renewcommand{\thetheo}{\arabic{section}~-~\arabic{theo}}
\usepackage{xcolor}
\newenvironment{theo}[2][]
{%
\refstepcounter{theo}%
\ifstrempty{#1}%
% DO THIS
{
\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=bleuRoiUTT]
{
\strut {\color{white} Théorème }~\thetheo
};
}
}
}
% ELSE
{
\mdfsetup{%
frametitle=
{%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=bleuRoiUTT]
{
% Ici c'est le "titre"
\strut {\color{white} Théorème ~\thetheo :~ #1 }
}
;}
}%
}%
\mdfsetup{
innertopmargin=10pt,linecolor=bleuRoiUTT,%
linewidth=2pt,topline=true,%
frametitleaboveskip=\dimexpr-\ht\strutbox\relax
}
\begin{mdframed}[]
\relax%
\label{#2}
}
{
\end{mdframed}
}
% Another
\newenvironment{callout}[1]
{%
\ifstrempty{#1}%
% DO THIS
{
\mdfsetup{%
frametitle={%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=bleuRoiUTT]
{
\strut {}
};
}
}
}
% ELSE
{
\mdfsetup{%
frametitle=
{%
\tikz[baseline=(current bounding box.east),outer sep=0pt]
\node[anchor=east,rectangle,fill=bleuRoiUTT]
{
% Ici c'est le "titre"
\strut {
{\color{white} #1 }
}
}
;}
}%
}%
\mdfsetup{
innertopmargin=10pt,linecolor=bleuRoiUTT,%
linewidth=2pt,topline=true,%
frametitleaboveskip=\dimexpr-\ht\strutbox\relax
}
\begin{mdframed}[]
\relax%
}
{
\end{mdframed}
}
%%%%%%%%%%%%%%%%%%- Unicode chars
\DeclareUnicodeCharacter{2212}{-}
\DeclareUnicodeCharacter{2261}{≡}
\DeclareUnicodeCharacter{03C6}{φ}