-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from mathjax/update_4.2.1
Update 3.2.1
- Loading branch information
Showing
7 changed files
with
106 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!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"> | ||
<style> | ||
kbd { | ||
display: inline-block; | ||
padding: 3px 5px; | ||
font-size: 11px; | ||
line-height: 10px; | ||
color: #444d56; | ||
vertical-align: middle; | ||
background-color: #fafbfc; | ||
border: solid 1px #c6cbd1; | ||
border-bottom-color: #959da5; | ||
border-radius: 3px; | ||
box-shadow: inset 0 -1px 0 #959da5; | ||
} | ||
</style> | ||
<title>MathJax v3 with TeX input and HTML output with speech</title> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> | ||
<script> | ||
MathJax = { | ||
loader: {load: ['a11y/sre']}, | ||
options: { | ||
menuOptions: { | ||
settings: { | ||
explorer: true, | ||
assistiveMml: false | ||
} | ||
} | ||
}, | ||
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. Focus on a formula and press <kbd>Enter</kbd> to start exploration with the arrow keys. | ||
</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# [speech-expolrer-tex.html](https://mathjax.github.io/MathJax-demos-web/speech-explorer-tex.html) | ||
|
||
This example shows how to enable MathJax's accessibility extension to attach speech to typeset math and enable interactive exploration of expressions. | ||
|
||
The key lines are | ||
|
||
``` html | ||
<script> | ||
MathJax = { | ||
loader: {load: ['a11y/sre']}, | ||
options: { | ||
menuOptions: { | ||
settings: { | ||
explorer: true, | ||
assistiveMml: false | ||
} | ||
} | ||
}, | ||
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]} | ||
}; | ||
</script> | ||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> | ||
``` | ||
|
||
which causes the `a11y/sre` extension to be loaded, and modifies the menu settings to initialise the interactive explorer on page load. In addition we can switch off the assistive mml extension as it is no longer needed. | ||
|
||
[Run the example](https://mathjax.github.io/MathJax-demos-web/speech-explorer-tex.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters