In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "the method of adding Latex mathematical formulas and symbols by C# in Word". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Note: Spire.Doc for .NET version 7.6.5 or above is required. Hotfix 8.4.2 is used for download in this article.
Dll adds a reference effect, as shown below:
Using Spire.Doc;using Spire.Doc.Documents;using Spire.Doc.Fields.OMath; namespace Create {class Program {static void Main (string [] args) {/ / New word instance Document doc = new Document (); / / add a section Section section = doc.AddSection () / / add a paragraph Paragraph paragraph = section.AddParagraph (); / / add the formula OfficeMath officeMath = new OfficeMath (doc); paragraph.Items.Add (officeMath) in the first paragraph; officeMath.FromLatexMathCode ("x ^ {2} +\\ sqrt {x ^ {2} + 1} = 2") / / add the second formula to the second paragraph Paragraph paragraph3 = section.AddParagraph (); OfficeMath officeMath2 = new OfficeMath (doc); paragraph3.Items.Add (officeMath2); officeMath2.FromLatexMathCode ("\\ forall x\\ in X,\\ quad\\ exists y\\ leq\\ epsilon") / / add symbols to the third paragraph Paragraph paragraph4 = section.AddParagraph (); OfficeMath officeMath3 = new OfficeMath (doc); paragraph4.Items.Add (officeMath3); officeMath3.FromLatexMathCode ("\ alpha,\ beta,\ gamma,\ Gamma,\ pi,\ Pi,\ phi,\ varphi,\ mu,\ Phi") / / Save document doc.SaveToFile ("result.docx", FileFormat.Docx); System.Diagnostics.Process.Start ("result.docx");}
Formula / symbol addition effect:
This is the end of the introduction of "the method of adding Latex mathematical formulas and symbols to Word by C#". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.