Hi,
I got a tool that might help you for displaying latex math string as mesh.
you will most likely find bugs here and there. But simple usage should be ok?
example usage:
import {mathmesh} from "mathmesh";
var verts = mathmesh("\\int_{a}^{b}x^2 \\,dx");
let customMesh = new Mesh("mymathmesh", scene);
let vertexData = new VertexData();
vertexData.positions = verts.positions;
vertexData.indices = verts.indices;
vertexData.applyToMesh(customMesh);
let fontmaterial = new StandardMaterial("mathmeshMat", scene);
fontmaterial.backFaceCulling = false;
fontmaterial.emissiveColor = new Color3(0, 1, 0);
customMesh.material = fontmaterial;