Let's check out jqMath
, the mathematical expression library.
ThejqMath
is written by Dave Barton and licensed under the same license asjQuery
, MIT license.
It will show great mathematical expression structure on browser that supports MathML
(Mathematical Markup Language) and provide fallback using CSS if the browser doesn't support it.
Browsers which currently support MathML
are:
- All Gecko based (Firefox, Firefox for Android, Camino, Galeon, etc)
- Amaya (W3C browser)
- Latest Safari + iOS Safari
- Latest Blackberry browser
Chrome apparently dropped MathML feature since the 25th version, which also affected all browsers that use the Chromium engine, such as Yandex.
Therefore, I tinkered this demo (iframe) page on Firefox.
When I tested it on Chrome, because it doesn't have MathML module, jqMath automatically used the CSS and native HTML elements fallback.
Advantage
jqMath doesn't provide images fallback for substituting the characters. That's why it's much faster and way smaller in size than MathJax. All the rendering work is done by the MathML module within the browser (which has it).
Disadvantage
It will only be displayed as it should be on browsers that support MathML, otherwise, it uses the CSS fallback. The rendering isn't quite similar with browser using MathML: the positioning, and especially the fonts.
Nevertheless, it still shows neat mathematical expressions without any images.
The Markup
If you're interested to try on jqMath on your page, we can download the source (CSS and JavaScript plugin) at MathScribe website.
This is useful for mathematical related posts.
Or, we can use the files hosted on MathScribe:
CSS
JavaScript
The Markup Order
We can place these in the head
section of your page.
On Blogger, for a single post, we can include these just on top of your post, before any content.
Or even further, we can include these in the head
using conditional b:if
, so that only particular post(s) which has(have) mathematical expressions in it will retrieve the jqMath resources.
Demo Snapshot on Firefox
Demo Snapshot on Chrome
Iframed Demonstration
See the Pen jqMath Test by Monkey Raptor (@monkeyraptor) on CodePen.
Non-Iframed Demonstration
The code for that is:
\$\$∑↙{i=0}↖n i={n(n+1)}/2\$\$
Related Links
- More information about using this at jqMath
- jqMath markup usage on Blogger
- MathML page on Wikipedia
- W3C MathML page
Comments
Post a Comment