Hello, i need to set color to math equations using docx4j. I am receiving latex equation converting it to MathML using SnuggleTex and after that converting MathML to OMML with MML2OMML.XSL file. Here is example of my code: public P convert(String formula, WordprocessingMLPackage wordprocessingMLPackage) {
P paragraph = new P();
formula = Jsoup.parse(formula).text();
formula = formula.replace("checkmark", "lor").replaceAll("\\\\\\\\\\[[0-9.]+em\\]&", "");
if (formula.equals("\\(\\)")) {
return DocxToolkit.getP(" ");
}
if (!formula.isEmpty() && formula.charAt(0) != '\\') {
return DocxToolkit.getP(formula);
} ...