update
[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 # MATH MODES
58 priority 10
59 snippet im "inline math" w
60 $$1$$0
61 endsnippet
62
63 snippet bm "block math" w
64 \[
65         $1
66 \]$0
67 endsnippet
68
69 # mathbb
70 snippet set "Set" w
71 \\{ $0 \\}
72 endsnippet
73
74 snippet field "Field" w
75 \mathbb{F}
76 endsnippet
77
78 snippet complex "Set of Complex" w
79 \mathbb{C}
80 endsnippet
81
82 snippet reals "Set of Reals" w
83 \mathbb{R}
84 endsnippet
85
86 snippet rationals "Set of Rational" w
87 \mathbb{Q}
88 endsnippet
89
90 snippet integers "Set of Integers" w
91 \mathbb{Z}
92 endsnippet
93
94 snippet naturals "Set of Naturals" w
95 \mathbb{N}
96 endsnippet
97
98
99 # OTHERS
100 snippet implies "Implies" w
101 \Rightarrow
102 endsnippet
103
104 snippet mod "Mod" w
105 {\ (\textrm{mod}\ $1)}
106 endsnippet
107
108 snippet floor "Floor" w
109 \lfloor $1 \rfloor
110 endsnippet
111
112 snippet cubert "Cube root" w
113 \sqrt[\leftroot{-2}\uproot{2}3]{$1}
114 endsnippet
115
116 snippet nroot "Root" w
117 \sqrt[\leftroot{-2}\uproot{2}$1]{$2}
118 endsnippet
119
120 snippet ceil "Ceiling" w
121 \lceil $1 \rceil
122 endsnippet
123
124 snippet sin "Sin" w
125 \sin($1)
126 endsnippet
127
128 snippet cos "Cos" w
129 \cos($1)
130 endsnippet
131
132 snippet tan "Tan" w
133 \tan($1)
134 endsnippet
135
136 snippet cis "Cis" w
137 \mathrm{cis}($1)
138 endsnippet
139
140
141 snippet eea "Extended Euclidian Algorithm" w
142 \begin{center}
143 \begin{tabular}{|c|c|c|c|}
144         \hline
145         x & y & r & q\\\\
146         \hline
147         1 & 0 & $1 & 0\\\\
148         0 & 1 & $2 & 0\\\\
149         $3
150         \hline
151 \end{tabular}
152 \end{center}
153 endsnippet
154
155 snippet lemma "Lemma" w
156 \textbf{Lemma $1}
157
158 \fbox{%
159     \parbox{\textwidth}{
160                 $0
161     }%
162 }
163
164 endsnippet
165
166 snippet piecewise "Piecewise" w
167 \[
168     \begin{cases}
169                 $0
170     \end{cases}
171 \]
172 endsnippet
173
174 snippet graph "Graph" w
175 \begin{tikzpicture}
176 \begin{axis}[
177     ticks=none,
178     axis lines = middle,
179     axis line style={->},
180     ymin=-5, ymax=5,
181     xmin=-5, xmax=5,
182     xlabel={$x$},
183     ylabel={$y$},
184     axis equal image
185 ]
186
187 \end{axis}
188 \end{tikzpicture}
189 endsnippet