mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 08:16:16 -04:00
25 lines
573 B
JavaScript
25 lines
573 B
JavaScript
![]() |
import "./plurimath-opal.js";
|
||
|
Opal.require("plurimath");
|
||
|
window.Plurimath = class Plurimath {
|
||
|
constructor(data, format) {
|
||
|
this.data = Opal.Plurimath.Math.$parse(data, format);
|
||
|
}
|
||
|
toAsciimath() {
|
||
|
return this.data.$to_asciimath();
|
||
|
}
|
||
|
toLatex() {
|
||
|
return this.data.$to_latex();
|
||
|
}
|
||
|
toMathml() {
|
||
|
return this.data.$to_mathml();
|
||
|
}
|
||
|
toHtml() {
|
||
|
return this.data.$to_html();
|
||
|
}
|
||
|
toOmml() {
|
||
|
return this.data.$to_omml();
|
||
|
}
|
||
|
toDisplay(lang) {
|
||
|
return this.data.$to_display(lang);
|
||
|
}
|
||
|
}
|