Skip to content

Commit 5c6f724

Browse files
committed
update mathjax v2 example
1 parent 391f34c commit 5c6f724

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,27 +140,10 @@ These pages are generated by the Plotly [graphing-library-docs repo](https://git
140140
For more info about contributing to Plotly documentation, please read through [contributing guidelines](https://github.com/plotly/graphing-library-docs/blob/master/README.md).
141141

142142
### To support MathJax
143-
144-
*Before* the plotly.js script tag, add:
145-
146-
```html
147-
<script src="mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
148-
```
149-
150-
You can get the relevant MathJax files from the internet e.g.
151-
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"
152-
153-
By default, plotly.js will modify the global MathJax configuration on load.
154-
This can lead to undesirable behavior if plotly.js is loaded alongside
155-
other libraries that also rely on MathJax. To disable this global configuration
156-
process, set the `MathJaxConfig` property to `'local'` in the `window.PlotlyConfig`
157-
object. This property must be set before the plotly.js script tag, for example:
158-
143+
Load relevant MathJax (v2) files *Before* the plotly.js script tag:
159144
```html
160-
<script>
161-
window.PlotlyConfig = {MathJaxConfig: 'local'}
162-
</script>
163-
<script src="plotly.min.js"></script>
145+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script>
146+
<script src="https://cdn.plot.ly/plotly-2.0.0-rc.2.min.js"></script>
164147
```
165148

166149
---

0 commit comments

Comments
 (0)