Skip to content

Commit 038e53f

Browse files
Merge pull request #185 from snehasf3509/main
Sample to create equation using LaTeX in Word document
2 parents 43e42f4 + c5c65f2 commit 038e53f

File tree

7 files changed

+5021
-0
lines changed

7 files changed

+5021
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34322.80
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create-equation-using-LaTeX", "Create-equation-using-LaTeX\Create-equation-using-LaTeX.csproj", "{59EAF00C-44BA-4163-8F89-978F4BB7EEFD}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{59EAF00C-44BA-4163-8F89-978F4BB7EEFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{59EAF00C-44BA-4163-8F89-978F4BB7EEFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{59EAF00C-44BA-4163-8F89-978F4BB7EEFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{59EAF00C-44BA-4163-8F89-978F4BB7EEFD}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {B5C068B6-4F63-4EDC-ABF6-69CC7670DBB8}
24+
EndGlobalSection
25+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<RootNamespace>Create_equation_using_LaTeX</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using Syncfusion.DocIO;
2+
using Syncfusion.DocIO.DLS;
3+
4+
5+
// Create a new Word document.
6+
using (WordDocument document = new WordDocument())
7+
{
8+
//Add one section and one paragraph to the document.
9+
document.EnsureMinimal();
10+
11+
//Append an accent equation using LaTeX.
12+
document.LastParagraph.AppendMath(@"f\left(x\right)={a}_{0}+\sum_{n=1}^{\infty}{\left({a}_{n}\cos{\frac{n\pi{x}}{L}}+{b}_{n}\sin{\frac{n\pi{x}}{L}}\right)}");
13+
14+
//Save the Word document.
15+
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
16+
{
17+
document.Save(outputStream, FormatType.Docx);
18+
}
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34322.80
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-RTF-to-PDF", "Convert-RTF-to-PDF\Convert-RTF-to-PDF.csproj", "{036E07A8-148F-4447-958A-9DC7BCF2D543}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{036E07A8-148F-4447-958A-9DC7BCF2D543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{036E07A8-148F-4447-958A-9DC7BCF2D543}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{036E07A8-148F-4447-958A-9DC7BCF2D543}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{036E07A8-148F-4447-958A-9DC7BCF2D543}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {191FBCEE-9DB8-4B8B-BDB0-23AF72D40599}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<RootNamespace>Convert_RTF_to_PDF</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
</Project>

0 commit comments

Comments
 (0)