Equations

Hi,

I have problem with equations. I extend DocumentVisitor and I override visitFieldStart(FieldStart) method. When I put break point in body of the method, execution doesn’t stop.

Does Aspose.Words supports equations, and is it possible to change existing equations?

Sample document is in attachment.

Thanks,
Zeljko

Hi there,
Thanks for your inquiry.
Your equations are actually inserted into your document in embedded form. There is currently no support to decypher this embedded equation format, also there is no way to insert any modified OLE object back into the document.
You can however use EQ fields which will allow for creation and editing of the formula content in the way you were expecting. Please see the following code example below which inserts an equation field into the document.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
String eqFieldCode = "EQ x=h\\s\\do8(0)-\\r(h\\s\\do8(0)-\\f(2;h))";
builder.insertField(eqFieldCode, null);
doc.save("C:\\Temp\\out.doc");

If you have any further queries, please feel free to ask.
Thanks,