Skip to content

Commit

Permalink
Change URL to MathJax to the CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Aug 30, 2019
1 parent ace72a1 commit 4bf68f6
Show file tree
Hide file tree
Showing 49 changed files with 97 additions and 50 deletions.
3 changes: 2 additions & 1 deletion assistive-mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>
<h1>MathJax Assistive MathML</h1>
Expand Down
3 changes: 2 additions & 1 deletion assistive-mml.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which sets up some CSS to make the MathML not visible to the sited, but still available to screen readers, then sets up a function `addAssistiveMML()` that gets the MathML for the math item as a string, and then parses it into HTML nodes. It then puts the `<math>` node into a `mjx-assistive-mml` node (which uses the CSS above), and has the attributes needed to have it act properly fort the screen reader. Finally, it sets the needed attributes for the original MathML container and hides the visual output from the screen reader, and inserts the assistive MathML into the container.
Expand Down
2 changes: 1 addition & 1 deletion custom-build/custom-mathjax.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width">
<title>A custom build of MathJax v3 with speech</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="../mathjax3/sre/sre_browser.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/sre/sre_browser.js"></script>
<script>
MathJax = {
ready: function () {
Expand Down
3 changes: 2 additions & 1 deletion custom-tex-extension/mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
}
};
</script>
<script src="../mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion custom-tex-extension/mml.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ To use this in your own web page, the key lines are
}
};
</script>
<script src="../mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

This asks the loader to load the custom extension file, and defines the `[custom]` path to be the directory relative to the `mml.html` example file (`mml.min.js` is in the same directory). The tex component is configured to add the `mml` package to the other packages already there by default. Finally, the `tex-chtml` component is loaded, and MathJax does the rest.
Expand Down
3 changes: 2 additions & 1 deletion customized-load.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
};
</script>
<script src="mathjax3/startup.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?startup.js"></script>
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion customized-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/startup.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?startup.js"></script>
```

Here, we specify the 'tex-base' input jax (which is TeX with no extra packages included), and explicitly load the `newcommand` and `action` extensions. We also load the `chtml` output jax, and the `explorer` assistive technology module.
Expand Down
3 changes: 2 additions & 1 deletion equation-numbers.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
<Style>
h1 {
text-align: center;
Expand Down
3 changes: 2 additions & 1 deletion equation-numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which configures the TeX input jax to include automatic tags for equations in AMS environments that call for them. The math on the page includes examples of starred environments (that tells MathJax not to number those equations), and of the use of `\notag` to prevent a tag on an equation, and `\tag{}` to override the default tag number.
Expand Down
3 changes: 2 additions & 1 deletion equation-refs.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
<Style>
h1 {
text-align: center;
Expand Down
3 changes: 2 additions & 1 deletion equation-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which configures the TeX input jax to include automatic tags for equations in AMS environments that call for them. The math on the page includes examples of starred environments (that tells MathJax not to number those equations), and of the use of `\notag` to prevent a tag on an equation, and `\tag{}` to override the default tag number.
Expand Down
3 changes: 2 additions & 1 deletion input-mml2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive MathML input and HTML output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-mml2chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `MathJax.mathml2chtml()` function to process u
The key lines are

```
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-mml2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive MathML input and SVG output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-svg.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-mml2svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `MathJax.mathml2svg()` function to process use
The key lines are

```
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-svg.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX input and HTML output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `MathJax.tex2chtmlPromise()` function to proce
The key lines are

```
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
loader: {load: ['input/tex']}
};
</script>
<script src="mathjax3/startup.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?startup.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2mml.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `MathJax.tex2mmlPromise()` function to process
The key lines are

```
<script src="mathjax3/startup.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?startup.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with interactive TeX input and SVG output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/tex-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-svg.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex2svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `MathJax.tex2svgPromise()` function to process
The key lines are

```
<script src="mathjax3/tex-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-svg.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex_mml2chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
}
}
</script>
<script src="mathjax3/tex-mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-mml-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex_mml2chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ The key lines are
}
}
</script>
<script src="mathjax3/tex-mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-mml-chtml.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex_mml2svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}
}
</script>
<script src="mathjax3/tex-mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-mml-svg.js"></script>
<script>
function convert() {
//
Expand Down
3 changes: 2 additions & 1 deletion input-tex_mml2svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The key lines are
}
}
</script>
<script src="mathjax3/tex-mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-mml-svg.js"></script>
<script>
function convert() {
//
Expand Down
2 changes: 1 addition & 1 deletion load-mathjax/load-mathjax.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This uses a script file `load-mathjax.js` containing the following:
};
}
var script = document.createElement('script');
script.src = 'mathjax3/tex-mml-chtml.js';
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-mml-chtml.js';
document.head.appendChild(script);
}
})();
Expand Down
3 changes: 2 additions & 1 deletion mml-attribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion mml-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which uses the `startup.ready()` function to do the normal startup, then attaches a post-filter to the output jax that looks up the original format of the math, sets that `data-original` attribute to that, and uses the `startup.toMML()` function to set the `data-mathml` attribute to the serialized MathML for the expression using the internal.
Expand Down
3 changes: 2 additions & 1 deletion mml-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with MathML input and HTML output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-chtml.js"></script>
</head>
<body>
<h1>MathJax v3 beta: MathML input, HTML output test</h1>
Expand Down
3 changes: 2 additions & 1 deletion mml-chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `mml-chtml` component to process a complete HT
The key line is

```
<script src="mathjax3/mml-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-chtml.js"></script>
```

which loads the `mml-chtml` component. The rest is handled by MathJax automatically.
Expand Down
3 changes: 2 additions & 1 deletion mml-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with MathML input and HTML output</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-svg.js"></script>
</head>
<body>
<h1>MathJax v3 beta: MathML input, HTML output test</h1>
Expand Down
3 changes: 2 additions & 1 deletion mml-svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ This example shows how to use the `mml-svg` component to process a complete HTML
The key line is

```
<script src="mathjax3/mml-svg.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?mml-svg.js"></script>
```

Expand Down
3 changes: 2 additions & 1 deletion reveal-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>

<script type="text/javascript">
//
Expand Down
3 changes: 2 additions & 1 deletion speech-tex-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion speech-tex-chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which causes the `a11y/semantic-enrich` extension to be loaded, and modifies the enrich action to force the enrichment regardless of the settings in the contextual menu. The output jax will pick on on the speech text that is generated by the extension and create the proper tags and attributes for it to be picked up by screen readers.
Expand Down
3 changes: 2 additions & 1 deletion tex-chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>
<h1>MathJax v3 beta: TeX input, HTML output test</h1>
Expand Down
3 changes: 2 additions & 1 deletion tex-chtml.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ The key lines are
tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

which configures the TeX input jax to include single dollar signs as in-line math delimiters, and then loads the `tex-chtml` component. The rest is handled by MathJax automatically.
Expand Down
5 changes: 3 additions & 2 deletions tex-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Defining macros in-line in MathJax3</title>
<title>Defining macros in-line in MathJax</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
Expand All @@ -16,7 +16,8 @@
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion tex-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The key lines are
}
};
</script>
<script src="mathjax3/tex-chtml.js" id="MathJax-script" async></script>
<script id="MathJax-script" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.0.0/es5/latest?tex-chtml.js"></script>
```

for the first method, and
Expand Down
Loading

0 comments on commit 4bf68f6

Please sign in to comment.