|
1 | | -// cspell:disable |
| 1 | +import YAML from 'yaml' |
| 2 | +import path from 'node:path' |
| 3 | +import fs from 'node:fs' |
2 | 4 |
|
3 | | -/** |
4 | | - * Dictionary of LaTeX macros |
5 | | - */ |
6 | | -export const MACROS = { |
7 | | - // blackboard bold letters |
8 | | - '\\IN': '\\mathbb{N}', |
9 | | - '\\IZ': '\\mathbb{Z}', |
10 | | - '\\IQ': '\\mathbb{Q}', |
11 | | - '\\IR': '\\mathbb{R}', |
12 | | - '\\IC': '\\mathbb{C}', |
13 | | - '\\IF': '\\mathbb{F}', |
14 | | - '\\IB': '\\mathbb{B}', |
15 | | - '\\IA': '\\mathbb{A}', |
16 | | - '\\IP': '\\mathbb{P}', |
17 | | - // calligraphic letters |
18 | | - '\\A': '\\mathcal{A}', |
19 | | - '\\B': '\\mathcal{B}', |
20 | | - '\\C': '\\mathcal{C}', |
21 | | - '\\D': '\\mathcal{D}', |
22 | | - '\\E': '\\mathcal{E}', |
23 | | - '\\F': '\\mathcal{F}', |
24 | | - '\\I': '\\mathcal{I}', |
25 | | - '\\J': '\\mathcal{J}', |
26 | | - '\\O': '\\mathcal{O}', |
27 | | - '\\S': '\\mathcal{S}', |
28 | | - // abbreviations |
29 | | - '\\op': '\\mathrm{op}', |
30 | | - '\\c': '\\mathrm{c}', |
31 | | - '\\f': '\\mathrm{f}', |
32 | | - '\\fg': '\\mathrm{fg}', |
33 | | - '\\fp': '\\mathrm{fp}', |
34 | | - '\\ab': '\\mathrm{ab}', |
35 | | - '\\reg': '\\mathrm{reg}', |
36 | | - // operators |
37 | | - '\\Mor': '\\operatorname{Mor}', |
38 | | - '\\Hom': '\\operatorname{Hom}', |
39 | | - '\\End': '\\operatorname{End}', |
40 | | - '\\Ob': '\\operatorname{Ob}', |
41 | | - '\\id': '\\operatorname{id}', |
42 | | - '\\card': '\\operatorname{card}', |
43 | | - '\\colim': '\\operatorname{colim}', |
44 | | - '\\im': '\\operatorname{im}', |
45 | | - '\\lcm': '\\operatorname{lcm}', |
46 | | - '\\Spec': '\\operatorname{Spec}', |
47 | | - '\\Sh': '\\operatorname{Sh}', |
48 | | - '\\ord': '\\operatorname{ord}', |
49 | | - '\\diag': '\\operatorname{diag}', |
50 | | - '\\Sub': '\\operatorname{Sub}', |
51 | | - '\\Quot': '\\operatorname{Quot}', |
52 | | - '\\supp': '\\operatorname{supp}', |
53 | | - '\\Coexp': '\\operatorname{Coexp}', |
54 | | - '\\inc': '\\operatorname{inc}', |
55 | | - // categories |
56 | | - '\\Set': '\\mathbf{Set}', |
57 | | - '\\Rel': '\\mathbf{Rel}', |
58 | | - '\\Ab': '\\mathbf{Ab}', |
59 | | - '\\Grp': '\\mathbf{Grp}', |
60 | | - '\\Vect': '\\mathbf{Vect}', |
61 | | - '\\Ring': '\\mathbf{Ring}', |
62 | | - '\\Alg': '\\mathbf{Alg}', |
63 | | - '\\CRing': '\\mathbf{CRing}', |
64 | | - '\\CAlg': '\\mathbf{CAlg}', |
65 | | - '\\Rng': '\\mathbf{Rng}', |
66 | | - '\\Mon': '\\mathbf{Mon}', |
67 | | - '\\CMon': '\\mathbf{CMon}', |
68 | | - '\\Mod': '\\mathbf{Mod}', |
69 | | - '\\Fld': '\\mathbf{Fld}', |
70 | | - '\\FinAb': '\\mathbf{FinAb}', |
71 | | - '\\FinGrp': '\\mathbf{FinGrp}', |
72 | | - '\\FreeAb': '\\mathbf{FreeAb}', |
73 | | - '\\TorsFreeAb': '\\mathbf{TorsFreeAb}', |
74 | | - '\\TorsAb': '\\mathbf{TorsAb}', |
75 | | - '\\Cat': '\\mathbf{Cat}', |
76 | | - '\\Ban': '\\mathbf{Ban}', |
77 | | - '\\Meas': '\\mathbf{Meas}', |
78 | | - '\\Met': '\\mathbf{Met}', |
79 | | - '\\PMet': '\\mathbf{PMet}', |
80 | | - '\\Top': '\\mathbf{Top}', |
81 | | - '\\Haus': '\\mathbf{Haus}', |
82 | | - '\\sSet': '\\mathbf{sSet}', |
83 | | - '\\Man': '\\mathbf{Man}', |
84 | | - '\\LRS': '\\mathbf{LRS}', |
85 | | - '\\Sch': '\\mathbf{Sch}', |
86 | | - '\\Pos': '\\mathbf{Pos}', |
87 | | - '\\Prost': '\\mathbf{Prost}', |
88 | | - '\\FinOrd': '\\mathbf{FinOrd}', |
89 | | - '\\FinSet': '\\mathbf{FinSet}', |
90 | | - '\\FI': '\\mathbf{FI}', |
91 | | - '\\FS': '\\mathbf{FS}', |
92 | | - '\\Sp': '\\mathbf{Sp}', |
93 | | - '\\0': '\\mathbf{0}', |
94 | | - '\\1': '\\mathbf{1}', |
95 | | - '\\2': '\\mathbf{2}', |
96 | | - '\\On': '\\mathbf{On}', |
97 | | - '\\Idem': '\\mathbf{Idem}', |
98 | | - '\\Split': '\\mathbf{Split}', |
99 | | - '\\RS': '\\mathbf{RS}', |
100 | | - '\\CoAlg': '\\mathbf{CoAlg}', |
101 | | - '\\Cone': '\\mathbf{Cone}', |
102 | | - '\\SemiGrp': '\\mathbf{SemiGrp}', |
103 | | -} |
| 5 | +export const MACROS = YAML.parse( |
| 6 | + fs.readFileSync( |
| 7 | + path.join(process.cwd(), 'databases', 'catdat', 'data', 'macros.yaml'), |
| 8 | + 'utf8', |
| 9 | + ), |
| 10 | +) as Record<string, string> |
0 commit comments