forked from pyramation/LaTeX2JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installation.html
215 lines (154 loc) · 7.35 KB
/
installation.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<!-- built by Dan Lynch in Berkeley and San Francisco -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=5.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="title" content="Installing & Configurating MathJax | LaTeX2HTML5">
<title>Installing & Configurating MathJax | LaTeX2HTML5</title>
<meta name="keywords" content="Interactive Mathematics Diagrams and Equations, Dan Lynch, UC Berkeley, LaTeX, PSTricks, JavaScript">
<meta name="description" http-equiv="description" content="Build interactive math equations and diagrams online using LaTeX and PSTricks">
<meta property="og:title" content="LaTeX2HTML5 | Interactive Math Equations and Diagrams">
<meta property="og:description" content="Build interactive math equations and diagrams online using LaTeX and PSTricks">
<meta property="og:type" content="article">
<meta property="og:image" content="https://latex2html5.com/assets/images/photo.png">
<meta property="og:site_name" content="LaTeX2HTML5">
<!-- nice google font -->
<link href="https://fonts.googleapis.com/css?family=Arbutus+Slab" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/website.css">
<!-- latex2html5 css -->
<link rel="stylesheet" href="/css/latex2html5.css">
<!-- configuration -->
<script type="text/x-mathjax-config">
// <![CDATA[
MathJax.Hub.Config({
TeX: {extensions: ["AMSmath.js", "AMSsymbols.js"]},
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
showProcessingMessages : false,
messageStyle : "none" ,
showMathMenu: false ,
tex2jax: {
processEnvironments: true,
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
preview : "none",
processEscapes: true
},
"HTML-CSS": { linebreaks: { automatic:true, width: "latex-container"} }
});
// ]]>
</script>
<!-- mathjax -->
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- latex2html5 -->
<script type="text/javascript" src="/latex2html5.min.js"></script>
</head>
<body>
<a href="https://github.com/Mathapedia/LaTeX2HTML5" target="latexisawesome"><img style="position: fixed; z-index: 10000000; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
<div class="latex-container index-font">
<h1>Installing & Configurating MathJax</h1>
<h2><a href="/">LaTeX2HTML5</a></h2>
<p>Make sure you have both the MathJax configuration and script. Put this in your <head> tag:</p>
<pre>
<script type="text/x-mathjax-config">
// <![CDATA[
MathJax.Hub.Config({
TeX: {extensions: ["AMSmath.js", "AMSsymbols.js"]},
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
showProcessingMessages : false,
messageStyle : "none" ,
showMathMenu: false ,
tex2jax: {
processEnvironments: true,
inlineMath: [ ['$','$'], ["\(","\)"] ],
displayMath: [ ['$$','$$'], ["\[","\]"] ],
preview : "none",
processEscapes: true
},
"HTML-CSS": { linebreaks: { automatic:true, width: "latex-container"} }
});
// ]]>
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
</pre>
<h2>LaTeX2HTML5 Installation</h2>
<p>
<ol>
<li>
Simply download the <a href="https://raw.github.com/Mathapedia/LaTeX2HTML5/master/latex2html5.min.js" target="js">JS</a> and <a target="css" href="https://raw.github.com/Mathapedia/LaTeX2HTML5/master/css/latex2html5.css">CSS</a> files and include them on your <a href="http://www.mathjax.org" target="mathjax">MathJax</a> enabled website:
<pre>
<link rel="stylesheet" href="latex2html5.min.css">
<script type="text/javascript" src="latex2html5.min.js"></script>
</pre>
</li><li>
If you want the same font as the rendered examples:
<pre>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Arbutus+Slab" type="text/css">
</pre>
</li><li> You have three options for parsing the $\LaTeX$:
<ol>
<li>
You can put $\LaTeX$ inside of the current page within a script tag with the type set to "tex/latex":
<pre>
<script type="tex/latex">
... LaTeX here ...
</script>
<script type="text/javascript">
$('body').latex();
</script>
</pre>
</li><li>
or you can read a .tex file from somewhere else, which is nice for editing .tex files:
<pre>
<latex src="path/to/my/latex.tex">
<script type="text/javascript">
$('latex').LaTeX();
</script>
</pre>
</li><li>
or you can write it from scratch!
<pre>
MathJax.Hub.Register.StartupHook("End",function () {
$('[type="tex/latex"]').each(function (i, el) {
var $el = $(el);
var TEX = new LaTeX2HTML5.TeX({
tagName: 'section',
className: 'latex-container',
latex: $el.text()
});
TEX.render();
$el.replaceWith(TEX.$el);
});
});
</pre>
</li>
</ol>
</li>
</ol>
</p>
</div>
<div class="latex-container">
<a href="http://www.mathjax.org" target="mathjax">
<img title="Powered by MathJax"
src="http://cdn.mathjax.org/mathjax/badge/badge.gif"
border="0" alt="Powered by MathJax" />
</a>
</div>
<div class="latex-container">
<p><a href="http://nlynch.com" target="nlynch">Dan Lynch</a> © <a href="http://latex2html5.com" target="latex2html5">LaTeX2HTML5</a> 2014 </p>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44835762-1', 'latex2html5.com');
ga('send', 'pageview');
</script>
</body>
</html>