Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "mathml"

Title:Translates mathematical expressions to compounds that can be used by html//1 (SWISH) or html//3 (normal SWIPL, with pack http/html_write).
Rating:Not rated. Create the first rating!
Latest version:0.0.8
SHA1 sum:da30d170d055b0fd7c2c0a280d24bd76f0014daf
Author:Matthias Gondan <Matthias.Gondan@psy.ku.dk>

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.0.14865f15ec28953318e1fe0128040cb42a3342e156https://github.com/mgondan/mathml.git
0.0.201ec02c071af6a290c5907307a0c49cf479616151https://github.com/mgondan/mathml.git
0.0.3238f4dd9e1b19deedb3d5fdb59ccfa74e6dca8711https://github.com/mgondan/mathml.git
0.0.6268e8f948f4d1af533b447e43887296012366d211https://github.com/mgondan/mathml.git
0.0.82a076531c6bbf6cf2f392b43ff415896f852ae2c1https://github.com/mgondan/mathml.git
da30d170d055b0fd7c2c0a280d24bd76f0014daf1https://github.com/mgondan/mathml.git

mathml

Prolog package to convert mathematical expressions to MathML that can be rendered by some browsers. Actually, it's mostly Firefox, all the other browsers I tried did not yield satisfactory results.

You can find a SWISH demo here, https://swish.swi-prolog.org/p/mathml-0.0.8.swinb

Installation and usage

Simple usage example from the SWI-Prolog console:

pack_install(mathml).
use_module(library(mathml)).
use_module(library(http/html_write)).

mathml(sin(x), M), html(html(math(M)), Tokens, []), print_html(Tokens).

More fancy things are given as an example:

mathml:example.

At the moment, the library is quite limited, but is is easily extended. So if you need more stuff, just write me a little email and I will see if I can implement it.

Contents of pack "mathml"

Pack contains 7 files holding a total of 59.8K bytes.