Code

added user unit conversion to eqtexsvg extension
authorsgimenez <sgimenez@users.sourceforge.net>
Sat, 25 Nov 2006 17:28:28 +0000 (17:28 +0000)
committersgimenez <sgimenez@users.sourceforge.net>
Sat, 25 Nov 2006 17:28:28 +0000 (17:28 +0000)
share/extensions/eqtexsvg.inx
share/extensions/eqtexsvg.py

index 657594a9c8b6da09681482d5d0f883ab69a2a05b..b9923f45b165817c5ac813d13e0c5417acdd4cdd 100644 (file)
@@ -6,7 +6,7 @@
        <dependency type="executable" location="path">latex</dependency>
        <dependency type="executable" location="path">dvips</dependency>
        <dependency type="executable" location="path">pstoedit</dependency>
-       <param name="formule" type="string" _gui-text="LaTeX formula: ">\[\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\]</param>
+       <param name="formule" type="string" _gui-text="LaTeX formula: ">\(\displaystyle\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)</param>
     <effect>
                <object-type>all</object-type>
                 <effects-menu>
index 5b88febece6da33a89a25cc34e152bd150108f71..17a27337e2589e23d6025c155bc7b1e4133ebfcc 100644 (file)
@@ -43,8 +43,8 @@ def create_equation_tex(filename, equation):
     tex.close()
 
 def svg_open(self,filename):
-    doc_width = float(self.document.documentElement.getAttribute('width'))
-    doc_height = float(self.document.documentElement.getAttribute('height'))
+    doc_width = inkex.unittouu(self.document.documentElement.getAttribute('width'))
+    doc_height = inkex.unittouu(self.document.documentElement.getAttribute('height'))
     doc_sizeH = min(doc_width,doc_height)
     doc_sizeW = max(doc_width,doc_height)