-
Notifications
You must be signed in to change notification settings - Fork 0
/
labtex.sty
59 lines (48 loc) · 2.29 KB
/
labtex.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
\ProvidesPackage{labtex}
\RequirePackage{amsmath,amsfonts,amssymb}
%-----------------------------------------------------
% new commands
\newcommand{\bbar}[1]{\ensuremath{\bar{\bar{#1}}}}
\newcommand{\p}[1][]{\ensuremath{\partial_{#1}}}
\newcommand{\partl}[2]{\ensuremath{\frac{\partial #1}{\partial #2}}}
\newcommand{\tpartl}[2]{\ensuremath{\tfrac{\partial #1}{\partial #2}}}
\newcommand{\derv}[2]{\ensuremath{\frac{d #1}{d #2}}}
\newcommand{\tderv}[2]{\ensuremath{\tfrac{d #1}{d #2}}}
\newcommand{\norm}[1]{\ensuremath{\left\|#1\right\|}} % a norm
\newcommand{\inner}[2]{\ensuremath{\left< #1, #2 \right>}} % an inner product
\newcommand{\argmin}[1]{\ensuremath{\underset{#1}{\operatorname{arg\,min}}}}
\newcommand{\argmax}[1]{\ensuremath{\underset{#1}{\operatorname{arg\,max}}}}
\newcommand{\bbold}[1]{\ensuremath{\mathbb{#1}}}
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}} %% scientific
\providecommand{\abs}[1]{\left| #1 \right|} %% absolute value
%% \providecommand{\tr}[1]{\ensuremath{#1 ^{\mathrm{\scriptscriptstyle T}}}}
%% math operators:
\DeclareMathOperator{\spn}{span} %% span
\DeclareMathOperator{\nspace}{null} %% nullspace
\DeclareMathOperator{\diag}{diag} %% diag
\DeclareMathOperator{\sgn}{sgn} %% signum
\DeclareMathOperator{\rank}{rank} %% rank
\DeclareMathOperator{\orth}{orth} %% orthogonal
\DeclareMathOperator{\Tr}{Tr} %% trace
\DeclareMathOperator{\im}{Im} %% imaginary
\DeclareMathOperator{\supp}{sup} %% supremum
\DeclareMathOperator{\inff}{inf} %% infimum
%% constants
\newcommand{\reals}{\bbold{R}} %% reals
\newcommand{\inertia}{\mathbb{I}} %% intertia tensor
\newcommand{\ccos}{\text{c}} %% cos abbreviation
\newcommand{\ssin}{\text{s}} %% sin abbreviation
\newcommand{\ep}{\ensuremath{\varepsilon}}
\newcommand{\degree}{\ensuremath{^\circ}}
\newcommand{\tr}{\ensuremath{^\mathrm{\scriptscriptstyle T}}}
%----------------------------
% theorem environments
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{principle}{Principle}
\newtheorem{example}{Example}
%----------------------------
% common font macros
\def\D{\ensuremath{\textrm{D}}}
\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
\DeclareMathAlphabet{\mathtst}{OMS}{cmsy}{m}{n}