Hi,
Does Aspose.Words.Cpp support inserting LaTeX formulas? And save in .docx format.
Best regards,
Hi,
Does Aspose.Words.Cpp support inserting LaTeX formulas? And save in .docx format.
Best regards,
@xingyu11 Unfortunately, Aspose.Words does not support inserting OfficeMath from LaTeX. You can convert an equation to MathML format and then insert it using the DocumentBuilder.InsertHtml
method. We have already registered this feature WORDSNET-18495 in our issue tracker.
Thanks for your reply.
Could you provide an example of inserting using the DocumentBuilder.InsertHtml method?
@xingyu11 You need to use other libraries to convert Latex equations. Here is an example of how to insert a math formula into html:
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
const String html = u"<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mi>a</mi><mo>+</mo><mi>b</mi></math>";
builder->InsertHtml(html);
doc->Save(u"output.docx");