-
Notifications
You must be signed in to change notification settings - Fork 107
/
speech-tex-chtml.html
42 lines (39 loc) · 1.1 KB
/
speech-tex-chtml.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with TeX input and HTML output with speech</title>
<script>
MathJax = {
loader: {load: ['a11y/semantic-enrich']},
options: {
sre: {
speech: 'shallow' // one of: 'deep', 'shallow', or 'none'
},
renderActions: {
//
// Force speech enrichment regardless of the menu settings
//
enrich: {'[+]': [
function (doc) {doc.enrich(true)},
function (math, doc) {math.enrich(doc, true)}
]}
}
},
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
</head>
<body>
<p>
These expressions will have auto-generated speech attached for screen readers.
</p>
<p>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</p>
</body>
</html>