xceedsoftware / DocX

Fast and easy to use .NET library that creates or modifies Microsoft Word files without installing Word.
Other
1.73k stars 468 forks source link

Mathematical Expressions #361

Open MAkcanca opened 4 years ago

MAkcanca commented 4 years ago

I've been trying to retrieve basic mathematical equations such as 10^2 but DocX seems to get the text as 102. Is there a way to retrieve mathematical equations in a formatted manner?

XceedBoucherS commented 4 years ago

Hi,

For equations, you can have a look at sample EquationSample.InsertEquation() from Xceed.Words.NET.Examples.

Maybe something like "10\u00B2" will produce 10^2.

MAkcanca commented 4 years ago

Inserting equation is pretty straightforward. Parsing it however is not. That's where the problem is.

XceedBoucherS commented 4 years ago

Currently, I think your only solution will be to create a parser and detect specific symbol in order to recognize equations.