Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
README: var --> const
  • Loading branch information
lgeiger authored and rgbkrk committed Oct 11, 2018
1 parent b749e0e commit 3181862
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -29,17 +29,17 @@ Now you can use MathJax inside you application.
To trigger a rendering on a specific container, you can either use our helper module:

```javascript
var mathjaxHelper = require("mathjax-electron");
const { typesetMath } = require("mathjax-electron");

var container = document.createElement("div");
const container = document.createElement("div");
container.innerHTML = "$$\\sum\\limits_{i=0}^{\\infty} \\frac{1}{n^2}$$";
mathjaxHelper.typesetMath(container);
typesetMath(container);
```

or the MathJax global:

```javascript
var container = document.createElement("div");
const container = document.createElement("div");
container.innerHTML = "$$\\sum\\limits_{i=0}^{\\infty} \\frac{1}{n^2}$$";

MathJax.Hub.Queue(["Typeset", MathJax.Hub, container]);
Expand All @@ -52,12 +52,12 @@ For more information about synchronizing your code, consult the [MathJax documen
To load MathJax dynamically, you can do:

```javascript
var mathjaxHelper = require("mathjax-electron");
const { loadAndTypeset } = require("mathjax-electron");

var container = document.createElement("div");
const container = document.createElement("div");
container.innerHTML = "$$\\sum\\limits_{i=0}^{\\infty} \\frac{1}{n^2}$$";

mathjaxHelper.loadAndTypeset(document, container);
loadAndTypeset(document, container);
```

If used for the first time it will initialize MathJax and trigger a rendering. After that it won't load MathJax again and only trigger the rendering.
Expand Down

0 comments on commit 3181862

Please sign in to comment.