Skip to content

Commit

Permalink
Merge branch '3.1.3-update'
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Apr 28, 2021
2 parents ce536c8 + 3a0774e commit 1642dbd
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 18 deletions.
6 changes: 4 additions & 2 deletions custom-build/custom-mathjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ Enrich(Register(browser()), new MathML());
// Initialize mathjax with the DOM document.
//
const html = mathjax.document(document, {
enrichSpeech: 'deep', // deep labels on the enriched MathML
sre: {
speech: 'deep', // deep labels on the enriched MathML
},
renderActions: {
//
// Remove the data-semantic-* attributes (and move speech to data-speech)
Expand Down Expand Up @@ -97,7 +99,7 @@ window.MathJax = {
},

speechLevel(level) {
html.options.enrichSpeech = level;
html.options.sre.speech = level;
}
}

Expand Down
34 changes: 33 additions & 1 deletion custom-build/custom-mathjax.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion custom-component/custom-component.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion custom-tex-extension/mml.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion input-mml2svg.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ The key lines are
</script>
```

When the user presses the `Render MathML` button, the `convert()` function above runs. The comments in the code explain how the conversion process is handled. Unlike the similar TeX examples, this example uses synchronous processing, rather than a promise-based one, since there is no equivalent to the `\require` macro in MathML input to cause an extension to be dynamically loaded. That also means it is unnecessary to disable the render button, since the `convert()` function will complete before any other user interaction can table place.
When the user presses the `Render MathML` button, the `convert()` function above runs. The comments in the code explain how the conversion process is handled. Unlike the similar TeX examples, this example uses synchronous processing, rather than a promise-based one, since there is no equivalent to the `\require` macro in MathML input to cause an extension to be dynamically loaded. That also means it is unnecessary to disable the render button, since the `convert()` function will complete before any other user interaction can take place.

[Run the example](https://mathjax.github.io/MathJax-demos-web/input-mml2svg.html)
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "MathJax-demos-web",
"version": "3.1.0",
"version": "3.1.4",
"description": "Demos using MathJax version 3 in web pages",
"dependencies": {
"mathjax-full": "^3.1.0"
"mathjax-full": "^3.1.4"
},
"devDependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"babel-loader": "^8.1.0",
"terser-webpack-plugin": "^4.1.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
"@babel/core": "^7.13.16",
"@babel/preset-env": "^7.13.15",
"babel-loader": "^8.2.2",
"terser-webpack-plugin": "^5.1.1",
"webpack": "^5.36.1",
"webpack-cli": "^4.6.0"
},
"scripts": {
"make-custom-tex-extension": "cd custom-tex-extension && node ../node_modules/mathjax-full/components/bin/pack",
Expand Down
4 changes: 2 additions & 2 deletions speech-generator/convert-with-speech.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
loader: {load: ['input/asciimath', 'input/mml', 'input/tex', 'output/svg', 'sre/sre_browser']},
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
startup: {
ready: function() {
ready: function() {
MathJax.startup.defaultReady();
// Initialise convert when MathJax/SRE is fully loaded.
MathJax.startup.promise.then(function () {
Convert.init();
});
}
}
}
};
</script>
Expand Down
4 changes: 3 additions & 1 deletion speech-tex-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
MathJax = {
loader: {load: ['a11y/semantic-enrich']},
options: {
enrichSpeech: 'shallow', // one of: 'deep', 'shallow', or 'none'
sre: {
speech: 'shallow' // one of: 'deep', 'shallow', or 'none'
},
renderActions: {
//
// Force speech enrichment regardless of the menu settings
Expand Down
4 changes: 3 additions & 1 deletion speech-tex-chtml.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ The key lines are
MathJax = {
loader: {load: ['a11y/semantic-enrich']},
options: {
enrichSpeech: 'shallow', // one of: 'deep', 'shallow', or 'none'
sre: {
speech: 'shallow' // one of: 'deep', 'shallow', or 'none'
},
renderActions: {
//
// Force speech enrichment regardless of the menu settings
Expand Down

0 comments on commit 1642dbd

Please sign in to comment.