2023-12-02 00:46:56 +01:00
|
|
|
local A = require("my.abbreviations")
|
|
|
|
local scrap = require("scrap")
|
|
|
|
local M = {}
|
|
|
|
|
2024-01-28 16:00:03 +01:00
|
|
|
local function nocap(d)
|
|
|
|
d.options = A.no_capitalization
|
|
|
|
return d
|
|
|
|
end
|
|
|
|
|
2023-12-02 00:46:56 +01:00
|
|
|
M.words = {
|
|
|
|
-- {{{ Linear algebra
|
2024-01-28 16:00:03 +01:00
|
|
|
{ "rref", "reduced row echalon form" },
|
2023-12-02 00:46:56 +01:00
|
|
|
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
|
2024-01-28 16:00:03 +01:00
|
|
|
{ "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" }), -- 💀
|
2023-12-02 00:46:56 +01:00
|
|
|
-- }}}
|
|
|
|
-- {{{ 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
|
2024-01-28 16:00:03 +01:00
|
|
|
{ "vx{,s}", "vert{ex,ices}" },
|
2023-12-02 00:46:56 +01:00
|
|
|
{ "edg{,s}", "edge{}" },
|
|
|
|
-- }}}
|
|
|
|
}
|
|
|
|
|
|
|
|
function M.setup()
|
|
|
|
A.manyGlobalAbbr(scrap.expand_many(M.words))
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|