Hello community,

here is the log from the commit of package texmath for openSUSE:Factory checked 
in at 2015-10-19 22:53:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texmath (Old)
 and      /work/SRC/openSUSE:Factory/.texmath.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "texmath"

Changes:
--------
--- /work/SRC/openSUSE:Factory/texmath/texmath.changes  2015-08-28 
08:26:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.texmath.new/texmath.changes     2015-10-20 
00:07:12.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Oct 18 14:30:58 UTC 2015 - [email protected]
+
+- update to 0.8.4 
+
+-------------------------------------------------------------------

Old:
----
  texmath-0.8.3.tar.gz

New:
----
  texmath-0.8.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ texmath.spec ++++++
--- /var/tmp/diff_new_pack.261lNR/_old  2015-10-20 00:07:13.000000000 +0200
+++ /var/tmp/diff_new_pack.261lNR/_new  2015-10-20 00:07:13.000000000 +0200
@@ -19,7 +19,7 @@
 %global pkg_name texmath
 
 Name:           texmath
-Version:        0.8.3
+Version:        0.8.4
 Release:        0
 Summary:        Conversion of LaTeX math formulas to MathML or OMML
 License:        GPL-2.0

++++++ texmath-0.8.3.tar.gz -> texmath-0.8.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texmath-0.8.3/src/Text/TeXMath/Writers/Pandoc.hs 
new/texmath-0.8.4/src/Text/TeXMath/Writers/Pandoc.hs
--- old/texmath-0.8.3/src/Text/TeXMath/Writers/Pandoc.hs        2015-08-18 
18:44:37.000000000 +0200
+++ new/texmath-0.8.4/src/Text/TeXMath/Writers/Pandoc.hs        2015-10-15 
20:08:21.000000000 +0200
@@ -35,9 +35,32 @@
 
 expsToInlines :: TextType -> [Exp] -> Maybe [Inline]
 expsToInlines tt xs = do
-  res <- mapM (expToInlines tt) xs
+  res <- mapM (expToInlines tt) (addSpaces xs)
   return (concat res)
 
+-- This adds spaces around certain symbols, in accord
+-- with Appendix G of TeXBook.
+addSpaces :: [Exp] -> [Exp]
+addSpaces (ESymbol t1 s1 : ESymbol t2 s2 : xs)
+  | t2 == Pun || (t1 `notElem` [Bin, Op, Rel, Open, Pun] && not (null xs)) =
+    ESymbol t1 s1 : addSpace t2 (ESymbol t2 s2) ++ addSpaces xs
+addSpaces (x : ESymbol t2 s2 : xs)
+  | not (null xs) =
+    x : addSpace t2 (ESymbol t2 s2) ++ addSpaces xs
+addSpaces (x : xs) = x : addSpaces xs
+addSpaces [] = []
+
+addSpace :: TeXSymbolType -> Exp -> [Exp]
+addSpace t x =
+  case t of
+      Bin -> [medspace, x, medspace]
+      Rel -> [widespace, x, widespace]
+      Pun -> [x, thinspace]
+      _   -> [x]
+  where thinspace = EText TextNormal "\x2006"
+        medspace  = EText TextNormal "\x2005"
+        widespace = EText TextNormal "\x2004"
+
 renderStr :: TextType -> String -> Inline
 renderStr tt s =
   case tt of
@@ -61,15 +84,7 @@
 expToInlines TextNormal (EIdentifier s) = Just [renderStr TextItalic s]
 expToInlines tt (EIdentifier s) = Just [renderStr tt s]
 expToInlines tt (EMathOperator s) = Just [renderStr tt s]
-expToInlines tt (ESymbol t s) = Just $ addSpace t $ renderStr tt s
-  where addSpace Op x = [x]
-        addSpace Bin x = [medspace, x, medspace]
-        addSpace Rel x = [widespace, x, widespace]
-        addSpace Pun x = [x, thinspace]
-        addSpace _ x = [x]
-        thinspace = Str "\x2006"
-        medspace  = Str "\x2005"
-        widespace = Str "\x2004"
+expToInlines tt (ESymbol _ s) = Just [renderStr tt s]
 expToInlines tt (EDelimited start end xs) = do
   xs' <- mapM (either (return . (:[]) . renderStr tt) (expToInlines tt)) xs
   return $ [renderStr tt start] ++ concat xs' ++ [renderStr tt end]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/texmath-0.8.3/texmath.cabal 
new/texmath-0.8.4/texmath.cabal
--- old/texmath-0.8.3/texmath.cabal     2015-08-18 18:44:37.000000000 +0200
+++ new/texmath-0.8.4/texmath.cabal     2015-10-15 20:08:21.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.8.3
+Version:             0.8.4
 Cabal-Version:       >= 1.10
 Build-type:          Simple
 Synopsis:            Conversion between formats used to represent mathematics.


Reply via email to