From 3c24fe2ad7f968bcc13bc2df71972c76f575743f Mon Sep 17 00:00:00 2001 From: "sneha.biju" Date: Tue, 5 Mar 2024 17:52:04 +0530 Subject: [PATCH] ES-869474 - Add equation array support using LaTeX --- File-Formats/DocIO/Working-with-LaTeX.md | 74 ++++++++++++++++++ .../EquationArray1.png | Bin 0 -> 584 bytes 2 files changed, 74 insertions(+) create mode 100644 File-Formats/DocIO/WorkingwithMathematicalEquation_images/EquationArray1.png diff --git a/File-Formats/DocIO/Working-with-LaTeX.md b/File-Formats/DocIO/Working-with-LaTeX.md index 52f071b97..19123c44a 100644 --- a/File-Formats/DocIO/Working-with-LaTeX.md +++ b/File-Formats/DocIO/Working-with-LaTeX.md @@ -594,6 +594,80 @@ The following table demonstrates the LaTeX equivalent to professional format del +## Equation Array + +Add **equation array** to a Word document using the LaTeX through [AppendMath](https://help.syncfusion.com/cr/file-formats/Syncfusion.DocIO.DLS.WParagraph.html#Syncfusion_DocIO_DLS_WParagraph_AppendMath_System_String_) API. + +The following code example illustrates how to create an equation array using LaTeX in Word document. + +{% tabs %} +{% highlight c# tabtitle="C# [Cross-platform]" %} + +// Create a new Word document. +using WordDocument document = new WordDocument(); + +//Add one section and one paragraph to the document. +document.EnsureMinimal(); + +//Append an box equation using LaTeX. +document.LastParagraph.AppendMath(@"\eqarray{a@&b}"); + +//Save the Word document to MemoryStream +using MemoryStream stream = new MemoryStream(); +document.Save(stream, FormatType.Docx); + +{% endhighlight %} +{% highlight c# tabtitle="C# [Windows-specific]" %} + +// Create a new Word document. +using WordDocument document = new WordDocument(); + +//Add one section and one paragraph to the document. +document.EnsureMinimal(); + +//Append an box equation using LaTeX. +document.LastParagraph.AppendMath(@"\eqarray{a@&b}"); + +//Save the Word document. +document.Save("Result.docx", FormatType.Docx); + +{% endhighlight %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} + +' Create a new Word document. +Dim document As WordDocument = New WordDocument() + +'Add one section and one paragraph to the document. +document.EnsureMinimal() + +'Append an box equation using LaTeX. +document.LastParagraph.AppendMath(@"\eqarray{a@&b}"); + +'Save the Word document. +document.Save("Result.docx", FormatType.Docx) + +{% endhighlight %} +{% endtabs %} + +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/DocIO-Examples/tree/main/Mathematical-Equation/LaTeX-equations/Equation-array/.NET). + +The following table demonstrates the LaTeX equivalent to professional format equation array. + + + + + + + + + + + + + + +
S.NoProfessionalLaTeX
1.Equation array\eqarray{a@&b}
+ ## Fraction Add **fraction** equation to a Word document using the LaTeX through [AppendMath](https://help.syncfusion.com/cr/file-formats/Syncfusion.DocIO.DLS.WParagraph.html#Syncfusion_DocIO_DLS_WParagraph_AppendMath_System_String_) API. diff --git a/File-Formats/DocIO/WorkingwithMathematicalEquation_images/EquationArray1.png b/File-Formats/DocIO/WorkingwithMathematicalEquation_images/EquationArray1.png new file mode 100644 index 0000000000000000000000000000000000000000..07c95584992bf13106cfbb811480ec98c584750b GIT binary patch literal 584 zcmeAS@N?(olHy`uVBq!ia0vp^u0Wi|!3-oNn{1`%>sNvT>t<7fA{X)%*;$>Wo4jPczF2o<;y!eI|T&=-@JKq`0(MaTen`g zaAC%b873wsRaI5)?(RTkL2VVXKuV}2$S)XZ0xDp5w12-4P?od6BeIx*K};2d89jqk zJ^&q5>*?Yc65;-K`pI>N6?j}FWtfyM|F3_$yTSREs@l|hhte-bd2F@0)Ey||8aU;C z(p>dV-VwaedQINUtJjLV&=}^jSO{eP%S#kbyw>6-GvKm zRCM!{tZu|~=*(WM&^y_;WcJ#`2?FKftWmQ}&t2U+$EAAnv4cG(%&fak+xUHN3OJIg z8JCsJ^z+`D!X0{MZ2scUz6-r&c=mt8kCKj4%VqYS@Yb3g<1Qb#@cNw7L*gkQ_Re%yf`Ota;wIK8{BDq zPyhSqyx`Lg`5~-*FMZ*~HCrPO*VwZx>H40$Q2m~Je}Q}V63(g7(=YGP==#3m{?5|5 zEe~ujPh)TU;Ta^quFg2~c=n8bmN$j`FAQX#b6=mkNTci1d4p&C&Hp+6zqul&2#g&D MPgg&ebxsLQ03byD9RL6T literal 0 HcmV?d00001