|
83 | 83 | {trigger: "tilde", replacement: "\\tilde{$0}$1", options: "mA"}, |
84 | 84 | {trigger: "und", replacement: "\\underline{$0}$1", options: "mA"}, |
85 | 85 | {trigger: "vec", replacement: "\\vec{$0}$1", options: "mA"}, |
| 86 | + { |
| 87 | + trigger: "pmod", |
| 88 | + replacement: "\\pmod{${0:n}}$1", |
| 89 | + options: "mA", |
| 90 | + description: "Parenthesized modulo (\\pmod{n})", |
| 91 | + }, |
86 | 92 |
|
87 | 93 | // More auto letter subscript |
88 | 94 | {trigger: /([A-Za-z])_(\d\d)/, replacement: "[[0]]_{[[1]]}", options: "rmA"}, |
|
164 | 170 | {trigger: "\\\\(${GREEK}|${SYMBOL}) sr", replacement: "\\[[0]]^{2}", options: "rmA"}, |
165 | 171 | {trigger: "\\\\(${GREEK}|${SYMBOL}) cb", replacement: "\\[[0]]^{3}", options: "rmA"}, |
166 | 172 | {trigger: "\\\\(${GREEK}|${SYMBOL}) rd", replacement: "\\[[0]]^{$0}$1", options: "rmA"}, |
167 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) hat", replacement: "\\hat{\\[[0]]}", options: "rmA"}, |
168 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) dot", replacement: "\\dot{\\[[0]]}", options: "rmA"}, |
169 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) bar", replacement: "\\bar{\\[[0]]}", options: "rmA"}, |
170 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) vec", replacement: "\\vec{\\[[0]]}", options: "rmA"}, |
171 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) tilde", replacement: "\\tilde{\\[[0]]}", options: "rmA"}, |
172 | | - {trigger: "\\\\(${GREEK}|${SYMBOL}) und", replacement: "\\underline{\\[[0]]}", options: "rmA"}, |
| 173 | + {trigger: "\\\\(${GREEK}) hat", replacement: "\\hat{\\[[0]]}", options: "rmA"}, |
| 174 | + {trigger: "\\\\(${GREEK}) dot", replacement: "\\dot{\\[[0]]}", options: "rmA"}, |
| 175 | + {trigger: "\\\\(${GREEK}) bar", replacement: "\\bar{\\[[0]]}", options: "rmA"}, |
| 176 | + {trigger: "\\\\(${GREEK}) vec", replacement: "\\vec{\\[[0]]}", options: "rmA"}, |
| 177 | + {trigger: "\\\\(${GREEK}) tilde", replacement: "\\tilde{\\[[0]]}", options: "rmA"}, |
| 178 | + {trigger: "\\\\(${GREEK}) und", replacement: "\\underline{\\[[0]]}", options: "rmA"}, |
173 | 179 |
|
174 | 180 |
|
175 | 181 | // Derivatives and integrals |
|
198 | 204 | replacement: "\\[[0]] [[1]]", options: "rmA", |
199 | 205 | description: "Add space after hyperbolic trig funcs"}, |
200 | 206 |
|
| 207 | + { |
| 208 | + trigger: /(arcsin|arccos|arctan|arccsc|arcsec|arccot)/, |
| 209 | + replacement: "\\operatorname{ $0 }$1", |
| 210 | + options: "mA", |
| 211 | + description: "Inverse trig functions, Are not built-in MathJax functions", |
| 212 | + }, |
201 | 213 |
|
202 | 214 | // Visual operations |
203 | 215 | {trigger: "U", replacement: "\\underbrace{ ${VISUAL} }_{ $0 }", options: "mA"}, |
|
230 | 242 |
|
231 | 243 |
|
232 | 244 | // Environments |
233 | | - {trigger: "pmat", replacement: "\\begin{pmatrix}\n$0\n\\end{pmatrix}", options: "MA"}, |
234 | | - {trigger: "bmat", replacement: "\\begin{bmatrix}\n$0\n\\end{bmatrix}", options: "MA"}, |
235 | | - {trigger: "Bmat", replacement: "\\begin{Bmatrix}\n$0\n\\end{Bmatrix}", options: "MA"}, |
236 | | - {trigger: "vmat", replacement: "\\begin{vmatrix}\n$0\n\\end{vmatrix}", options: "MA"}, |
237 | | - {trigger: "Vmat", replacement: "\\begin{Vmatrix}\n$0\n\\end{Vmatrix}", options: "MA"}, |
238 | | - {trigger: "matrix", replacement: "\\begin{matrix}\n$0\n\\end{matrix}", options: "MA"}, |
239 | | - |
240 | | - {trigger: "pmat", replacement: "\\begin{pmatrix}$0\\end{pmatrix}", options: "nA"}, |
241 | | - {trigger: "bmat", replacement: "\\begin{bmatrix}$0\\end{bmatrix}", options: "nA"}, |
242 | | - {trigger: "Bmat", replacement: "\\begin{Bmatrix}$0\\end{Bmatrix}", options: "nA"}, |
243 | | - {trigger: "vmat", replacement: "\\begin{vmatrix}$0\\end{vmatrix}", options: "nA"}, |
244 | | - {trigger: "Vmat", replacement: "\\begin{Vmatrix}$0\\end{Vmatrix}", options: "nA"}, |
245 | | - {trigger: "matrix", replacement: "\\begin{matrix}$0\\end{matrix}", options: "nA"}, |
246 | | - |
247 | | - {trigger: "cases", replacement: "\\begin{cases}\n$0\n\\end{cases}", options: "mA"}, |
248 | | - {trigger: "align", replacement: "\\begin{align}\n$0\n\\end{align}", options: "mA"}, |
249 | | - {trigger: "array", replacement: "\\begin{array}\n$0\n\\end{array}", options: "mA"}, |
250 | | - |
| 245 | + // Here the regex syntax [pbBvV]mat is used to match pmat, bmat, Bmat, vmat, Vmat |
| 246 | + { |
| 247 | + trigger: /([pbBvV]mat|matrix|cases|align|array)/, |
| 248 | + replacement: "\\begin{[[0]]}\n$0\n\\end{[[0]]}", |
| 249 | + options: "rMA", |
| 250 | + description: "Matrix and other environments with new lines", |
| 251 | + }, |
| 252 | + { |
| 253 | + trigger: /([pbBvV]mat|matrix|cases|align|array)/, |
| 254 | + replacement: "\\begin{[[0]]}$0end{[[0]]}", |
| 255 | + options: "rnA", |
| 256 | + }, |
251 | 257 |
|
252 | 258 | // Brackets |
253 | 259 | {trigger: "avg", replacement: "\\langle $0 \\rangle $1", options: "mA"}, |
254 | 260 | {trigger: "norm", replacement: "\\lvert $0 \\rvert $1", options: "mA", priority: 1}, |
255 | 261 | {trigger: "Norm", replacement: "\\lVert $0 \\rVert $1", options: "mA", priority: 1}, |
256 | 262 | {trigger: "ceil", replacement: "\\lceil $0 \\rceil $1", options: "mA"}, |
257 | 263 | {trigger: "floor", replacement: "\\lfloor $0 \\rfloor $1", options: "mA"}, |
| 264 | + // For the modulo operator, see the section "More operations" above |
258 | 265 | {trigger: "mod", replacement: "|$0|$1", options: "mA"}, |
259 | 266 | {trigger: "(", replacement: "(${VISUAL})", options: "mA"}, |
260 | 267 | {trigger: "[", replacement: "[${VISUAL}]", options: "mA"}, |
|
0 commit comments