include asm mathjax
This commit is contained in:
parent
0e7058b946
commit
498a476b86
7 changed files with 859 additions and 673 deletions
4
d2renderers/d2latex/mathjax.js
vendored
4
d2renderers/d2latex/mathjax.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
const adaptor = MathJax._.adaptors.liteAdaptor.liteAdaptor();
|
||||
MathJax._.handlers.html_ts.RegisterHTMLHandler(adaptor)
|
||||
const html = MathJax._.mathjax.mathjax.document('', {
|
||||
InputJax: new MathJax._.input.tex_ts.TeX({ packages: ['base', 'mathtools', 'amscd', 'braket', 'cancel', 'cases', 'color', 'gensymb', 'mhchem', 'physics'] }),
|
||||
InputJax: new MathJax._.input.tex_ts.TeX({ packages: ['base', 'mathtools', 'ams', 'amscd', 'braket', 'cancel', 'cases', 'color', 'gensymb', 'mhchem', 'physics'] }),
|
||||
OutputJax: new MathJax._.output.svg_ts.SVG(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1374,6 +1374,12 @@ sugar -> c
|
|||
c: mixed together
|
||||
|
||||
c -> solution: we get
|
||||
|
||||
Linear program: {
|
||||
formula: |latex
|
||||
\\min_{ \\mathclap{\\substack{ x \\in \\mathbb{R}^n \\ x \\geq 0 \\ Ax \\leq b }}} c^T x
|
||||
|
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
201
e2etests/testdata/stable/latex/dagre/board.exp.json
generated
vendored
201
e2etests/testdata/stable/latex/dagre/board.exp.json
generated
vendored
|
|
@ -7,8 +7,8 @@
|
|||
"id": "a",
|
||||
"type": "text",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 151
|
||||
"x": 26,
|
||||
"y": 251
|
||||
},
|
||||
"width": 382,
|
||||
"height": 101,
|
||||
|
|
@ -47,8 +47,8 @@
|
|||
"id": "b",
|
||||
"type": "text",
|
||||
"pos": {
|
||||
"x": 442,
|
||||
"y": 193
|
||||
"x": 468,
|
||||
"y": 293
|
||||
},
|
||||
"width": 65,
|
||||
"height": 18,
|
||||
|
|
@ -87,8 +87,8 @@
|
|||
"id": "z",
|
||||
"type": "text",
|
||||
"pos": {
|
||||
"x": 243,
|
||||
"y": 0
|
||||
"x": 269,
|
||||
"y": 50
|
||||
},
|
||||
"width": 179,
|
||||
"height": 51,
|
||||
|
|
@ -127,8 +127,8 @@
|
|||
"id": "c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 398,
|
||||
"y": 352
|
||||
"x": 423,
|
||||
"y": 452
|
||||
},
|
||||
"width": 154,
|
||||
"height": 66,
|
||||
|
|
@ -168,8 +168,8 @@
|
|||
"id": "sugar",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 567,
|
||||
"y": 169
|
||||
"x": 593,
|
||||
"y": 269
|
||||
},
|
||||
"width": 86,
|
||||
"height": 66,
|
||||
|
|
@ -209,8 +209,8 @@
|
|||
"id": "solution",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 423,
|
||||
"y": 539
|
||||
"x": 448,
|
||||
"y": 639
|
||||
},
|
||||
"width": 104,
|
||||
"height": 66,
|
||||
|
|
@ -245,6 +245,87 @@
|
|||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "Linear program",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 10,
|
||||
"y": 30
|
||||
},
|
||||
"width": 122,
|
||||
"height": 92,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B4",
|
||||
"stroke": "B1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "Linear program",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 178,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "Linear program.formula",
|
||||
"type": "text",
|
||||
"pos": {
|
||||
"x": 40,
|
||||
"y": 60
|
||||
},
|
||||
"width": 62,
|
||||
"height": 32,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "transparent",
|
||||
"stroke": "N1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "\\\\min_{ \\\\mathclap{\\\\substack{ x \\\\in \\\\mathbb{R}^n \\\\ x \\\\geq 0 \\\\ Ax \\\\leq b }}} c^T x",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "latex",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 62,
|
||||
"labelHeight": 32,
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
|
|
@ -273,20 +354,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 285,
|
||||
"y": 51
|
||||
"x": 310.75,
|
||||
"y": 101
|
||||
},
|
||||
{
|
||||
"x": 209.8000030517578,
|
||||
"y": 91
|
||||
"x": 235.5500030517578,
|
||||
"y": 141
|
||||
},
|
||||
{
|
||||
"x": 191,
|
||||
"y": 111
|
||||
"x": 216.75,
|
||||
"y": 211
|
||||
},
|
||||
{
|
||||
"x": 191,
|
||||
"y": 151
|
||||
"x": 216.75,
|
||||
"y": 251
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
@ -320,20 +401,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 380.5,
|
||||
"y": 51
|
||||
"x": 406.25,
|
||||
"y": 101
|
||||
},
|
||||
{
|
||||
"x": 455.70001220703125,
|
||||
"y": 91
|
||||
"x": 481.45001220703125,
|
||||
"y": 141
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 119.30000305175781
|
||||
"x": 500.25,
|
||||
"y": 219.3000030517578
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 192.5
|
||||
"x": 500.25,
|
||||
"y": 292.5
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
@ -367,20 +448,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 191,
|
||||
"y": 252
|
||||
"x": 216.75,
|
||||
"y": 352
|
||||
},
|
||||
{
|
||||
"x": 191,
|
||||
"y": 292
|
||||
"x": 216.75,
|
||||
"y": 392
|
||||
},
|
||||
{
|
||||
"x": 232.3000030517578,
|
||||
"y": 314.09100341796875
|
||||
"x": 257.95001220703125,
|
||||
"y": 414
|
||||
},
|
||||
{
|
||||
"x": 397.5,
|
||||
"y": 362.45599365234375
|
||||
"x": 422.75,
|
||||
"y": 462
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
@ -414,20 +495,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 211.5
|
||||
"x": 500.25,
|
||||
"y": 311.5
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 283.8999938964844
|
||||
"x": 500.25,
|
||||
"y": 383.8999938964844
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 312
|
||||
"x": 500.25,
|
||||
"y": 412
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 352
|
||||
"x": 500.25,
|
||||
"y": 452
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
@ -461,20 +542,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 610,
|
||||
"y": 235.5
|
||||
"x": 635.75,
|
||||
"y": 335.5
|
||||
},
|
||||
{
|
||||
"x": 610,
|
||||
"y": 288.70001220703125
|
||||
"x": 635.75,
|
||||
"y": 388.70001220703125
|
||||
},
|
||||
{
|
||||
"x": 593.5999755859375,
|
||||
"y": 312
|
||||
"x": 619.3499755859375,
|
||||
"y": 412
|
||||
},
|
||||
{
|
||||
"x": 528,
|
||||
"y": 352
|
||||
"x": 553.75,
|
||||
"y": 452
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
@ -508,20 +589,20 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 417.5
|
||||
"x": 500.25,
|
||||
"y": 517.5
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 466.29998779296875
|
||||
"x": 500.25,
|
||||
"y": 566.2999877929688
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 490.70001220703125
|
||||
"x": 500.25,
|
||||
"y": 590.7000122070312
|
||||
},
|
||||
{
|
||||
"x": 474.5,
|
||||
"y": 539.5
|
||||
"x": 500.25,
|
||||
"y": 639.5
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
|
|
|
|||
581
e2etests/testdata/stable/latex/dagre/sketch.exp.svg
vendored
581
e2etests/testdata/stable/latex/dagre/sketch.exp.svg
vendored
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 79 KiB |
157
e2etests/testdata/stable/latex/elk/board.exp.json
generated
vendored
157
e2etests/testdata/stable/latex/elk/board.exp.json
generated
vendored
|
|
@ -8,7 +8,7 @@
|
|||
"type": "text",
|
||||
"pos": {
|
||||
"x": 12,
|
||||
"y": 143
|
||||
"y": 224
|
||||
},
|
||||
"width": 382,
|
||||
"height": 101,
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
"type": "text",
|
||||
"pos": {
|
||||
"x": 414,
|
||||
"y": 184
|
||||
"y": 265
|
||||
},
|
||||
"width": 65,
|
||||
"height": 18,
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
"type": "text",
|
||||
"pos": {
|
||||
"x": 235,
|
||||
"y": 12
|
||||
"y": 93
|
||||
},
|
||||
"width": 179,
|
||||
"height": 51,
|
||||
|
|
@ -127,8 +127,8 @@
|
|||
"id": "c",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 369,
|
||||
"y": 324
|
||||
"x": 315,
|
||||
"y": 455
|
||||
},
|
||||
"width": 154,
|
||||
"height": 66,
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 499,
|
||||
"y": 178
|
||||
"y": 259
|
||||
},
|
||||
"width": 86,
|
||||
"height": 66,
|
||||
|
|
@ -209,8 +209,8 @@
|
|||
"id": "solution",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 394,
|
||||
"y": 551
|
||||
"x": 340,
|
||||
"y": 682
|
||||
},
|
||||
"width": 104,
|
||||
"height": 66,
|
||||
|
|
@ -245,6 +245,87 @@
|
|||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "Linear program",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 434,
|
||||
"y": 12
|
||||
},
|
||||
"width": 223,
|
||||
"height": 132,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B4",
|
||||
"stroke": "B1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "Linear program",
|
||||
"fontSize": 28,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 178,
|
||||
"labelHeight": 36,
|
||||
"labelPosition": "INSIDE_TOP_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
},
|
||||
{
|
||||
"id": "Linear program.formula",
|
||||
"type": "text",
|
||||
"pos": {
|
||||
"x": 514,
|
||||
"y": 62
|
||||
},
|
||||
"width": 62,
|
||||
"height": 32,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "transparent",
|
||||
"stroke": "N1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "\\\\min_{ \\\\mathclap{\\\\substack{ x \\\\in \\\\mathbb{R}^n \\\\ x \\\\geq 0 \\\\ Ax \\\\leq b }}} c^T x",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "latex",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 62,
|
||||
"labelHeight": 32,
|
||||
"zIndex": 0,
|
||||
"level": 2
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
|
|
@ -274,11 +355,11 @@
|
|||
"route": [
|
||||
{
|
||||
"x": 294.9159851074219,
|
||||
"y": 63
|
||||
"y": 144
|
||||
},
|
||||
{
|
||||
"x": 294.9159851074219,
|
||||
"y": 143
|
||||
"y": 224
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
@ -312,19 +393,19 @@
|
|||
"route": [
|
||||
{
|
||||
"x": 354.5830078125,
|
||||
"y": 63
|
||||
"y": 144
|
||||
},
|
||||
{
|
||||
"x": 354.5830078125,
|
||||
"y": 103
|
||||
"y": 184
|
||||
},
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 103
|
||||
"y": 184
|
||||
},
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 185
|
||||
"y": 266
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
@ -357,20 +438,12 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 203,
|
||||
"y": 244
|
||||
"x": 354.4159851074219,
|
||||
"y": 325
|
||||
},
|
||||
{
|
||||
"x": 203,
|
||||
"y": 284
|
||||
},
|
||||
{
|
||||
"x": 408,
|
||||
"y": 284
|
||||
},
|
||||
{
|
||||
"x": 408,
|
||||
"y": 324
|
||||
"x": 354.4159851074219,
|
||||
"y": 455
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
@ -404,11 +477,19 @@
|
|||
"route": [
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 202
|
||||
"y": 283
|
||||
},
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 324
|
||||
"y": 365
|
||||
},
|
||||
{
|
||||
"x": 392.9159851074219,
|
||||
"y": 365
|
||||
},
|
||||
{
|
||||
"x": 392.9159851074219,
|
||||
"y": 455
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
@ -442,19 +523,19 @@
|
|||
"route": [
|
||||
{
|
||||
"x": 542,
|
||||
"y": 244
|
||||
"y": 325
|
||||
},
|
||||
{
|
||||
"x": 542,
|
||||
"y": 284
|
||||
"y": 415
|
||||
},
|
||||
{
|
||||
"x": 485,
|
||||
"y": 284
|
||||
"x": 431.4159851074219,
|
||||
"y": 415
|
||||
},
|
||||
{
|
||||
"x": 485,
|
||||
"y": 324
|
||||
"x": 431.4159851074219,
|
||||
"y": 455
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
@ -487,12 +568,12 @@
|
|||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 390
|
||||
"x": 392.9159851074219,
|
||||
"y": 521
|
||||
},
|
||||
{
|
||||
"x": 446.5,
|
||||
"y": 551
|
||||
"x": 392.9159851074219,
|
||||
"y": 682
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
|
|
|
|||
581
e2etests/testdata/stable/latex/elk/sketch.exp.svg
vendored
581
e2etests/testdata/stable/latex/elk/sketch.exp.svg
vendored
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 79 KiB |
Loading…
Reference in a new issue