f19a2deee8590dcfff3124c813269c7e22d20f13
[dotfiles.git] / .vim / mysnippets / tex.snippets
1 # Enviros
2 snippet \begin "enviroment" bA
3 \begin{$1}
4         $0
5 \end{$1}
6 endsnippet
7
8 snippet enum "enumerate" w
9 \begin{enumerate}[$1]
10         $0
11 \end{enumerate}
12 endsnippet
13
14 snippet align "align" w
15 \begin{align*}
16         $0
17 \end{align*}
18 endsnippet
19
20 snippet center "center" w
21 \begin{center}
22         $0
23 \end{center}
24 endsnippet
25
26 snippet proof "proof" w
27 \begin{proof}
28         $0
29 \end{proof}
30 endsnippet
31
32 # FRACTIONS
33 snippet // "frac" iA
34 \\frac{$1}{$2}$0
35 endsnippet
36
37
38 # LIMITS
39 snippet lim "limit" w
40 \lim\limits_{$1 \to $2}$3
41 endsnippet
42
43 snippet inflim "limit to infinity" w
44 \lim\limits_{n \to \infty}
45 endsnippet
46
47
48 # SUMMATION
49 snippet sum "Summation" w
50 \sum\limits_{$1}^{$2}$3
51 endsnippet
52
53 snippet prod "Product" w
54 \prod\limits_{$1}^{$2}$3
55 endsnippet
56
57
58 snippet defint "Definite Integral" w
59 \int_{$1}^{$2} $0
60 endsnippet
61
62
63 # MATH MODES
64 priority 10
65 snippet im "inline math" w
66 $$1$$0
67 endsnippet
68
69 snippet bm "block math" w
70 \[
71         $1
72 \]$0
73 endsnippet
74
75 # mathbb
76 snippet set "Set" w
77 \\{ $0 \\}
78 endsnippet
79
80 snippet field "Field" w
81 \mathbb{F}
82 endsnippet
83
84 snippet complex "Set of Complex" w
85 \mathbb{C}
86 endsnippet
87
88 snippet reals "Set of Reals" w
89 \mathbb{R}
90 endsnippet
91
92 snippet rationals "Set of Rational" w
93 \mathbb{Q}
94 endsnippet
95
96 snippet integers "Set of Integers" w
97 \mathbb{Z}
98 endsnippet
99
100 snippet naturals "Set of Naturals" w
101 \mathbb{N}
102 endsnippet
103
104
105 # OTHERS
106 snippet implies "Implies" w
107 \Rightarrow
108 endsnippet
109
110 snippet mod "Mod" w
111 {\ (\textrm{mod}\ $1)}
112 endsnippet
113
114 snippet floor "Floor" w
115 \lfloor $1 \rfloor
116 endsnippet
117
118 snippet cubert "Cube root" w
119 \sqrt[\leftroot{-2}\uproot{2}3]{$1}
120 endsnippet
121
122 snippet nroot "Root" w
123 \sqrt[\leftroot{-2}\uproot{2}$1]{$2}
124 endsnippet
125
126 snippet ceil "Ceiling" w
127 \lceil $1 \rceil
128 endsnippet
129
130 snippet sin "Sin" w
131 \sin($1)
132 endsnippet
133
134 snippet cos "Cos" w
135 \cos($1)
136 endsnippet
137
138 snippet tan "Tan" w
139 \tan($1)
140 endsnippet
141
142 snippet cis "Cis" w
143 \mathrm{cis}($1)
144 endsnippet
145
146 snippet span "Span" w
147 \text{span}($0)
148 endsnippet
149
150
151 snippet eea "Extended Euclidian Algorithm" w
152 \begin{center}
153 \begin{tabular}{|c|c|c|c|}
154         \hline
155         x & y & r & q\\\\
156         \hline
157         1 & 0 & $1 & 0\\\\
158         0 & 1 & $2 & 0\\\\
159         $3
160         \hline
161 \end{tabular}
162 \end{center}
163 endsnippet
164
165 snippet lemma "Lemma" w
166 \textbf{Lemma $1}
167
168 \fbox{%
169     \parbox{\textwidth}{
170                 $0
171     }%
172 }
173
174 endsnippet
175
176 snippet piecewise "Piecewise" w
177 \[
178     \begin{cases}
179                 $0
180     \end{cases}
181 \]
182 endsnippet
183
184 snippet graph "Graph" w
185 \begin{tikzpicture}
186 \begin{axis}[
187     ticks=none,
188     axis lines = middle,
189     axis line style={->},
190     ymin=-5, ymax=5,
191     xmin=-5, xmax=5,
192     xlabel={$x$},
193     ylabel={$y$},
194     axis equal image
195 ]
196
197 \end{axis}
198 \end{tikzpicture}
199 endsnippet