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:1.3
SHA1 sum:f5d50fba3c212287eea69c20fa1cda1786094cdb
Author:Matthias Gondan <Matthias.Gondan-Rochon@uibk.ac.at>

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
7d15e7c2acf0edf5f0dc302d9832cabacf1725086https://github.com/mgondan/mathml.git
88545b2774c717077fb5f088ea63999ab98898811https://github.com/mgondan/mathml.git
b0a421076f54e852064da225b0496e66d454c0111https://github.com/mgondan/mathml.git
c3a9f50844aad6e06873a044dd2c58b8b30680181https://github.com/mgondan/mathml.git
c693f94d23cba31038c68067e3a172bfc147ecda1https://github.com/mgondan/mathml.git
d16915010b2fc2d3991afb1244ce099b594b6d141https://github.com/mgondan/mathml.git
f679c800d857b502f662e9d454475233f5542d341https://github.com/mgondan/mathml.git
1.31675db91cfb053bbf9bb9bcaa76a8008385d741b3https://github.com/mgondan/mathml.git
2a52ba99c1427adb7502d371b0d05f349b0a5f761https://github.com/mgondan/mathml.git
3877bf547f6449b8f258a3409792b8b6e873aab62https://github.com/mgondan/mathml.git
482de0faa6f205638e82f08401f91ae552efb4671https://github.com/mgondan/mathml.git
5bb71931eec5b2e63a890657365e07584ae8ef1b1https://github.com/mgondan/mathml.git
62074cb60ec28239df9c438c423401d0f52ecd131https://github.com/mgondan/mathml.git
8e4ba2ffa1cffff935659119fa45085cfe1ecb221https://github.com/mgondan/mathml.git
94f9c5aeca3d8cb549d6c8ca8c5dee0d7a1dc2d31https://github.com/mgondan/mathml.git
96310f7b54cffc1f7f152073825bf4b66b0357471https://github.com/mgondan/mathml.git
97972f86d6abe04c5fe077b49da5b1d000173e711https://github.com/mgondan/mathml.git
b330eff1f1bb2e30ae860ef88d8c37ad5edea52f1https://github.com/mgondan/mathml.git
b41e2744feba018cc89f91a3e9335adce99f2e501https://github.com/mgondan/mathml.git
b72424fa6b897fe11cce17e4bbec452699d6ef401https://github.com/mgondan/mathml.git
da0e1b8cb0024cc29b7ea46ce2d08cbde41624d71https://github.com/mgondan/mathml.git
e24fa2c87f8e2a03eea55f30c7be065a14e76f151https://github.com/mgondan/mathml.git
e3f2db96963bbd5a265fe044f09d49f394d992c61https://github.com/mgondan/mathml.git
e86d101baeea471dace6a8b7a02492e22198a1041https://github.com/mgondan/mathml.git
f5d50fba3c212287eea69c20fa1cda1786094cdb1https://github.com/mgondan/mathml.git

mathml. Translate R expressions to MathML

mathml allows rendering R terms in pretty mathematical equations, bridging the gap between computational needs, presentation of results, and their reproducibility.

Researchers or teachers can already use R Markdown to conduct analyses and show results, mathml smoothes this process and allows for integrated calculations and output. The package mathml can help in fact to improve data analyses and statistical reports from an aesthetical perspective, as well as regarding reproducibility of research, by allowing also for a better detection of possible mistakes in R programs.

The package supports both MathML and Latex/MathJax for use in R Markdown documents, presentations and Shiny Apps.

License

This R package is distributed under a BSD-2 simplified license (see the file LICENSE).

Installation

  1. Download and install a recent R from https://www.r-project.org/
  2. Download and install a recent RStudio from https://www.rstudio.com/
  3. R> install.packages("mathml") The package depends on R package rolog [https://cran.r-project.org/package=rolog], which itself needs the SWI-Prolog runtime on the system. The latter can be installed either from [https://swi-prolog.org] or by installing R package rswipl [https://cran.r-project.org/package=rswipl].

Example

library(mathml)
term <- quote(a^b + c * (d + 3) - a^2L * (a + d))
mathout(term)

$a^b + c \cdot (d+3.00) - a^2 \cdot (a+d)$

term <- call("^", quote(x), 2L)
mathout(term)

$x^2$

For package developers

If you use mathml for your own package, please do not "Import" mathml in your DESCRIPTION, but "Depend" on it.

Package: onmathml
Type: Package
Title: A package that uses mathml
...
Depends:
    R (>= 4.3),
    mathml (>= 1.3)

It's not entirely clear why this is needed.

Contents of pack "mathml"

Pack contains 75 files holding a total of 333K bytes.