-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtex.snippets
More file actions
162 lines (129 loc) · 2.39 KB
/
tex.snippets
File metadata and controls
162 lines (129 loc) · 2.39 KB
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
snippet bold "Bold"
\textbf{$1}
endsnippet
snippet mk "Math" wA
$$1$$0
endsnippet
snippet dm "Math" wA
\[$1\]$0
endsnippet
snippet sigma "Sigma" iA
\Sigma{$1}$0
endsnippet
snippet sin "sin" i
\sin($1)$0
endsnippet
snippet cos "cos" i
\cos($1)$0
endsnippet
snippet enum "Enumerate Environment" i
\begin{enumerate}[$1]
\item$2
\end{enumerate}
endsnippet
snippet cdot "cdot" iA
\cdot $0
endsnippet
snippet eq "Multiline Equations" i
\begin{equation$1}
$0
\end{equation$1}
endsnippet
snippet eqg "Multiline Equations" iA
\begin{equation$1}
\begin{gathered}
$0
\end{gathered}
\end{equation$1}
endsnippet
snippet ui "Units" i
\unit{\\$1}$0
endsnippet
snippet uif "Units" i
\unit{\\$1\per\\$2}$0
endsnippet
snippet qty "Units" iA
\qty{$1}{\\$2}$0
endsnippet
snippet qtyf "Units" iA
\qty{$1}{\\$2\per\\$3}$0
endsnippet
snippet sr "^2" iA
^2
endsnippet
snippet cb "^3" iA
^3
endsnippet
snippet td "superscript" iA
^{$1}$0
endsnippet
snippet int "Integral" i
\int $1($2)d$2
endsnippet
snippet pdv "Partial Derivative" iA
\pdv{$1}{$2} $0
endsnippet
snippet pd "Partial Derivtive Symbol" i
\partial
endsnippet
snippet sqrt "Square Root" iA
\sqrt{$1}$0
endsnippet
snippet quad "Quad space" i
\quad
endsnippet
snippet vec "Vector" i
\vec{$1}$0
endsnippet
snippet dfrac "Display Fraction" iA
\dfrac{$1}{$2}
endsnippet
snippet frac "Fraction" i;
\frac{$1}{$2}
endsnippet
snippet vmag "Magnitudes for vectors" iA
\| $1 \|$0
endsnippet
# snippet bm "Bold Math" iA
# \bm{$1}$0
# endsnippet
snippet begin "begin end enviroment" i
\begin{$1}
$0
\end{$1}
endsnippet
snippet lamb "lambda" i
\lambda
endsnippet
snippet align "align environment" i
\begin{align$1}
$0
\end{align$1}
endsnippet
snippet minipage "Minipage environment for code" i
\noindent
\begin{minipage}{\linewidth}
$0
\end{minpage}
endsnippet
snippet lra "Left Right Arrow" iA
\Leftrightarrow
endsnippet
snippet bmat "bmatrix" iA
\begin{bmatrix} $1 \end{bmatrix}$0
endsnippet
# snippet 'mat(.+.)+?.?' "Matrix" r
# \begin{$1matrix}
# !p
# entries = match.group(1)
# indent = re.search(r'^( *)', match.string).group(1)
# lines = [e for e in entries.split('..') if e]
# formatted_lines = []
# for line in lines:
# nums = [e for e in line.split('.') if e]
# if line == lines[0]: formatted_lines.append(' ' + ' & '.join(nums))
# else: formatted_lines.append(indent + ' ' + ' & '.join(nums))
# snip.rv = ' \\\\\n'.join(formatted_lines)
#
# \end{$1matrix} $0
# endsnippet