Skip to content

Commit f9be040

Browse files
Merge pull request #1736 from Syncfusion-Content/hotfix/hotfix-v24.1.41
DOCINFRA-2341_merged_using_automation
2 parents 3104da7 + 1d5e302 commit f9be040

File tree

1 file changed

+35
-39
lines changed

1 file changed

+35
-39
lines changed

File-Formats/DocIO/Working-with-LaTeX.md

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ using WordDocument document = new WordDocument();
165165
document.EnsureMinimal();
166166

167167
//Append an bar equation using LaTeX.
168-
document.LastParagraph.AppendMath(@"\dot{a}");
168+
document.LastParagraph.AppendMath(@"\overline{a}");
169169

170170
//Save the Word document to MemoryStream
171171
using MemoryStream stream = new MemoryStream();
@@ -182,7 +182,7 @@ using WordDocument document = new WordDocument();
182182
document.EnsureMinimal();
183183

184184
//Append an bar equation using LaTeX.
185-
document.LastParagraph.AppendMath(@"\dot{a}");
185+
document.LastParagraph.AppendMath(@"\overline{a}");
186186

187187
//Save the Word document.
188188
document.Save("Result.docx", FormatType.Docx);
@@ -197,7 +197,7 @@ Dim document As WordDocument = New WordDocument()
197197
document.EnsureMinimal()
198198

199199
'Append an bar equation using LaTeX.
200-
document.LastParagraph.AppendMath(@"\dot{a}")
200+
document.LastParagraph.AppendMath(@"\overline{a}")
201201

202202
'Save the Word document.
203203
document.Save("Result.docx", FormatType.Docx)
@@ -320,7 +320,7 @@ using WordDocument document = new WordDocument();
320320
document.EnsureMinimal();
321321

322322
//Append an border box equation using LaTeX.
323-
document.LastParagraph.AppendMath(@"\boxed{x^2 + y^2 = z^2}");
323+
document.LastParagraph.AppendMath(@"\boxed{{x}^{2}+{y}^{2}={z}^{2}}");
324324

325325
//Save the Word document to MemoryStream
326326
using MemoryStream stream = new MemoryStream();
@@ -337,7 +337,7 @@ using WordDocument document = new WordDocument();
337337
document.EnsureMinimal();
338338

339339
//Append an border box equation using LaTeX.
340-
document.LastParagraph.AppendMath(@"\boxed{x^2 + y^2 = z^2}");
340+
document.LastParagraph.AppendMath(@"\boxed{{x}^{2}+{y}^{2}={z}^{2}}");
341341

342342
//Save the Word document.
343343
document.Save("Result.docx", FormatType.Docx);
@@ -352,7 +352,7 @@ Dim document As WordDocument = New WordDocument()
352352
document.EnsureMinimal()
353353

354354
'Append an border box equation using LaTeX.
355-
document.LastParagraph.AppendMath(@"\boxed{x^2 + y^2 = z^2}")
355+
document.LastParagraph.AppendMath(@"\boxed{{x}^{2}+{y}^{2}={z}^{2}}")
356356

357357
'Save the Word document.
358358
document.Save("Result.docx", FormatType.Docx)
@@ -375,7 +375,7 @@ The following table demonstrates the LaTeX equivalent to professional format bor
375375
<tr>
376376
<td>1.</td>
377377
<td><img src="WorkingwithMathematicalEquation_images/BorderBox1.png" alt="Border Box equation"></td>
378-
<td>\boxed{x^2+y^2=z^2}</td>
378+
<td>\boxed{{x}^{2}+{y}^{2}={z}^{2}}</td>
379379
</tr>
380380
</table>
381381

@@ -669,16 +669,12 @@ The following table demonstrates the LaTeX equivalent to professional format fra
669669
</tr>
670670
<tr>
671671
<td>3.</td>
672-
<td><img src="WorkingwithMathematicalEquation_images/Fraction3.png" alt="Fraction equation"></td>
673-
<td>\sfrac{dy}{dx}</td>
674-
</tr>
675-
<tr>
676-
<td>4.</td>
677672
<td><img src="WorkingwithMathematicalEquation_images/Fraction4.png" alt="Fraction equation"></td>
678673
<td>{\frac{dy}{dx}}</td>
679674
</tr>
680675
</table>
681676

677+
682678
## Function
683679

684680
Add **function** 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.
@@ -1155,7 +1151,7 @@ using WordDocument document = new WordDocument();
11551151
document.EnsureMinimal();
11561152

11571153
//Append an N-array equation using LaTeX.
1158-
document.LastParagraph.AppendMath(@"\sum a");
1154+
document.LastParagraph.AppendMath(@"\sum{a}");
11591155

11601156
//Save the Word document to MemoryStream
11611157
using MemoryStream stream = new MemoryStream();
@@ -1172,7 +1168,7 @@ using WordDocument document = new WordDocument();
11721168
document.EnsureMinimal();
11731169

11741170
//Append an N-array equation using LaTeX.
1175-
document.LastParagraph.AppendMath(@"\sum a");
1171+
document.LastParagraph.AppendMath(@"\sum{a}");
11761172

11771173
//Save the Word document.
11781174
document.Save("Result.docx", FormatType.Docx);
@@ -1187,7 +1183,7 @@ Dim document As WordDocument = New WordDocument()
11871183
document.EnsureMinimal()
11881184

11891185
'Append an N-array equation using LaTeX.
1190-
document.LastParagraph.AppendMath(@"\sum a")
1186+
document.LastParagraph.AppendMath(@"\sum{a}")
11911187

11921188
'Save the Word document.
11931189
document.Save("Result.docx", FormatType.Docx)
@@ -1210,7 +1206,7 @@ The following table demonstrates the LaTeX equivalent to professional format N-a
12101206
<tr>
12111207
<td>1.</td>
12121208
<td><img src="WorkingwithMathematicalEquation_images/NArray1.png" alt="N-Array equation"></td>
1213-
<td>\sum a</td>
1209+
<td>\sum{a}</td>
12141210
</tr>
12151211
<tr>
12161212
<td>2.</td>
@@ -1235,32 +1231,32 @@ The following table demonstrates the LaTeX equivalent to professional format N-a
12351231
<tr>
12361232
<td>6.</td>
12371233
<td><img src="WorkingwithMathematicalEquation_images/NArray6.png" alt="N-Array equation"></td>
1238-
<td>\prod a</td>
1234+
<td>\prod{a}</td>
12391235
</tr>
12401236
<tr>
12411237
<td>7.</td>
12421238
<td><img src="WorkingwithMathematicalEquation_images/NArray7.png" alt="N-Array equation"></td>
1243-
<td>\amalg a</td>
1239+
<td>\amalg{a}</td>
12441240
</tr>
12451241
<tr>
12461242
<td>8.</td>
12471243
<td><img src="WorkingwithMathematicalEquation_images/NArray8.png" alt="N-Array equation"></td>
1248-
<td>\bigcup a</td>
1244+
<td>\bigcup{a}</td>
12491245
</tr>
12501246
<tr>
12511247
<td>9.</td>
12521248
<td><img src="WorkingwithMathematicalEquation_images/NArray9.png" alt="N-Array equation"></td>
1253-
<td>\bigcap a</td>
1249+
<td>\bigcap{a}</td>
12541250
</tr>
12551251
<tr>
12561252
<td>10.</td>
12571253
<td><img src="WorkingwithMathematicalEquation_images/NArray10.png" alt="N-Array equation"></td>
1258-
<td>\bigvee a</td>
1254+
<td>\bigvee{a}</td>
12591255
</tr>
12601256
<tr>
12611257
<td>11.</td>
12621258
<td><img src="WorkingwithMathematicalEquation_images/NArray11.png" alt="N-Array equation"></td>
1263-
<td>\bigwedge a</td>
1259+
<td>\bigwedge{a}</td>
12641260
</tr>
12651261
</table>
12661262

@@ -1280,7 +1276,7 @@ using WordDocument document = new WordDocument();
12801276
document.EnsureMinimal();
12811277

12821278
//Append an radical equation using LaTeX.
1283-
document.LastParagraph.AppendMath(@"\sqrt a");
1279+
document.LastParagraph.AppendMath(@"\sqrt{a}");
12841280

12851281
//Save the Word document to MemoryStream
12861282
using MemoryStream stream = new MemoryStream();
@@ -1297,7 +1293,7 @@ using WordDocument document = new WordDocument();
12971293
document.EnsureMinimal();
12981294

12991295
//Append an radical equation using LaTeX.
1300-
document.LastParagraph.AppendMath(@"\sqrt a");
1296+
document.LastParagraph.AppendMath(@"\sqrt{a}");
13011297

13021298
//Save the Word document.
13031299
document.Save("Result.docx", FormatType.Docx);
@@ -1312,7 +1308,7 @@ Dim document As WordDocument = New WordDocument()
13121308
document.EnsureMinimal()
13131309

13141310
'Append an radical equation using LaTeX.
1315-
document.LastParagraph.AppendMath(@"\sqrt a")
1311+
document.LastParagraph.AppendMath(@"\sqrt{a}")
13161312

13171313
'Save the Word document.
13181314
document.Save("Result.docx", FormatType.Docx)
@@ -1335,7 +1331,7 @@ The following table demonstrates the LaTeX equivalent to professional format rad
13351331
<tr>
13361332
<td>1.</td>
13371333
<td><img src="WorkingwithMathematicalEquation_images/Radical1.png" alt="Radical equation"></td>
1338-
<td>\sqrt a</td>
1334+
<td>\sqrt{a}</td>
13391335
</tr>
13401336
<tr>
13411337
<td>2.</td>
@@ -1360,7 +1356,7 @@ using WordDocument document = new WordDocument();
13601356
document.EnsureMinimal();
13611357

13621358
//Append an SubSuperScript equation using LaTeX.
1363-
document.LastParagraph.AppendMath(@"a^b");
1359+
document.LastParagraph.AppendMath((@"{a}^{b}");
13641360

13651361
//Save the Word document to MemoryStream
13661362
using MemoryStream stream = new MemoryStream();
@@ -1377,7 +1373,7 @@ using WordDocument document = new WordDocument();
13771373
document.EnsureMinimal();
13781374

13791375
//Append an SubSuperScript equation using LaTeX.
1380-
document.LastParagraph.AppendMath(@"a^b");
1376+
document.LastParagraph.AppendMath((@"{a}^{b}");
13811377

13821378
//Save the Word document.
13831379
document.Save("Result.docx", FormatType.Docx);
@@ -1392,7 +1388,7 @@ Dim document As WordDocument = New WordDocument()
13921388
document.EnsureMinimal()
13931389

13941390
'Append an SubSuperScript equation using LaTeX.
1395-
document.LastParagraph.AppendMath(@"a^b")
1391+
document.LastParagraph.AppendMath((@"{a}^{b}")
13961392

13971393
'Save the Word document.
13981394
document.Save("Result.docx", FormatType.Docx)
@@ -1415,12 +1411,12 @@ The following table demonstrates the LaTeX equivalent to professional format Sub
14151411
<tr>
14161412
<td>1.</td>
14171413
<td><img src="WorkingwithMathematicalEquation_images/SubSuperScript1.png" alt="SubSuperScript equation"></td>
1418-
<td>\mathbit{a}^\mathbit{b}</td>
1414+
<td>{\mathbit{a}}^{\mathbit{b}}</td>
14191415
</tr>
14201416
<tr>
14211417
<td>2.</td>
14221418
<td><img src="WorkingwithMathematicalEquation_images/SubSuperScript2.png" alt="SubSuperScript equation"></td>
1423-
<td>\mathbit{a}_\mathbit{b}</td>
1419+
<td>{\mathbit{a}}_{\mathbit{b}}</td>
14241420
</tr>
14251421
</table>
14261422

@@ -1440,7 +1436,7 @@ using WordDocument document = new WordDocument();
14401436
document.EnsureMinimal();
14411437

14421438
//Append an Left SubSuperScript equation using LaTeX.
1443-
document.LastParagraph.AppendMath(@"{_40}^{20}}100");
1439+
document.LastParagraph.AppendMath(@"{_{40}^{20}}{100}");
14441440

14451441
//Save the Word document to MemoryStream
14461442
using MemoryStream stream = new MemoryStream();
@@ -1457,7 +1453,7 @@ using WordDocument document = new WordDocument();
14571453
document.EnsureMinimal();
14581454

14591455
//Append an Left SubSuperScript equation using LaTeX.
1460-
document.LastParagraph.AppendMath(@"{_40}^{20}}100");
1456+
document.LastParagraph.AppendMath(@"{_{40}^{20}}{100}");
14611457

14621458
//Save the Word document.
14631459
document.Save("Result.docx", FormatType.Docx);
@@ -1472,7 +1468,7 @@ Dim document As WordDocument = New WordDocument()
14721468
document.EnsureMinimal()
14731469

14741470
'Append an Left SubSuperScript equation using LaTeX.
1475-
document.LastParagraph.AppendMath(@"{_40}^{20}}100");
1471+
document.LastParagraph.AppendMath(@"{_{40}^{20}}{100}");
14761472

14771473
'Save the Word document.
14781474
document.Save("Result.docx", FormatType.Docx)
@@ -1495,7 +1491,7 @@ The following table demonstrates the LaTeX equivalent to professional format Lef
14951491
<tr>
14961492
<td>1.</td>
14971493
<td><img src="WorkingwithMathematicalEquation_images/LeftSubSuperScript1.png" alt="Left SubSuperScript equation"></td>
1498-
<td>{_{\mathbf{40}}^{\mathbf{20}}}\mathbf{100}</td>
1494+
<td>{_{\mathbf{40}}^{\mathbf{20}}}{\mathbf{100}}</td>
14991495
</tr>
15001496
</table>
15011497

@@ -1515,7 +1511,7 @@ using WordDocument document = new WordDocument();
15151511
document.EnsureMinimal();
15161512

15171513
//Append an Right SubSuperScript equation using LaTeX.
1518-
document.LastParagraph.AppendMath(@{100}_{40}^{20}");
1514+
document.LastParagraph.AppendMath(@"{100}_{40}^{20}");
15191515

15201516
//Save the Word document to MemoryStream
15211517
using MemoryStream stream = new MemoryStream();
@@ -1532,7 +1528,7 @@ using WordDocument document = new WordDocument();
15321528
document.EnsureMinimal();
15331529

15341530
//Append an Right SubSuperScript equation using LaTeX.
1535-
document.LastParagraph.AppendMath(@{100}_{40}^{20}");
1531+
document.LastParagraph.AppendMath(@"{100}_{40}^{20}");
15361532

15371533
//Save the Word document.
15381534
document.Save("Result.docx", FormatType.Docx);
@@ -1547,7 +1543,7 @@ Dim document As WordDocument = New WordDocument()
15471543
document.EnsureMinimal()
15481544

15491545
'Append an Right SubSuperScript equation using LaTeX.
1550-
document.LastParagraph.AppendMath(@{100}_{40}^{20}")
1546+
document.LastParagraph.AppendMath(@"{100}_{40}^{20}")
15511547

15521548
'Save the Word document.
15531549
document.Save("Result.docx", FormatType.Docx)
@@ -1570,6 +1566,6 @@ The following table demonstrates the LaTeX equivalent to professional format Rig
15701566
<tr>
15711567
<td>1.</td>
15721568
<td><img src="WorkingwithMathematicalEquation_images/RightSubSuperScript1.png" alt="Right SubSuperScript equation"></td>
1573-
<td>{_{\mathbf{40}}^{\mathbf{20}}}\mathbf{100}</td>
1569+
<td>{\mathbf{100}}_{\mathbf{40}}^{\mathbf{20}}</td>
15741570
</tr>
15751571
</table>

0 commit comments

Comments
 (0)