mirror of
https://github.com/Ascyii/typstar.git
synced 2026-03-02 09:32:42 +01:00
Merge branch 'main' into dev
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),
|
||||
@@ -49,28 +50,29 @@ return {
|
||||
snip('sa', 'space ', {}, math),
|
||||
|
||||
-- operators
|
||||
snip('ak([^k ])', '+ <>', { cap(1) }, math, 100, { wordTrig = false }),
|
||||
snip('sk([^k ])', '- <>', { cap(1) }, math, 100, { wordTrig = false }),
|
||||
snip('oak', 'plus.circle ', {}, math),
|
||||
snip('bak', 'plus.square ', {}, math),
|
||||
snip('mak', 'plus.minus ', {}, math),
|
||||
snip('oak', 'plus.o ', {}, math),
|
||||
snip('bak', 'plus.square ', {}, math),
|
||||
snip('osk', 'minus.o ', {}, math),
|
||||
snip('bsk', 'minus.square ', {}, math),
|
||||
snip('xx', 'times ', {}, math),
|
||||
snip('oxx', 'times.circle ', {}, math),
|
||||
snip('oxx', 'times.o ', {}, math),
|
||||
snip('bxx', 'times.square ', {}, math),
|
||||
snip('ff', '(<>) / (<>) <>', { i(1), i(2), i(3) }, math),
|
||||
snip('nab', 'arrow(nabla) ', {}, 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 }),
|
||||
snip('prp', '^perp ', {}, math, 500, { wordTrig = false }),
|
||||
snip('sr', '^2 ', {}, math, 500, { wordTrig = false }),
|
||||
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),
|
||||
@@ -83,24 +85,28 @@ return {
|
||||
snip('bnn', 'inter.big ', {}, math),
|
||||
snip('buu', 'union.big ', {}, math),
|
||||
snip('swo', 'without ', {}, math),
|
||||
snip('ni', 'in.not ', {}, math),
|
||||
|
||||
-- misc
|
||||
snip('to', '->> ', {}, math),
|
||||
snip('mt', '|->> ', {}, math),
|
||||
snip('Oo', 'compose ', {}, math),
|
||||
snip('cp', 'compose ', {}, math),
|
||||
snip('iso', 'tilde.equiv ', {}, math),
|
||||
snip('cc', 'cases(\n\t<>\n)\\', { i(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('ppa', 'partial ', {}, math, 1600),
|
||||
snip('DX', 'partial / (partial <>) ', { i(1, 'x') }, math),
|
||||
snip('DDX', '(partial <>) / (partial <>) ', { i(1, 'f'), i(2, 'x') }, math),
|
||||
snip('part', 'partial ', {}, math, 1600),
|
||||
|
||||
-- integrals
|
||||
snip('it', 'integral ', {}, math),
|
||||
snip('iot', 'integral.vol ', {}, math),
|
||||
snip('ift', 'integral.surf ', {}, math),
|
||||
@@ -108,13 +114,16 @@ return {
|
||||
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),
|
||||
|
||||
@@ -28,7 +28,7 @@ local operations = { -- first boolean: existing brackets should be kept; second
|
||||
{ 'sQ', '[', ']', false, false }, -- replace with square brackets
|
||||
{ 'BB', '', '', false, false }, -- remove brackets
|
||||
{ 'ss', '"', '"', false, false },
|
||||
{ 'agl', 'lr(angle.l ', ' angle.r)', false, false },
|
||||
{ 'chv', 'lr(chevron.l ', ' chevron.r)', false, false },
|
||||
{ 'abs', 'abs', '', true, true },
|
||||
{ 'ul', 'underline', '', true, true },
|
||||
{ 'ol', 'overline', '', true, true },
|
||||
@@ -39,9 +39,11 @@ local operations = { -- first boolean: existing brackets should be kept; second
|
||||
{ 'br', 'macron', '', true, true },
|
||||
{ 'dt', 'dot', '', true, true },
|
||||
{ 'dou', 'dot.double', '', true, true },
|
||||
{ 'dia', 'diaer', '', true, true },
|
||||
{ 'ci', 'circle', '', true, true },
|
||||
{ 'td', 'tilde', '', true, true },
|
||||
{ 'nr', 'norm', '', true, true },
|
||||
{ 'arr', 'arrow', '', true, true },
|
||||
{ 'vv', 'vec', '', true, true },
|
||||
{ 'rt', 'sqrt', '', true, true },
|
||||
{ 'flo', 'floor', '', true, true },
|
||||
|
||||
Reference in New Issue
Block a user