You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-34
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ In browsers that support it, MathML allows for the display of maths equations in
6
6
7
7
But because most browsers do _not_ support MathML, fallback content is necessary. Traditionally, this has been done with the JavaScript library [MathJax](https://www.mathjax.org/), but MathJax suffers from the same problem any JavaScript library has - it is a large download that slows down the users browsing; and doesn't work when JavaScript is turned off (or more likely, broken by another script on the page).
8
8
9
-
MathMLNow is a Node package that produces a series of HTML tags that show MathML if available, gracefully degrading to an SVG image, and then to a PNG image if even SVG is not supported.
9
+
MathMLNow is a Node package that produces a series of HTML tags that show MathML if available, gracefully degrading to an SVG image where MathMl is not supported.
10
10
11
11
To see an example of this technique in action, visit [this example page](https://sora2455.github.io/MathMlNow/).
12
12
@@ -20,41 +20,19 @@ The file provided is called `MathMLNow`. To generate the MathMLNow used in the e
}).then((result) =>console.log("Integral of the secant function:\n"+ result));
37
34
```
38
35
39
-
If you wish to support browsers that do not support SVG graphics (about [2.5% of the world](https://caniuse.com/#feat=svg-html5) at the time of writing), you need to pass the location to your website's image folder to the imageFolder config option.
40
-
In addition, add the following to your website's CSS:
41
-
42
-
```CSS
43
-
.mmln-f {
44
-
display: block;
45
-
position: absolute;
46
-
left: -100%;
47
-
height: 0;
48
-
width: 0;
49
-
overflow: hidden;
50
-
}
51
-
svgimage.mml-i {
52
-
display: none;
53
-
}
54
-
```
55
-
56
-
(Thanks to [CSS-Tricks](https://css-tricks.com/a-complete-guide-to-svg-fallbacks/) for sharing this nugget of wisdom.)
57
-
58
36
If you wish to replace inline math instances in a large file (say, a HTML page), then you can pipe it as a [vinyl](https://github.com/gulpjs/vinyl) stream:
0 commit comments