1 |
|
2 | import {defineFunctionBuilders} from "../defineFunction";
|
3 | import mathMLTree from "../mathMLTree";
|
4 |
|
5 | import * as mml from "../buildMathML";
|
6 |
|
7 | const pad = () => {
|
8 | const padNode = new mathMLTree.MathNode("mtd", []);
|
9 | padNode.setAttribute("width", "50%");
|
10 | return padNode;
|
11 | };
|
12 |
|
13 | defineFunctionBuilders({
|
14 | type: "tag",
|
15 | mathmlBuilder(group, options) {
|
16 | const table = new mathMLTree.MathNode("mtable", [
|
17 | new mathMLTree.MathNode("mtr", [
|
18 | pad(),
|
19 | new mathMLTree.MathNode("mtd", [
|
20 | mml.buildExpressionRow(group.body, options),
|
21 | ]),
|
22 | pad(),
|
23 | new mathMLTree.MathNode("mtd", [
|
24 | mml.buildExpressionRow(group.tag, options),
|
25 | ]),
|
26 | ]),
|
27 | ]);
|
28 | table.setAttribute("width", "100%");
|
29 | return table;
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | },
|
39 | });
|
40 |
|