mirror of
https://github.com/Ascyii/typstar.git
synced 2026-03-02 01:22:43 +01:00
refactor(snip): reorder math snippets
This commit is contained in:
@@ -9,7 +9,6 @@ local cap = helper.cap
|
||||
return {
|
||||
snip('fa', 'forall ', {}, math),
|
||||
snip('ex', 'exists ', {}, math),
|
||||
snip('ni', 'in.not ', {}, math),
|
||||
snip('Sq', 'square', {}, math),
|
||||
|
||||
-- logical chunks
|
||||
@@ -19,6 +18,8 @@ return {
|
||||
snip('een', 'exists epsilon>>0 ', {}, math),
|
||||
|
||||
-- boolean logic
|
||||
snip('and', 'and ', {}, math),
|
||||
snip('or', 'or ', {}, math),
|
||||
snip('not', 'not ', {}, math),
|
||||
snip('ip', '==>> ', {}, math),
|
||||
snip('ib', '<<== ', {}, math),
|
||||
@@ -44,7 +45,7 @@ return {
|
||||
snip('bxx', 'times.square ', {}, math),
|
||||
snip('ff', '(<>) / (<>) <>', { i(1, 'a'), i(2, 'b'), i(3) }, math),
|
||||
|
||||
-- exponents
|
||||
-- subscript/superscript
|
||||
snip('iv', '^(-1) ', {}, math, 500, { wordTrig = false, blacklist = { 'equiv' } }),
|
||||
snip('tp', '^top ', {}, math, 500, { wordTrig = false }),
|
||||
snip('cmp', '^complement ', {}, math, 500, { wordTrig = false }),
|
||||
@@ -52,10 +53,9 @@ return {
|
||||
snip('cb', '^3 ', {}, math, 500, { wordTrig = false }),
|
||||
snip('jj', '_(<>) ', { i(1, 'n') }, math, 500, { wordTrig = false }),
|
||||
snip('kk', '^(<>) ', { i(1, 'n') }, math, 500, { wordTrig = false }),
|
||||
snip('ep', 'exp(<>) ', { i(1, '1') }, math),
|
||||
|
||||
-- sets
|
||||
-- 'st' to '{<>} in ./visual.lua
|
||||
-- 'st' to '{<>}' in ./visual.lua
|
||||
snip('set', '{<> mid(|) <>}', { i(1), i(2) }, math),
|
||||
snip('es', 'emptyset ', {}, math),
|
||||
snip('ses', '{emptyset} ', {}, math),
|
||||
@@ -68,6 +68,7 @@ return {
|
||||
snip('bnn', 'inter.big ', {}, math),
|
||||
snip('buu', 'union.big ', {}, math),
|
||||
snip('swo', 'without ', {}, math),
|
||||
snip('ni', 'in.not ', {}, math),
|
||||
|
||||
-- misc
|
||||
snip('to', '->> ', {}, math),
|
||||
@@ -75,31 +76,37 @@ return {
|
||||
snip('cp', 'compose ', {}, math),
|
||||
snip('iso', 'tilde.equiv ', {}, math),
|
||||
snip('nab', 'nabla ', {}, math),
|
||||
snip('ep', 'exp(<>) ', { i(1, '1') }, math),
|
||||
snip('cc', 'cases(\n\t<>\n)\\', { i(1, '1') }, math),
|
||||
snip('([A-Za-z])o([A-Za-z0-9]) ', '<>(<>) ', { cap(1), cap(2) }, math, 100, {
|
||||
maxTrigLength = 4,
|
||||
blacklist = { 'bot ', 'cos ', 'cot ', 'dot ', 'log ', 'mod ', 'top ', 'won ', 'xor ' },
|
||||
blacklist = { 'bot ', 'cos ', 'cot ', 'dot ', 'log ', 'mod ', 'not ', 'top ', 'won ', 'xor ' },
|
||||
}),
|
||||
snip('(K|M|N|Q|R|S|Z)([\\dn]) ', '<><>^<> ', { cap(1), cap(1), cap(2) }, math),
|
||||
|
||||
-- derivatives
|
||||
snip('dx', 'dif / (dif <>) ', { i(1, 'x') }, math),
|
||||
snip('ddx', '(dif <>) / (dif <>) ', { i(1, 'f'), i(2, 'x') }, math),
|
||||
snip('DX', 'diff / (diff <>) ', { i(1, 'x') }, math),
|
||||
snip('DDX', '(diff <>) / (diff <>) ', { i(1, 'f'), i(2, 'x') }, math),
|
||||
snip('part', 'partial ', {}, math, 1600),
|
||||
|
||||
-- integrals
|
||||
snip('it', 'integral ', {}, math),
|
||||
snip('int', 'integral_(<>)^(<>) ', { i(1, 'a'), i(2, 'b') }, math),
|
||||
snip('oit', 'integral.cont_(<>) ', { i(1, 'C') }, math),
|
||||
snip('dit', 'integral_(<>) ', { i(1, 'Omega') }, math),
|
||||
|
||||
-- sums
|
||||
snip('sm', 'sum ', {}, math),
|
||||
snip('sum', 'sum_(<>)^(<>) ', { i(1, 'k=1'), i(2, 'oo') }, math),
|
||||
snip('dsm', 'sum_(<>) ', { i(1, 'Omega') }, math),
|
||||
|
||||
-- products
|
||||
snip('prd', 'product ', {}, math),
|
||||
snip('prod', 'product_(<>)^(<>) ', { i(1, 'k=1'), i(2, 'n') }, math),
|
||||
|
||||
-- limits
|
||||
snip('lm', 'lim ', {}, math),
|
||||
snip('lim', 'lim_(<> ->> <>) ', { i(1, 'n'), i(2, 'oo') }, math),
|
||||
snip('lim (sup|inf)', 'lim<> ', { cap(1) }, math),
|
||||
|
||||
Reference in New Issue
Block a user