Browse Source

更新公式的属性字段。

CrazyIter_Bin 4 years ago
parent
commit
bea916f710
3 changed files with 9 additions and 8 deletions
  1. 3 3
      HTEXLib/HTEXLib.csproj
  2. 2 2
      HTEXLib/PPTX/Models/HTEX/HtexMath.cs
  3. 4 3
      HTEXLib/PPTX/Models/Math.cs

+ 3 - 3
HTEXLib/HTEXLib.csproj

@@ -4,9 +4,9 @@
     <Description>组合图形偏移问题</Description>
     <PackageReleaseNotes>组合图形偏移问题</PackageReleaseNotes>
     <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
-    <Version>2.4.9</Version>
-    <AssemblyVersion>2.4.9.9</AssemblyVersion>
-    <FileVersion>2.4.9.9</FileVersion>
+    <Version>2.5.1</Version>
+    <AssemblyVersion>2.5.1.1</AssemblyVersion>
+    <FileVersion>2.5.1.1</FileVersion>
   </PropertyGroup>
   <ItemGroup>
     <PackageReference Include="DocumentFormat.OpenXml" Version="2.11.3" />

+ 2 - 2
HTEXLib/PPTX/Models/HTEX/HtexMath.cs

@@ -136,8 +136,8 @@ namespace HTEXLib.Models.HTEX
                 DoXml(els, dict,encoding);
                 string  latex = ProcessOMath(els);
                // DoMathXml(els,dict,encoding);
-                var mathML = latex.Replace("$","");
-                math.mathML=new MathML { formula=mathML,typeface=typeface,pitchFamily=pitchFamily};
+                  latex = latex.Replace("$","");
+                math.formula = new MathFormula { text = latex, typeface=typeface,pitchFamily=pitchFamily};
             }
             var AlternateContentFallback=  pptMath.AlternateContentFallback;
             if (AlternateContentFallback.ChildElements.First() is DocumentFormat.OpenXml.Presentation.Shape shapea)

+ 4 - 3
HTEXLib/PPTX/Models/Math.cs

@@ -9,7 +9,7 @@ namespace HTEXLib
         //https://www.jianshu.com/p/2ae5376a9267?from=message&isappinstalled=0
         //https://www.compart.com/en/unicode/U+1D59C
         //https://www.fuhaozi.com/unicode/1D/1D510.html
-        public MathML mathML { get; set; }
+        public MathFormula formula { get; set; }
       //  public HTEXLib.Models.HTEX.ShapeStyle style { get; set; } = new Models.HTEX.ShapeStyle();
 
         public string shapeType { get; set; }
@@ -18,8 +18,9 @@ namespace HTEXLib
 
         
     }
-    public class MathML {
-        public string formula { get; set; }
+    public class MathFormula
+    {
+        public string text { get; set; }
         public double pitchFamily { get; set; }
         public string typeface { get; set; }
     }