include asm mathjax

This commit is contained in:
Alexander Wang 2023-08-08 12:24:35 -07:00
parent 0e7058b946
commit 498a476b86
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
7 changed files with 859 additions and 673 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
const adaptor = MathJax._.adaptors.liteAdaptor.liteAdaptor(); const adaptor = MathJax._.adaptors.liteAdaptor.liteAdaptor();
MathJax._.handlers.html_ts.RegisterHTMLHandler(adaptor) MathJax._.handlers.html_ts.RegisterHTMLHandler(adaptor)
const html = MathJax._.mathjax.mathjax.document('', { 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(), OutputJax: new MathJax._.output.svg_ts.SVG(),
}); });

View file

@ -1374,6 +1374,12 @@ sugar -> c
c: mixed together c: mixed together
c -> solution: we get 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
|
}
`, `,
}, },
{ {

View file

@ -7,8 +7,8 @@
"id": "a", "id": "a",
"type": "text", "type": "text",
"pos": { "pos": {
"x": 0, "x": 26,
"y": 151 "y": 251
}, },
"width": 382, "width": 382,
"height": 101, "height": 101,
@ -47,8 +47,8 @@
"id": "b", "id": "b",
"type": "text", "type": "text",
"pos": { "pos": {
"x": 442, "x": 468,
"y": 193 "y": 293
}, },
"width": 65, "width": 65,
"height": 18, "height": 18,
@ -87,8 +87,8 @@
"id": "z", "id": "z",
"type": "text", "type": "text",
"pos": { "pos": {
"x": 243, "x": 269,
"y": 0 "y": 50
}, },
"width": 179, "width": 179,
"height": 51, "height": 51,
@ -127,8 +127,8 @@
"id": "c", "id": "c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 398, "x": 423,
"y": 352 "y": 452
}, },
"width": 154, "width": 154,
"height": 66, "height": 66,
@ -168,8 +168,8 @@
"id": "sugar", "id": "sugar",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 567, "x": 593,
"y": 169 "y": 269
}, },
"width": 86, "width": 86,
"height": 66, "height": 66,
@ -209,8 +209,8 @@
"id": "solution", "id": "solution",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 423, "x": 448,
"y": 539 "y": 639
}, },
"width": 104, "width": 104,
"height": 66, "height": 66,
@ -245,6 +245,87 @@
"labelPosition": "INSIDE_MIDDLE_CENTER", "labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0, "zIndex": 0,
"level": 1 "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": [ "connections": [
@ -273,20 +354,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 285, "x": 310.75,
"y": 51 "y": 101
}, },
{ {
"x": 209.8000030517578, "x": 235.5500030517578,
"y": 91 "y": 141
}, },
{ {
"x": 191, "x": 216.75,
"y": 111 "y": 211
}, },
{ {
"x": 191, "x": 216.75,
"y": 151 "y": 251
} }
], ],
"isCurve": true, "isCurve": true,
@ -320,20 +401,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 380.5, "x": 406.25,
"y": 51 "y": 101
}, },
{ {
"x": 455.70001220703125, "x": 481.45001220703125,
"y": 91 "y": 141
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 119.30000305175781 "y": 219.3000030517578
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 192.5 "y": 292.5
} }
], ],
"isCurve": true, "isCurve": true,
@ -367,20 +448,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 191, "x": 216.75,
"y": 252 "y": 352
}, },
{ {
"x": 191, "x": 216.75,
"y": 292 "y": 392
}, },
{ {
"x": 232.3000030517578, "x": 257.95001220703125,
"y": 314.09100341796875 "y": 414
}, },
{ {
"x": 397.5, "x": 422.75,
"y": 362.45599365234375 "y": 462
} }
], ],
"isCurve": true, "isCurve": true,
@ -414,20 +495,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 474.5, "x": 500.25,
"y": 211.5 "y": 311.5
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 283.8999938964844 "y": 383.8999938964844
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 312 "y": 412
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 352 "y": 452
} }
], ],
"isCurve": true, "isCurve": true,
@ -461,20 +542,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 610, "x": 635.75,
"y": 235.5 "y": 335.5
}, },
{ {
"x": 610, "x": 635.75,
"y": 288.70001220703125 "y": 388.70001220703125
}, },
{ {
"x": 593.5999755859375, "x": 619.3499755859375,
"y": 312 "y": 412
}, },
{ {
"x": 528, "x": 553.75,
"y": 352 "y": 452
} }
], ],
"isCurve": true, "isCurve": true,
@ -508,20 +589,20 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 474.5, "x": 500.25,
"y": 417.5 "y": 517.5
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 466.29998779296875 "y": 566.2999877929688
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 490.70001220703125 "y": 590.7000122070312
}, },
{ {
"x": 474.5, "x": 500.25,
"y": 539.5 "y": 639.5
} }
], ],
"isCurve": true, "isCurve": true,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View file

@ -8,7 +8,7 @@
"type": "text", "type": "text",
"pos": { "pos": {
"x": 12, "x": 12,
"y": 143 "y": 224
}, },
"width": 382, "width": 382,
"height": 101, "height": 101,
@ -48,7 +48,7 @@
"type": "text", "type": "text",
"pos": { "pos": {
"x": 414, "x": 414,
"y": 184 "y": 265
}, },
"width": 65, "width": 65,
"height": 18, "height": 18,
@ -88,7 +88,7 @@
"type": "text", "type": "text",
"pos": { "pos": {
"x": 235, "x": 235,
"y": 12 "y": 93
}, },
"width": 179, "width": 179,
"height": 51, "height": 51,
@ -127,8 +127,8 @@
"id": "c", "id": "c",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 369, "x": 315,
"y": 324 "y": 455
}, },
"width": 154, "width": 154,
"height": 66, "height": 66,
@ -169,7 +169,7 @@
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 499, "x": 499,
"y": 178 "y": 259
}, },
"width": 86, "width": 86,
"height": 66, "height": 66,
@ -209,8 +209,8 @@
"id": "solution", "id": "solution",
"type": "rectangle", "type": "rectangle",
"pos": { "pos": {
"x": 394, "x": 340,
"y": 551 "y": 682
}, },
"width": 104, "width": 104,
"height": 66, "height": 66,
@ -245,6 +245,87 @@
"labelPosition": "INSIDE_MIDDLE_CENTER", "labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0, "zIndex": 0,
"level": 1 "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": [ "connections": [
@ -274,11 +355,11 @@
"route": [ "route": [
{ {
"x": 294.9159851074219, "x": 294.9159851074219,
"y": 63 "y": 144
}, },
{ {
"x": 294.9159851074219, "x": 294.9159851074219,
"y": 143 "y": 224
} }
], ],
"animated": false, "animated": false,
@ -312,19 +393,19 @@
"route": [ "route": [
{ {
"x": 354.5830078125, "x": 354.5830078125,
"y": 63 "y": 144
}, },
{ {
"x": 354.5830078125, "x": 354.5830078125,
"y": 103 "y": 184
}, },
{ {
"x": 446.5, "x": 446.5,
"y": 103 "y": 184
}, },
{ {
"x": 446.5, "x": 446.5,
"y": 185 "y": 266
} }
], ],
"animated": false, "animated": false,
@ -357,20 +438,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 203, "x": 354.4159851074219,
"y": 244 "y": 325
}, },
{ {
"x": 203, "x": 354.4159851074219,
"y": 284 "y": 455
},
{
"x": 408,
"y": 284
},
{
"x": 408,
"y": 324
} }
], ],
"animated": false, "animated": false,
@ -404,11 +477,19 @@
"route": [ "route": [
{ {
"x": 446.5, "x": 446.5,
"y": 202 "y": 283
}, },
{ {
"x": 446.5, "x": 446.5,
"y": 324 "y": 365
},
{
"x": 392.9159851074219,
"y": 365
},
{
"x": 392.9159851074219,
"y": 455
} }
], ],
"animated": false, "animated": false,
@ -442,19 +523,19 @@
"route": [ "route": [
{ {
"x": 542, "x": 542,
"y": 244 "y": 325
}, },
{ {
"x": 542, "x": 542,
"y": 284 "y": 415
}, },
{ {
"x": 485, "x": 431.4159851074219,
"y": 284 "y": 415
}, },
{ {
"x": 485, "x": 431.4159851074219,
"y": 324 "y": 455
} }
], ],
"animated": false, "animated": false,
@ -487,12 +568,12 @@
"labelPercentage": 0, "labelPercentage": 0,
"route": [ "route": [
{ {
"x": 446.5, "x": 392.9159851074219,
"y": 390 "y": 521
}, },
{ {
"x": 446.5, "x": 392.9159851074219,
"y": 551 "y": 682
} }
], ],
"animated": false, "animated": false,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 79 KiB