Port more abbreviations to miros
This commit is contained in:
parent
35bc79265c
commit
3c99db8650
18
flake.lock
18
flake.lock
|
@ -491,18 +491,18 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1723521794,
|
||||
"narHash": "sha256-mmcakr+6z7/SDg+e2p1TYQorjYvUzWqG2KUIsmikARM=",
|
||||
"lastModified": 1728792245,
|
||||
"narHash": "sha256-u3DIFQ26jtO9kgxSXMVYYdjSF8VArR0jA0N7ns1wWoo=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "abafaabfa893ac432bae898a8652bc4a83c49d27",
|
||||
"revCount": 3727,
|
||||
"rev": "8064396aa8c2491dcecbedf9c71140936f032056",
|
||||
"revCount": 3842,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/rycee/nur-expressions?dir=pkgs/firefox-addons"
|
||||
"url": "https://gitlab.com/rycee/nur-expressions"
|
||||
},
|
||||
"original": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/rycee/nur-expressions?dir=pkgs/firefox-addons"
|
||||
"url": "https://gitlab.com/rycee/nur-expressions"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
|
@ -1274,11 +1274,11 @@
|
|||
"purifix": "purifix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728771451,
|
||||
"narHash": "sha256-WazYd0cPY7FqDanOfyMf9qiciSj2wEL8NJ1sV8LV4Rs=",
|
||||
"lastModified": 1728796450,
|
||||
"narHash": "sha256-16AGyN4HddZXQFaxYZjPVYxSd4b2pKJ7wUwiNgHHXQs=",
|
||||
"owner": "prescientmoon",
|
||||
"repo": "miros",
|
||||
"rev": "2e49f31f22855d1428ab693cf7d0e25b839dce28",
|
||||
"rev": "21e1332cc763049e27f6597967b3ac2f73fa7599",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,95 +1 @@
|
|||
local A = require("my.abbreviations")
|
||||
local scrap = require("scrap")
|
||||
|
||||
require("my.abbreviations.math").setup()
|
||||
|
||||
vim.opt.conceallevel = 0
|
||||
|
||||
local abbreviations = {
|
||||
-- Other fancy symvols
|
||||
{ "tmat", "^T" }, -- Transpose of a matrix
|
||||
{ "cmat", "^*" }, -- Conjugate of a matrix
|
||||
{ "sneg", "^C" }, -- Set complement
|
||||
{ "ortco", "^\\bot" }, -- Orthogonal complement
|
||||
{ "sinter", "^\\circ" }, -- Interior of a set
|
||||
{ "nuls", "\\varnothing" },
|
||||
|
||||
-- Basic commands
|
||||
{ "mangle", "\\measuredangle" },
|
||||
{ "aangle", "\\angle" },
|
||||
{ "sdiff", "\\setminus" },
|
||||
{ "sst", "\\subset" },
|
||||
{ "spt", "\\supset" },
|
||||
{ "sseq", "\\subseteq" },
|
||||
{ "speq", "\\supseteq" },
|
||||
{ "ccan", "\\cancel" },
|
||||
{ "com", "\\circ" },
|
||||
{ "mul", "\\cdot" },
|
||||
{ "smul", "\\times" },
|
||||
{ "card", "\\#" },
|
||||
{ "div", "\\|" },
|
||||
{ "ndiv", "\\not\\|\\:" },
|
||||
{ "perp", "\\perp" },
|
||||
{ "cdots", "\\cdots" }, -- center dots
|
||||
{ "ldots", "\\ldots" }, -- low dots
|
||||
{ "cldots", ",\\ldots," }, -- comma, low dots
|
||||
{ "frac", "\\frac" }, -- fraction
|
||||
{ "lim", "\\lim" }, -- Limit
|
||||
{ "sup", "\\sup" }, -- supremum
|
||||
{ "limsup", "\\lim\\sup" }, -- Limit of the supremum
|
||||
{ "cal", "\\mathcal" }, -- Limit of the supremum
|
||||
}
|
||||
|
||||
local abolishAbbreviations = {
|
||||
-- {{{ Set symbols
|
||||
-- - nats => naturals
|
||||
-- - ints => integers
|
||||
-- - rats => rationals
|
||||
-- - irats => irationals
|
||||
-- - rrea => reals
|
||||
-- - comp => complex
|
||||
-- - ppri => primes
|
||||
-- - ffie => fields
|
||||
{
|
||||
"{nats,ints,rats,irats,rrea,comp,ppri,ffie}",
|
||||
"\\mathbb\\{{N,Z,Q,I,R,C,P,F}\\}",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Graph theory
|
||||
-- Graph theory function syntax:
|
||||
-- gt[function]{graph}{modifier}
|
||||
-- - function:
|
||||
-- - basic functions: e/E/v/G/L
|
||||
-- - k => connectivity
|
||||
-- - a => size of the biggest stable set
|
||||
-- - w => size of the biggest clique
|
||||
-- - d => biggest degree
|
||||
-- - c{target}{kind} => {target} {kind} chromatic number
|
||||
-- - target:
|
||||
-- - vertices by default
|
||||
-- - e => edges
|
||||
-- - kind:
|
||||
-- - normal by default
|
||||
-- - l => list
|
||||
-- - graph:
|
||||
-- - G by default
|
||||
-- - s/x/y/h => S/X/Y/H
|
||||
-- - modifier:
|
||||
-- - a => '
|
||||
-- - 1/2 => _k
|
||||
{
|
||||
"gt{{e,E,v,V,L},k,a,w,d,md{,e},c{,e}{,l}}{,s,h,x,y}{,a,1,2}",
|
||||
"{{},\\kappa,\\alpha,\\omega,\\Delta,\\delta{,'},\\chi{,'}{,_l}}({G,S,H,X,Y}{,',_1,_2})",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
}
|
||||
|
||||
local expanded = scrap.expand_many(abolishAbbreviations)
|
||||
|
||||
-- Last I checked this contained 1229 abbreviations
|
||||
-- print(#abbreviations + #expanded)
|
||||
|
||||
A.manyLocalAbbr(abbreviations)
|
||||
A.manyLocalAbbr(expanded)
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
require("my.abbreviations.math").setup()
|
||||
require("my.abbreviations.unicode").setup()
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
local A = require("my.abbreviations")
|
||||
local scrap = require("scrap")
|
||||
local M = {}
|
||||
|
||||
local function nocap(d)
|
||||
d.options = A.no_capitalization
|
||||
return d
|
||||
end
|
||||
|
||||
M.words = {
|
||||
-- {{{ Linear algebra
|
||||
{ "rref", "reduced row echalon form" },
|
||||
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
|
||||
{ "mx{,s}", "matri{x,ces}" },
|
||||
{ "dete{,s}", "determinant{}" },
|
||||
{ "ort{n,g}", "orto{normal,gonal}" },
|
||||
{ "l{in,de}", "linearly {independent,dependent}" },
|
||||
{ "lcon{,s}", "linear combination{}" },
|
||||
{ "vst{,s}", "vector space{}" }, -- text vector space
|
||||
nocap({ "rizz", "Riesz vector" }), -- 💀
|
||||
-- }}}
|
||||
-- {{{ Differential equations
|
||||
-- Note: we must add the space inside the {} in order for capitalization to work!
|
||||
{
|
||||
"{{s,o,l},}deq{s,}",
|
||||
"{{scalar,ordinary,linear} ,}differential equation{}",
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Graph theory
|
||||
{ "vx{,s}", "vert{ex,ices}" },
|
||||
{ "edg{,s}", "edge{}" },
|
||||
-- }}}
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.words))
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,23 +1,36 @@
|
|||
block !word
|
||||
for s <- @⟨,s⟩
|
||||
|
||||
block
|
||||
for b <- @⟨b,B⟩
|
||||
for w <- @⟨w,W⟩
|
||||
for t <- @⟨w,W⟩
|
||||
|
||||
|
||||
abbr @b⋄cla @b⋄y contradiction let's assume
|
||||
abbr @w⋄lg @w⋄ithout loss of generality
|
||||
abbr @t⋄its @t⋄hat is to say,
|
||||
abbr @w⋄pbd @w⋄e will prove the statement in both directions.
|
||||
|
||||
abbr stam@s statement@s
|
||||
abbr cex@s counterexample@s
|
||||
block auto !word
|
||||
block capitalize
|
||||
abbr bcla by contradiction let's assume
|
||||
abbr wlg without loss of generality
|
||||
abbr tits that is to say,
|
||||
abbr wpbd we will prove the statement in both directions.
|
||||
abbr itf it then follows
|
||||
|
||||
for who <- @⟨which,this⟩
|
||||
for what <- @⟨means,implies⟩
|
||||
abbr @who@what @⟨@who:which,this⟩@⟨@what:means,implies⟩
|
||||
abbr @⟨@who:ww,tt⟩@⟨@what:m,i⟩ @who @what
|
||||
|
||||
abbr stam statement
|
||||
abbr cox counterexample
|
||||
abbr lcon linear combination
|
||||
abbr vst vector space
|
||||
|
||||
abbr vx vertex
|
||||
abbr mx matrix
|
||||
abbr vertexs vertices
|
||||
abbr matrixs matrices
|
||||
|
||||
for kind <- @⟨parts,substitution⟩
|
||||
abbr ib@⟨@kind:p,s⟩ integration by @kind
|
||||
|
||||
for kind <- @⟨independent,dependent⟩
|
||||
abbr l@⟨@kind:ind,de⟩ linearly @kind
|
||||
|
||||
for kind <- @⟨value,vector,pair⟩
|
||||
abbr eg@⟨@kind:va,ve,p⟩ eigen@kind
|
||||
|
||||
for kind <- @⟨orthogonal,orthonormal⟩
|
||||
abbr @⟨@kind:ortg,ortn⟩ @kind
|
||||
|
||||
for kind <- @⟨scalar,ordinary,linear,⟩
|
||||
abbr @⟨@kind:s,o,l,⟩deq @kind differential equation
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
block text
|
||||
import common/math-phrases
|
||||
|
||||
for thmenv <- @⟨theorem,lemma,exercise,definition,corollary,example⟩
|
||||
for thmprefix <- @⟨@thmenv:thm,lem,exe,def,cor,exa⟩
|
||||
|
||||
|
@ -164,6 +167,7 @@ block math
|
|||
⟩}}$0
|
||||
|
||||
block auto
|
||||
block word
|
||||
for constkind <- @⟨default,shortened⟩
|
||||
for constant <- @⟨@constkind:
|
||||
@⟨star,delta,Delta,pi,tau,psi,phi,rho,sigma,alpha,beta,theta,gamma,omega,Omega,half,ordop,land,lor⟩,
|
||||
|
@ -184,18 +188,41 @@ block math
|
|||
|
||||
abbr frl \forall
|
||||
abbr exs \exists
|
||||
|
||||
abbr card \#
|
||||
abbr ccap \cap
|
||||
abbr ccup \cup
|
||||
abbr iin \in
|
||||
abbr nin \not\in
|
||||
abbr ccup \cup
|
||||
abbr ccap \cap
|
||||
abbr nuls \varnothing
|
||||
abbr ortco ^\bot
|
||||
abbr sdiff \setminus
|
||||
abbr sinter ^\circ
|
||||
abbr smul \times
|
||||
abbr speq \supseteq
|
||||
abbr spt \supset
|
||||
abbr sseq \subseteq
|
||||
abbr sst \subset
|
||||
|
||||
abbr nope \bot
|
||||
abbr yee \top
|
||||
|
||||
abbr ccan \cancel
|
||||
abbr com \circ
|
||||
abbr limsup \lim\sup
|
||||
abbr mangle \measuredangle
|
||||
abbr mul \cdot
|
||||
abbr nlnl \pm
|
||||
abbr vsm \vecspace
|
||||
abbr oball \ball
|
||||
abbr vsm \vecspace
|
||||
|
||||
for noperator <- @⟨ordop,land,lor,equiv,pmod⟩
|
||||
abbr bb \mathbb
|
||||
abbr cal \mathcal
|
||||
|
||||
for set <- @⟨N,Z,Q,I,R,C,P,F⟩
|
||||
abbr @⟨@set:nats,ints,rats,irats,rrea,comp,ppri,ffie⟩ \mathbb @set
|
||||
|
||||
for noperator <- @⟨ordop,land,lor,equiv,pmod,ldots,cdots,perp,lim,angle,sup⟩
|
||||
abbr @noperator \\@noperator
|
||||
|
||||
for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩
|
||||
|
@ -246,6 +273,7 @@ block math
|
|||
abbr .inv ^{-1}
|
||||
abbr .neg _-
|
||||
abbr .pos _+
|
||||
abbr .t ^T
|
||||
|
||||
for limtarget <- @⟨anything,zero,infinity,negative infinity⟩
|
||||
for prefix <- @⟨@limtarget:,z,i,n⟩
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import common/math-phrases
|
||||
|
||||
block auto start
|
||||
for thmenv <- @⟨lemma,theorem,corollary,definition⟩
|
||||
string @thmenv
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
comments = [
|
||||
"youtube"
|
||||
"reddit"
|
||||
|
||||
];
|
||||
save_player_pos = true;
|
||||
automatic_instance_redirect = true;
|
||||
|
|
Loading…
Reference in a new issue