Skip to content

Commit 97927a5

Browse files
committed
Merge commit 'acadda26a' into develop
2 parents 1106a16 + acadda2 commit 97927a5

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,21 @@ To use MathJax components in a node application, install the `mathjax` package:
122122

123123
Then require `mathjax` within your application:
124124

125-
require('mathjax').init({ ... }).then((MathJax) => { ... });
125+
```js
126+
require('mathjax').init({ ... }).then((MathJax) => { ... });
127+
```
126128

127129
where the first `{ ... }` is a MathJax configuration, and the second
128130
`{ ... }` is the code to run after MathJax has been loaded. E.g.
129131

130-
require('mathjax').init({
131-
loader: {load: ['input/tex', 'output/svg']}
132-
}).then((MathJax) => {
133-
const svg = MathJax.tex2svg('\\frac{1}{x^2-1}', {display: true});
134-
console.log(MathJax.startup.adaptor.outerHTML(svg));
135-
}).catch((err) => console.log(err.message));
132+
```js
133+
require('mathjax').init({
134+
loader: {load: ['input/tex', 'output/svg']}
135+
}).then((MathJax) => {
136+
const svg = MathJax.tex2svg('\\frac{1}{x^2-1}', {display: true});
137+
console.log(MathJax.startup.adaptor.outerHTML(svg));
138+
}).catch((err) => console.log(err.message));
139+
```
136140

137141

138142
See the

0 commit comments

Comments
 (0)