-
Notifications
You must be signed in to change notification settings - Fork 26
/
v3-lab.html
165 lines (156 loc) · 3.71 KB
/
v3-lab.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>MathJax v3 Interactive Lab</title>
<!--[if IE 11]>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<![endif]-->
<script src="lib/traceur.min.js"></script>
<script src="lib/system.js"></script>
<script>
System.config({
map: {
'mj-context-menu': './node_modules/mj-context-menu'
}
});
</script>
<style>
h1 {
margin-left: 1.5em;
margin-top: .25em;
}
body {
min-height: 50em;
}
#layout {
padding-left: .5em;
display: table;
width: 100%;
box-sizing: border-box;
min-height: 20em;
}
#layout > div {
display: table-row;
}
#layout > div > div {
display: table-cell;
vertical-align: top;
}
#layout > div > div:last-child {
width: 18em;
max-width: 18em;
}
#main {
display: inline-block;
}
#input {
width: 100%;
box-sizing: border-box;
}
#buttons {
text-align: right;
margin-top: 3px;
margin-bottom: 1em;
}
.output {
border: 1px solid black;
padding: 10px;
width: 100%;
max-width: 45em;
overflow: auto;
box-sizing: border-box;
font-size: 150%;
}
#mathml {
margin-top: 1.1em;
font-size: 90%;
width: 0;
}
#controls {
padding-left: 1em;
font-size: 80%;
}
#controls > div {
margin-bottom: .5em;
white-space: nowrap;
}
#controls > hr {
border: none;
border-top: 2px dotted;
margin: .7em 1em .7em 0;
}
#package {
margin-top: .5em;
white-space: normal ! important;
}
#package > span > span {
display: inline-block;
width: 9em;
white-space: nowrap;
}
#package label {
padding-left: 5px;
}
input[disabled] + label {
color: #AAAAAA;
}
</style>
</head>
<body>
<h1>MathJax v3 Interactive Lab</h1>
<div id="layout">
<div>
<div id="main">
<textarea id="input" rows="15" onkeypress="Lab.checkKey(this,event)"></textarea>
<div id="buttons">
<input id="keep" type="button" value="Keep" onclick="Lab.Keep()" disabled />
<input id="typeset" type="button" value="Typeset" onclick="Lab.Typeset()" disabled />
</div>
<div class="output" id="output"></div>
<div class="output" id="output2"></div>
<pre id="mathml"></pre>
</div>
<div id="controls">
<div>
<label for="format">Input:</label>
<select id="format" onchange="Lab.setFormat(this.value)">
<option value="TeX D">Display TeX</option>
<option value="TeX I">Inline TeX</option>
<option value="MathML">MathML</option>
</select>
</div>
<div>
<label for="renderer">Output:</label>
<select id="renderer" onchange="Lab.setRenderer(this.value)">
<option value="CHTML">CHTML</option>
<option value="SVG">SVG</option>
</select>
</div>
<div>
<input type="checkbox" id="showMML" onchange="Lab.setMathML(this.checked)" /><label for="showMML"> Show MathML</label><br/>
<input type="checkbox" id="showSecondOutput" onchange="Lab.setSecondOutput(this.checked)" /><label for="showSecondOutput"> Show 2nd Output</label>
</div>
<hr/>
<div>
<input type="checkbox" id="enrich" onchange="Lab.setEnrich(this.checked)" /><label for="enrich"> Enrich MathML</label><br/>
<input type="checkbox" id="compute" onchange="Lab.setCompute(this.checked)" /><label for="compute"> Compute Complexity</label><br/>
<input type="checkbox" id="collapse" onchange="Lab.setCollapse(this.checked)" /><label for="collapse"> Collapse Complex Math</label><br/>
<input type="checkbox" id="explore" onchange="Lab.setExplorer(this.checked)" /><label for="explore"> Math Explorer</label><br/>
</div>
<hr/>
<div id="package"></div>
</div>
</div>
</div>
<script>
__dirname = String(location.href).replace(/v3-lab\.html.*/, 'mathjax3/components/src');
</script>
<script>
System.import('./lib/v3-lab.js')
.then(function () {return System.import('./mathjax3/components/src/startup/startup.js')})
.catch(function (error) {console.log(error.message)});
</script>
</body>
</html>