forked from cirosantilli/latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainpres.sty
101 lines (75 loc) · 3.91 KB
/
mainpres.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
\ProvidesPackage{mainpres}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{makeidx} %- makes index -%
\usepackage{graphicx}
\usepackage{natbib} % citep
\usepackage{mathrsfs} % for \mathscr{C} == Continous functions symbol
\usepackage[utf8]{inputenc} %- encode as utf8. everything is UTF8 now. never again worry about non english chars. -%
%----------- document parts -----------------%
\newcommand{\subsubsubsection}[1]{#1}
\newcommand{\eq}[1]{ \begin{align} #1 \end{align} }
\newcommand{\tableW}[3]{\begin{table}[h] \begin{center} \begin{tabular}#2 \end{tabular} #1 \end{center} \end{table} }
%----------- bibtex bibliography -----------------%
\bibliographystyle{plain}
\graphicspath{{./data/}} % search for figures under ./data
\renewcommand{\ref}[1]{\ref{#1}}
% \newcommand{\defRef}[1]{\hyperref[#1]{Definition \ref*{#1}}}
% \newcommand{\expRef}[1]{\hyperref[#1]{Example \ref*{#1}}}
% \newcommand{\theoRef}[1]{\hyperref[#1]{Theorem \ref*{#1}}}
% \newcommand{\propRef}[1]{\hyperref[#1]{Proposition \ref*{#1}}}
% \newcommand{\remRef}[1]{\hyperref[#1]{Remark \ref*{#1}}}
\newcommand{\eqRef}[1]{\hyperref[#1]{(\ref*{#1})}} %- Equation reference. between parenthesis -%
\newcommand{\figRef}[1]{\hyperref[#1]{Figure \ref*{#1}}} %- Figure reference. between parenthesis -%
\newcommand{\comment}[1]{} % comments text out of output
%-- math only, no form -----------------------------------------------%
%- analysis -%
%- limits -%
\newcommand{\tendsTo}{\longrightarrow}
\newcommand{\notTendTo}{\nrightarrow}
%- derivatives -%
\newcommand{\der}[2]{\frac{d#1}{d#2}} %- derivative -%
\newcommand{\derAt}[3]{\left.\frac{d#1}{d#2}\right|_{#2=#3}} %- value of derivative evaluated AT a point-%
\newcommand{\parDer}[2]{\frac{\partial #1}{\partial #2 }} %- partial derivative -%
\newcommand{\grad}{\nabla} %- gradient -%
%- norms and products -%
\newcommand{\proj}[1]{proj_{#1}}
\newcommand{\measure}[1]{meas(#1)}
\newcommand{\norm}[1]{\left|\left| #1\right|\right|}
\newcommand{\normOne}[1]{{\left|\left| #1\right|\right|}_1}
\newcommand{\normTwo}[1]{{\left|\left| #1\right|\right|}_2}
\newcommand{\normSup}[1]{{\left|\left| #1\right|\right|}_\infty}
\newcommand{\opNorm}[1]{{\left|\left| #1\right|\right|_{op}}}
\newcommand{\argmax}[1]{\underset{#1}{\operatorname{argmax}}}
\newcommand{\argmin}[1]{\underset{#1}{\operatorname{argmin}}}
%- matrices -%
\newcommand{\Mn}{M(n)}
\newcommand{\GLn}{GL(n)} %- general linear group nxn -%
\newcommand{\Symn}{Sym(n)} %- Symmetric matrices nxn -%
\newcommand{\SPDn}{Sym_{\star}^{+}(n)} %- Symmetric Positive Definite nxn -%
\newcommand{\Tr}{Tr} %- trace. does not include () because they can also be \left(\right). Also \Tr() looks better then \Tr{} -%
%- sets and logic -%
\newcommand{\union}{\cup} %- set union -%
\newcommand{\inter}{\cap} %- set intersection -%
\newcommand{\cartProd}{\times} %- cartesian product -%
%- named sets -%
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\COne}{\mathscr{C}^1} % derivable functions with continuous derivative
\newcommand{\CInfty}{\mathscr{C}^\infty} % derivable functions with continuous derivative
%- functions -%
\newcommand{\domainImageArrow}{\rightarrow}
\newcommand{\funcDom}[3]{#1 : #2 \to #3}
\newcommand{\funcDef}[5]{ #1 \colon #2 & \domainImageArrow #3 \nonumber \\ #4 & \mapsto #5} %- function definition. name, domain, image, x, f(x). MUST BE PUT INSIDE ALIGN -%
\newcommand{\comp}{\circ} %- function composition -%
\newcommand{\restr}[2]{ \left.#1\right|_{#2}} %- domain restriction of a function -%
%- named functions -%
\newcommand{\indQx}{\mathbf{1}_{\Q}(x)} %- rational indicator function of x -%
\newcommand{\indQ}[1]{\mathbf{1}_{\Q}(#1)} %- rational indicator function -%
% to be used in the future
% \newcommand{\hypotenuse}{\ensuremath{a^{2}+y^{2}}} works either in or out of equation. ($$ inside equation == not good)