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.2
SHA1 sum:d16915010b2fc2d3991afb1244ce099b594b6d14
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
0.1333289d085edbeb9647491c5591ab76b21d007072https://github.com/mgondan/mathml.git
0.21683d76af508d94c33a6ac2f675e1bb6741fe6561https://github.com/mgondan/mathml.git
176197664aa7cdd58bbff5dc6ea0aadba9aaeaf71https://github.com/mgondan/mathml.git
330b73b39f7f1db366de7bb2e9da8a4d5958b2351https://github.com/mgondan/mathml.git
67410c4691d493eba2b42978d2737ef93fae38dd1https://github.com/mgondan/mathml.git
88545b2774c717077fb5f088ea63999ab98898811https://github.com/mgondan/mathml.git
c3a9f50844aad6e06873a044dd2c58b8b30680181https://github.com/mgondan/mathml.git
c693f94d23cba31038c68067e3a172bfc147ecda1https://github.com/mgondan/mathml.git
d16915010b2fc2d3991afb1244ce099b594b6d141https://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.1.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 4 files holding a total of 81.8K bytes.