123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448 |
- // 数学公式组件
- // 该组件用于展示数学公式,使用 MathJax 渲染公式内容
- import { commonSetProperty } from './common';
- export function getMathProperty() {
- return {
- ...commonSetProperty,
- };
- }
- // 按用途分类的数学公式宏列表
- export const mathMacrosListByCategory = {
- // 关系符号
- relation: [
- 'approxeq',
- 'backsimeq',
- 'bumpeq',
- 'Bumpeq',
- 'circeq',
- 'doteqdot',
- 'Doteq',
- 'eqcirc',
- 'eqsim',
- 'eqslantgtr',
- 'eqslantless',
- 'fallingdotseq',
- 'geqq',
- 'geqslant',
- 'ggg',
- 'gggtr',
- 'gnapprox',
- 'gnsim',
- 'gtrapprox',
- 'gtrdot',
- 'gtreqless',
- 'gtreqqless',
- 'gtrless',
- 'gtrsim',
- 'leqq',
- 'leqslant',
- 'lessapprox',
- 'lessdot',
- 'lesseqgtr',
- 'lesseqqgtr',
- 'lessgtr',
- 'lesssim',
- 'lll',
- 'llless',
- 'lnapprox',
- 'lneqq',
- 'lnsim',
- 'ncong',
- 'neq',
- 'ngtr',
- 'nless',
- 'nprec',
- 'npreceq',
- 'nsim',
- 'nsucc',
- 'nsucceq',
- 'ntriangleleft',
- 'ntrianglelefteq',
- 'ntriangleright',
- 'ntrianglerighteq',
- 'prec',
- 'precapprox',
- 'preccurlyeq',
- 'precnapprox',
- 'precneqq',
- 'precnsim',
- 'precsim',
- 'succ',
- 'succapprox',
- 'succcurlyeq',
- 'succnapprox',
- 'succneqq',
- 'succnsim',
- 'succsim',
- 'Subset',
- 'subseteqq',
- 'Supset',
- 'supseteqq',
- 'sim',
- 'simeq',
- 'thickapprox',
- 'thicksim',
- 'trianglelefteq',
- 'trianglerighteq',
- 'triangleq',
- 'vartriangle',
- 'vartriangleleft',
- 'vartriangleright',
- 'vdash',
- 'vDash',
- 'Vdash',
- 'Vvdash',
- 'models',
- 'nvdash',
- 'shortmid',
- 'shortparallel',
- 'mid',
- 'parallel',
- 'dashv',
- 'nvDash',
- 'nVdash',
- 'nVDash',
- 'between',
- 'because',
- 'therefore',
- 'Join',
- 'leadsto',
- 'pitchfork',
- 'propto',
- 'varpropto',
- 'restriction',
- 'smallfrown',
- 'smallsmile',
- 'smile',
- 'frown',
- 'asymp',
- 'approx',
- 'cong',
- 'equiv',
- 'ne',
- 'notag',
- 'preceq',
- 'succeq',
- ],
- // 箭头符号
- arrows: [
- 'backepsilon',
- 'curvearrowleft',
- 'curvearrowright',
- 'dashleftarrow',
- 'dashrightarrow',
- 'downdownarrows',
- 'downharpoonleft',
- 'downharpoonright',
- 'hookleftarrow',
- 'hookrightarrow',
- 'leftarrow',
- 'Leftarrow',
- 'leftarrowtail',
- 'leftleftarrows',
- 'leftrightarrow',
- 'Leftrightarrow',
- 'leftrightarrows',
- 'leftrightharpoons',
- 'leftrightsquigarrow',
- 'looparrowleft',
- 'looparrowright',
- 'Lsh',
- 'rightarrow',
- 'Rightarrow',
- 'rightarrowtail',
- 'rightleftarrows',
- 'rightleftharpoons',
- 'rightrightarrows',
- 'rightsquigarrow',
- 'Rrightarrow',
- 'Rsh',
- 'twoheadleftarrow',
- 'twoheadrightarrow',
- 'upharpoonleft',
- 'upharpoonright',
- 'upuparrows',
- 'implies',
- 'impliedby',
- 'leadsto',
- 'mapsto',
- 'nleftarrow',
- 'nLeftarrow',
- 'nleftrightarrow',
- 'nLeftrightarrow',
- 'nrightarrow',
- 'nRightarrow',
- 'xleftarrow{1}',
- 'xrightarrow{1}',
- ],
- // 运算符号
- operators: [
- 'barwedge',
- 'bigstar',
- 'binom{1}{2}',
- 'boxdot',
- 'boxminus',
- 'boxplus',
- 'boxtimes',
- 'Cap',
- 'centerdot',
- 'cfrac{1}{2}',
- 'checkmark',
- 'circledast',
- 'circledcirc',
- 'circleddash',
- 'complement',
- 'Cup',
- 'curlyvee',
- 'curlywedge',
- 'dbinom{1}{2}',
- 'ddddot{x}',
- 'dddot{x}',
- 'DeclareMathOperator{\\foo}{bar}',
- 'dfrac{a}{b}',
- 'Diamond',
- 'divideontimes',
- 'dotplus',
- 'doublebarwedge',
- 'doublecap',
- 'doublecup',
- 'frac{1}{2}',
- 'genfrac{}{}{}{}{1}{4}',
- 'idotsint',
- 'iiiint',
- 'int',
- 'iint',
- 'iiint',
- 'intercal',
- 'land',
- 'lor',
- 'maltese',
- 'measuredangle',
- 'mho',
- 'multimap',
- 'prod',
- 'projlim',
- 'rtimes',
- 'ltimes',
- 'sideset{^*}{_a}\\sum',
- 'smallsetminus',
- 'sqcap',
- 'sqcup',
- 'star',
- 'substack{a \\\\ b}',
- 'sum',
- 'tbinom{1}{2}',
- 'tfrac{1}{2}',
- 'varinjlim',
- 'varliminf',
- 'varlimsup',
- 'varprojlim',
- 'wedge',
- 'vee',
- 'veebar',
- 'wr',
- ],
- // 集合符号
- sets: [
- 'beth',
- 'daleth',
- 'Finv',
- 'Game',
- 'gimel',
- 'varnothing',
- 'emptyset',
- 'in',
- 'notin',
- 'ni',
- 'owns',
- 'subset',
- 'supset',
- 'subseteq',
- 'supseteq',
- 'sqsubset',
- 'sqsupset',
- 'sqsubseteq',
- 'sqsupseteq',
- ],
- // 物理符号
- physics: [
- 'abs{a}',
- 'acomm{A}{B}',
- 'acos(x)',
- 'acosine',
- 'acot(x)',
- 'acsc(x)',
- 'admat{1, 2, 3}',
- 'anticommutator{A}{B}',
- 'arccos(x)',
- 'arccot(x)',
- 'arccsc(x)',
- 'arcsec(x)',
- 'arcsin(x)',
- 'arctan(x)',
- 'asec(x)',
- 'asin(x)',
- 'atan(x)',
- 'bmqty{x}',
- 'bqty{x}',
- 'Bqty{x}',
- 'bra{\\phi}',
- 'braket{a}{b}',
- 'comm{A}{B}',
- 'cos{1}',
- 'cosecant{1}',
- 'cosh{1}',
- 'cot{1}',
- 'coth{1}',
- 'cross{1}',
- 'csc{1}',
- 'csch{1}',
- 'curl{1}',
- 'dd{1}',
- 'det{1}',
- 'diagonalmatrix{1}',
- 'diffd{1}',
- 'div{1}',
- 'dv{1}',
- 'dyad{1}',
- 'erf{1}',
- 'ev{1}',
- 'eval{1}',
- 'exp{1}',
- 'expval{1}',
- 'fdv{1}',
- 'flatfrac{1}{2}',
- 'grad{1}',
- 'hypcosecant{1}',
- 'hypcosine{1}',
- 'hypcotangent{1}',
- 'hypsecant{1}',
- 'hypsine{1}',
- 'hyptangent{1}',
- 'Im{1}',
- 'imat{1}',
- 'ip{1}',
- 'ket{1}',
- 'ketbra{1}',
- 'laplacian{1}',
- 'ln{1}',
- 'log{1}',
- 'mdet{a & b \\newline c & d}',
- 'mel{n}{A}{m}',
- 'mqty{a & b \\newline c & d}',
- 'naturallogarithm{1}',
- 'norm{a}',
- 'op{1}',
- 'order{1}',
- 'pb{A}{B}',
- 'pdv{f}{x}',
- 'pmat{n}',
- 'pmqty{1}',
- 'Pmqty{1}',
- 'pqty{1}',
- 'Pr(tall)',
- 'pv{\\int f(z) \\dd{z}}',
- 'PV{\\int f(z) \\dd{z}}',
- 'qty{3.0}{m/s}',
- 'Re{z}',
- 'Res[f(z)]',
- 'sbmqty{1}',
- 'sec{x}',
- 'sech{1}',
- 'sin{1}',
- 'sinh{1}',
- 'smdet{1}',
- 'smqty{a & b \\newline c & d}',
- 'spmqty{a & b \\newline c & d}',
- 'sPmqty{a & b \\newline c & d}',
- 'svmqty{a & b \\newline c & d}',
- 'tan{1}',
- 'tanh{1}',
- 'tr{1}',
- 'Tr{1}',
- 'va{1}',
- 'var{F[g(x)]}',
- 'vb{a}',
- 'vdot',
- 'vmqty{x}',
- 'vnabla',
- 'vqty{x}',
- 'vu{a}',
- 'xmat{1}{2}{3}',
- 'zmat{2}{2}',
- ],
- // 希腊字母/变体
- greek: [
- 'varDelta',
- 'varGamma',
- 'varLambda',
- 'varOmega',
- 'varPhi',
- 'varPi',
- 'varPsi',
- 'varSigma',
- 'varTheta',
- 'varUpsilon',
- 'varXi',
- ],
- // 括号/分隔符
- brackets: ['lvert', 'lVert', 'rvert', 'rVert', 'llcorner', 'lrcorner', 'ulcorner', 'urcorner'],
- // 其他(文本、空格、特殊符号等)
- others: [
- 'Bbbk',
- 'blacklozenge',
- 'blacksquare',
- 'blacktriangle',
- 'blacktriangledown',
- 'blacktriangleleft',
- 'blacktriangleright',
- 'Box',
- 'boxed{Cup}',
- 'diagdown',
- 'diagup',
- 'eqref{eq1}',
- 'eth',
- 'hslash',
- 'mathring{x}',
- 'negmedspace',
- 'negthickspace',
- 'nexists',
- 'nobreakspace',
- 'operatorname{foo}',
- 'shoveleft x + y = z \\newline a + b = c',
- 'shoveright x + y = z \\newline a + b = c',
- 'sphericalangle',
- 'tag{1}',
- 'yen',
- ],
- };
- export const onlyMultiMacros = ['shoveleft', 'shoveright'];
- export const onlyAlignMacros = ['admat', 'xmat', 'zmat'];
- export const categoryList = {
- operators: '运算符号',
- relation: '关系符号',
- arrows: '箭头符号',
- sets: '集合符号',
- physics: '物理符号',
- greek: '希腊字母',
- brackets: '分隔符',
- others: '其他',
- };
- export function getMathData() {
- return {
- type: 'math',
- title: '公式',
- property: getMathProperty(),
- math: '$\n$', // 公式内容
- mind_map: {
- node_list: [{ name: '公式组件' }],
- },
- };
- }
|