forked from agrbin/svgtex
- Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmain.html
executable file
·149 lines (142 loc) · 4.91 KB
/
main.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
<!DOCTYPE html>
<!--
This is the main test form page, that is passed to the client by default.
-->
<html>
<head>
<script>
varloc=window.location.toString();
if(loc.substr(-1)!='/'){
window.location=loc+'/';
}
</script>
<scripttype='text/javascript'
src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.js'></script>
<scripttype='text/javascript'
src='//cdnjs.cloudflare.com/ajax/libs/js-yaml/3.2.7/js-yaml.min.js'></script>
<scripttype='text/javascript' src='resources/test.js'></script>
<styletype='text/css'>
tr {
vertical-align: top;
}
th {
text-align: right;
}
td {
padding-bottom:0.3em;
}
tr.button-row>td {
padding-top:0.5em;
}
.disabled {
color:#AAA;
}
</style>
</head>
<body>
<h1>RenderMath</h1>
<p>
Enter MathML, LaTeX or JATS in the content box below, or select a file.
</p>
<formid='form' method='POST' action='.'>
<p>
<inputtype="file" id='file' name="file" />
</p>
<table>
<tr>
<th><labelfor='math-in-format-select'>Math format</label></th>
<td>
<selectid='math-in-format-select' name='in-format'>
<optionvalue='auto' selected='selected'>Auto-detect</option>
<optionvalue='mml'>MathML</option>
<optionvalue='latex'>LaTeX</option>
<optionvalue='jats'>JATS</option>
</select>
   
<labelid='latex-style-label' for='latex-style-select'>LaTeX style:</label>
<selectid='latex-style-select' name='latex-style'>
<optionvalue='display' selected='selected'>display (block)</option>
<optionvalue='text' selected='selected'>text (inline)</option>
</select>
</td>
</tr>
<tr>
<th><labelfor='q'>Content</label></th>
<td>
<textareaname='q' id='q' rows='20' cols='100'></textarea>
<!--
<input type='hidden' name='q' id='q' value='fleegle'>
-->
</td>
</tr>
<!--
<tr>
<th><label for='out-format-select'>Output format</label></th>
<td>
<select id='out-format-select' name='out-format'>
<option value='svg' selected='selected'>SVG</option>
<option value='client'>Client rendering</option>
</select>
</td>
</tr>
-->
<tr>
<th><labelfor='max-width-input'>Maximum width</label></th>
<td>
<!-- width initial value is that allowed for equations in PMC -->
<inputid='max-width-input' type='text' name='width' value='621'/>
</td>
</tr>
<tr>
<th><labelfor='method'>HTTP method</label></th>
<td>
<selectid='method'>
<optionvalue='POST' selected='selected'>POST</option>
<optionvalue='GET'>GET</option>
</select>
</td>
</tr>
<trclass='button-row'>
<tdcolspan='2'>
<divstyle='float: right'>
<inputtype='reset' value='Reset'/>
</div>
<inputtype='submit'/>
</td>
</tr>
</table>
</form>
<h2>Description</h2>
<div>
<p>Use this service to test the rendering of mathematical formulas with MathJax.
</p>
<p>This is really two services in one:</p>
<ol>
<li>When you provide it with a single formula in either LaTeX or MathML format,
then that formula will be rendered on our
servers, and the results will be returned as a pure SVG resource.</li>
<li>When you provide it with a JATS file that contains one or more equations,
then all of the formulas will be extracted from that JATS file, and sent back to your browser
encapsulated in an HTML table. Your browser will then use MathJax to render the
formulas locally.</li>
</ol>
<p>
When MathML is provided with a namespace prefix, that prefix <em>must be
"mml:"</em>. No other namespace prefix will work.
</p>
</div>
<h2>Examples</h2>
<divid='examples-div'>
<ul/>
</div>
<hr/>
<p>
<spanstyle='font-style: italic'>Version <!-- version --></span>
</p>
<ahref="https://github.com/ncbi/render-math"><img
style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" /></a>
</body>
</html>