Plurimath opal cannot be minified, esbuilded and bundled without causing unexpected exceptions So copy js in public folder and import plurimath from here
		
			
				
	
	
		
			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);
 | |
|     }
 | |
| } |