Skip to content

Commit

Permalink
Update for 3.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Aug 29, 2019
1 parent c1610aa commit eaffa2d
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 39 deletions.
2 changes: 1 addition & 1 deletion custom-build/custom-mathjax.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>A custom build of MathJax v3 with speech</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="../mathjax3/sre/sre_browser.js"></script>
<script>
MathJax = {
Expand Down
2 changes: 1 addition & 1 deletion custom-component/custom-component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 custom combined component file</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="custom-component.min.js" id="MathJax-script" async></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion custom-tex-extension/mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with custom TeX extension</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
loader: {
Expand Down
5 changes: 2 additions & 3 deletions customized-load.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with customized list of components</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
loader: {
load: [
'input/tex-base', '[tex]/newcommand', '[tex]/action',
'output/chtml',
'a11y/explorer'
'output/chtml'
]
},
tex: {
Expand Down
4 changes: 2 additions & 2 deletions equation-numbers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Testing MathJax v3 Equation Numbering</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
tags: 'AMS' // should be 'AMS', 'none', or 'all'
tags: 'ams' // should be 'ams', 'none', or 'all'
}
};
</script>
Expand Down
4 changes: 1 addition & 3 deletions equation-refs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Testing MathJax v3 Equation Numbering</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
Expand All @@ -29,9 +29,7 @@
<h1>A test of Equation References</h1>

<div style="padding:0 2em">
<b>Note:</b> Forward references don't work yet.

<hr>
Here is a labeled equation:
$$x+1\over\sqrt{1-x^2}\label{ref1}$$
with a reference to ref1: \ref{ref1},
Expand Down
4 changes: 2 additions & 2 deletions input-mml2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive MathML input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
<script>
function convert() {
Expand All @@ -16,7 +16,7 @@
output = document.getElementById('output');
output.innerHTML = '';
//
// Convert the MathMl to an HTML node and append it to the output
// Convert the MathML to an HTML node and append it to the output
//
output.appendChild(MathJax.mathml2chtml(input));
//
Expand Down
2 changes: 1 addition & 1 deletion input-mml2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive MathML input and SVG output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
<script>
function convert() {
Expand Down
7 changes: 5 additions & 2 deletions input-tex2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script>
function convert() {
Expand All @@ -26,11 +26,14 @@
output.innerHTML = '';
//
// Reset the tex labels (and automatic equation numbers, though there aren't any here).
// Get the conversion options (metrics and display settings)
// Convert the input to CommonHTML output and use a promise to wait for it to be ready
// (in case an extension needs to be loaded dynamically).
//
MathJax.texReset();
MathJax.tex2chtmlPromise(input, {display: display.checked}).then(function (node) {
var options = MathJax.getMetricsFor(output);
options.display = display.checked;
MathJax.tex2chtmlPromise(input, options).then(function (node) {
//
// The promise returns the typeset node, which we add to the output
// Then update the document to include the adjusted CSS for the
Expand Down
2 changes: 1 addition & 1 deletion input-tex2mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX input and MathML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
loader: {load: ['input/tex']}
Expand Down
7 changes: 5 additions & 2 deletions input-tex2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX input and SVG output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/tex-svg.js" id="MathJax-script" async></script>
<script>
function convert() {
Expand All @@ -26,11 +26,14 @@
output.innerHTML = '';
//
// Reset the tex labels (and automatic equation numbers, though there aren't any here).
// Get the conversion options (metrics and display settings)
// Convert the input to SVG output and use a promise to wait for it to be ready
// (in case an extension needs to be loaded dynamically).
//
MathJax.texReset();
MathJax.tex2svgPromise(input, {display: display.checked}).then(function (node) {
var options = MathJax.getMetricsFor(output);
options.display = display.checked;
MathJax.tex2svgPromise(input, options).then(function (node) {
//
// The promise returns the typeset node, which we add to the output
// Then update the document to include the adjusted CSS for the
Expand Down
6 changes: 3 additions & 3 deletions input-tex_mml2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX and MathML input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
Expand Down Expand Up @@ -41,8 +41,8 @@
// Typeset the page, using a promise to let us know when that is complete
//
MathJax.texReset();
MathJax.TypesetClear();
MathJax.TypesetPromise()
MathJax.typesetClear();
MathJax.typesetPromise()
.catch(function (err) {
//
// If there was an internal error, put the message into the output instead
Expand Down
6 changes: 3 additions & 3 deletions input-tex_mml2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX and MathML input and SVG output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
Expand Down Expand Up @@ -42,8 +42,8 @@
// Typeset the page, using a promise to let us know when that is complete
//
MathJax.texReset();
MathJax.TypesetClear();
MathJax.TypesetPromise()
MathJax.typesetClear();
MathJax.typesetPromise()
.catch(function (err) {
//
// If there was an internal error, put the message into the output instead
Expand Down
4 changes: 2 additions & 2 deletions mml-attribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Add a data-mathml attribute to each math element</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
startup: {
Expand Down Expand Up @@ -36,7 +36,7 @@
the MathML representation of the expression, and a
<code>data-original</code> attribute holding the original TeX format
of the expression. Inspect the document DOM to see these in place
(on the `mjx-container` element).
(on the <code>mjx-container</code> element).
</p>

$$\sqrt{\frac{1+x}{1-x}}$$
Expand Down
2 changes: 1 addition & 1 deletion mml-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with MathML input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion mml-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with MathML input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion reveal-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 dynamic equations using CSS and javascript</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
Expand Down
2 changes: 1 addition & 1 deletion speech-tex-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with TeX input and HTML output with speech</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
loader: {load: ['a11y/semantic-enrich']},
Expand Down
2 changes: 1 addition & 1 deletion tex-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with TeX input and HTML output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
Expand Down
2 changes: 1 addition & 1 deletion tex-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Defining macros in-line in MathJax3</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
Expand Down
2 changes: 1 addition & 1 deletion tex-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with TeX input and SVG output</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
Expand Down
2 changes: 1 addition & 1 deletion toggle-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 dynamic equations using toggle</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
Expand Down
14 changes: 10 additions & 4 deletions v2-color.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with v3 \color macro</title>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<title>MathJax v3 with v2 \color macro</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
autoload: {color: []} // don't autoload the color extension
autoload: {
color: [], // don't autoload the color extension
colorV2: ['color'] // autoload v2 color extension
}
}
};
</script>
Expand Down Expand Up @@ -43,7 +46,10 @@
&lt;script&gt;
MathJax = {
tex: {
autoload: {color: []} // don't autoload the color extension
autoload: {
color: [], // don't autoload the color extension
colorV2: ['color'] // autoload v2 color insteady
}
}
};
&lt;/script&gt;
Expand Down

0 comments on commit eaffa2d

Please sign in to comment.