From d092a1d20979853ffff73441ab48622a69127961 Mon Sep 17 00:00:00 2001 From: artisticat <100622574+artisticat1@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:41:16 +0000 Subject: [PATCH] default snippets: make environment snippets (e.g. pmatrix) adapt to block/inline math --- src/default_snippets.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/default_snippets.js b/src/default_snippets.js index 0e74549..7996485 100644 --- a/src/default_snippets.js +++ b/src/default_snippets.js @@ -248,15 +248,21 @@ // Environments - {trigger: "pmat", replacement: "\\begin{pmatrix}\n$0\n\\end{pmatrix}", options: "mA"}, - {trigger: "bmat", replacement: "\\begin{bmatrix}\n$0\n\\end{bmatrix}", options: "mA"}, - {trigger: "Bmat", replacement: "\\begin{Bmatrix}\n$0\n\\end{Bmatrix}", options: "mA"}, - {trigger: "vmat", replacement: "\\begin{vmatrix}\n$0\n\\end{vmatrix}", options: "mA"}, - {trigger: "Vmat", replacement: "\\begin{Vmatrix}\n$0\n\\end{Vmatrix}", options: "mA"}, + {trigger: "pmat", replacement: "\\begin{pmatrix}\n$0\n\\end{pmatrix}", options: "MA"}, + {trigger: "bmat", replacement: "\\begin{bmatrix}\n$0\n\\end{bmatrix}", options: "MA"}, + {trigger: "Bmat", replacement: "\\begin{Bmatrix}\n$0\n\\end{Bmatrix}", options: "MA"}, + {trigger: "vmat", replacement: "\\begin{vmatrix}\n$0\n\\end{vmatrix}", options: "MA"}, + {trigger: "Vmat", replacement: "\\begin{Vmatrix}\n$0\n\\end{Vmatrix}", options: "MA"}, + {trigger: "matrix", replacement: "\\begin{matrix}\n$0\n\\end{matrix}", options: "MA"}, + {trigger: "pmat", replacement: "\\begin{pmatrix}$0\\end{pmatrix}", options: "nA"}, + {trigger: "bmat", replacement: "\\begin{bmatrix}$0\\end{bmatrix}", options: "nA"}, + {trigger: "Bmat", replacement: "\\begin{Bmatrix}$0\\end{Bmatrix}", options: "nA"}, + {trigger: "vmat", replacement: "\\begin{vmatrix}$0\\end{vmatrix}", options: "nA"}, + {trigger: "Vmat", replacement: "\\begin{Vmatrix}$0\\end{Vmatrix}", options: "nA"}, + {trigger: "matrix", replacement: "\\begin{matrix}$0\\end{matrix}", options: "nA"}, {trigger: "case", replacement: "\\begin{cases}\n$0\n\\end{cases}", options: "mA"}, {trigger: "align", replacement: "\\begin{align}\n$0\n\\end{align}", options: "mA"}, {trigger: "array", replacement: "\\begin{array}\n$0\n\\end{array}", options: "mA"}, - {trigger: "matrix", replacement: "\\begin{matrix}\n$0\n\\end{matrix}", options: "mA"}, // Brackets