Hello community, here is the log from the commit of package texmath for openSUSE:Factory checked in at 2019-02-17 12:20:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/texmath (Old) and /work/SRC/openSUSE:Factory/.texmath.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texmath" Sun Feb 17 12:20:48 2019 rev:28 rq:674315 version:0.11.2 Changes: -------- --- /work/SRC/openSUSE:Factory/texmath/texmath.changes 2018-11-09 07:53:44.275758011 +0100 +++ /work/SRC/openSUSE:Factory/.texmath.new.28833/texmath.changes 2019-02-17 12:20:49.348209117 +0100 @@ -1,0 +2,15 @@ +Fri Feb 1 03:01:10 UTC 2019 - psim...@suse.com + +- Update texmath to version 0.11.2. + texmath (0.11.2) + + * Improved handling of \mathop etc (#126). We now allow operators like + `arg\,min`, converting the space into unicode. + * Support \hspace (#126). + * Support \hdots as synonym of \ldots (#126). + * Support \mathds (#126). + * In parsing array, ignore `|` in column specs (#127). + We have no way to represent this in EArray, currently. + Ignoring them seems better than failing altogether. + +------------------------------------------------------------------- Old: ---- texmath-0.11.1.2.tar.gz New: ---- texmath-0.11.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ texmath.spec ++++++ --- /var/tmp/diff_new_pack.XFRU1E/_old 2019-02-17 12:20:49.996208939 +0100 +++ /var/tmp/diff_new_pack.XFRU1E/_new 2019-02-17 12:20:50.000208937 +0100 @@ -1,7 +1,7 @@ # # spec file for package texmath # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %global pkg_name texmath %bcond_with tests Name: %{pkg_name} -Version: 0.11.1.2 +Version: 0.11.2 Release: 0 Summary: Conversion between formats used to represent mathematics License: GPL-2.0-or-later ++++++ texmath-0.11.1.2.tar.gz -> texmath-0.11.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texmath-0.11.1.2/changelog new/texmath-0.11.2/changelog --- old/texmath-0.11.1.2/changelog 2018-10-24 19:08:17.000000000 +0200 +++ new/texmath-0.11.2/changelog 2019-01-31 07:09:29.000000000 +0100 @@ -1,3 +1,14 @@ +texmath (0.11.2) + + * Improved handling of \mathop etc (#126). We now allow operators like + `arg\,min`, converting the space into unicode. + * Support \hspace (#126). + * Support \hdots as synonym of \ldots (#126). + * Support \mathds (#126). + * In parsing array, ignore `|` in column specs (#127). + We have no way to represent this in EArray, currently. + Ignoring them seems better than failing altogether. + texmath (0.11.1.2) * Eqn writer: properly escape `{` and `}`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texmath-0.11.1.2/src/Text/TeXMath/Readers/TeX.hs new/texmath-0.11.2/src/Text/TeXMath/Readers/TeX.hs --- old/texmath-0.11.1.2/src/Text/TeXMath/Readers/TeX.hs 2018-10-24 19:08:17.000000000 +0200 +++ new/texmath-0.11.2/src/Text/TeXMath/Readers/TeX.hs 2019-01-31 07:09:29.000000000 +0100 @@ -1,4 +1,5 @@ {-# LANGUAGE TupleSections #-} +{-# LANGUAGE ScopedTypeVariables #-} {- Copyright (C) 2009 John MacFarlane <j...@berkeley.edu> @@ -28,6 +29,7 @@ import Control.Monad import Data.Char (isDigit, isAscii, isLetter) import qualified Data.Map as M +import Data.Maybe (mapMaybe) import Text.Parsec hiding (label) import Text.Parsec.Error import Text.Parsec.String @@ -38,6 +40,7 @@ import Text.TeXMath.Unicode.ToTeX (getSymbolType) import Data.Maybe (fromJust) import Text.TeXMath.Unicode.ToUnicode (toUnicode) +import Text.TeXMath.Shared (getSpaceChars) type TP = Parser @@ -52,6 +55,7 @@ , styled , root , mspace + , hspace , mathop , phantom , boxed @@ -108,8 +112,11 @@ return result ignorable :: TP () -ignorable = skipMany (comment <|> label <|> () <$ ctrlseq "nonumber" <|> - (skipMany1 space <?> "whitespace")) +ignorable = skipMany $ + comment + <|> label + <|> () <$ ctrlseq "nonumber" + <|> (skipMany1 space <?> "whitespace") comment :: TP () comment = char '%' *> skipMany (noneOf "\n") *> optional newline @@ -172,7 +179,7 @@ toStr sty (ENumber s) = Just $ toUnicode sty s toStr sty (EMathOperator s) = Just $ toUnicode sty s toStr sty (ESymbol _ s) = Just $ toUnicode sty s - toStr _ (ESpace _) = Just $ " " + toStr _ (ESpace n) = Just $ getSpaceChars n toStr _ (EStyled sty' exps) = concat <$> sequence (map (toStr sty') exps) toStr _ _ = Nothing @@ -343,12 +350,12 @@ arrayAlignments :: TP [Alignment] arrayAlignments = try $ do - as <- braces (many letter) + as <- braces (many (letter <|> char '|')) let letterToAlignment 'l' = AlignLeft letterToAlignment 'c' = AlignCenter letterToAlignment 'r' = AlignRight letterToAlignment _ = AlignCenter - return $ map letterToAlignment as + return $ map letterToAlignment $ filter (/= '|') as environment :: TP Exp environment = do @@ -530,6 +537,7 @@ , ("\\mathsf", EStyled TextSansSerif) , ("\\mathsfup", EStyled TextSansSerif) , ("\\mathbb", EStyled TextDoubleStruck) + , ("\\mathds", EStyled TextDoubleStruck) -- mathds package , ("\\mathcal", EStyled TextScript) , ("\\mathscr", EStyled TextScript) , ("\\mathfrak", EStyled TextFraktur) @@ -605,13 +613,27 @@ mspace :: TP Exp mspace = do ctrlseq "mspace" - lexeme $ char '{' - len <- many1 digit - lexeme $ string "mu" - lexeme $ char '}' - case reads len of - ((n,[]):_) -> return $ ESpace (n/18) - _ -> mzero + braces $ do + len <- many1 digit + lexeme $ string "mu" + case reads len of + ((n :: Integer,[]):_) -> return $ ESpace (fromIntegral n/18) + _ -> mzero + + +hspace :: TP Exp +hspace = do + ctrlseq "hspace" + braces $ do + len <- many1 digit + scaleFactor <- + 1 <$ (string "em") + <|> (1/12) <$ (string "pt") + <|> 6 <$ (string "in") + <|> (50/21) <$ (string "cm") + case reads len of + ((n :: Integer,[]):_) -> return $ ESpace (fromIntegral n * scaleFactor) + _ -> mzero mathop :: TP Exp @@ -626,19 +648,18 @@ mathopWith :: String -> TeXSymbolType -> TP Exp mathopWith name ty = try $ do ctrlseq name - e <- expr1 - let e' = case e of - EGrouped [x] -> x - _ -> e - case e' of - ESymbol _ x -> return $ ESymbol ty x - EIdentifier x -> return $ ESymbol ty x - EText TextNormal x -> return $ ESymbol ty x - EText sty x -> return $ EStyled sty [ESymbol ty x] - x | ty == Op -> case expToOperatorName x of - Just y -> return $ EMathOperator y - _ -> return x - | otherwise -> return x + e <- inbraces <|> expr1 + let es' = case e of + EGrouped xs -> xs + x -> [x] + case es' of + [ESymbol _ x] -> return $ ESymbol ty x + [EIdentifier x] -> return $ ESymbol ty x + [EText TextNormal x] -> return $ ESymbol ty x + [EText sty x] -> return $ EStyled sty [ESymbol ty x] + xs | ty == Op -> return $ EMathOperator $ + concat $ mapMaybe expToOperatorName xs + | otherwise -> return $ EGrouped xs binary :: TP Exp binary = do @@ -988,6 +1009,7 @@ , ("\\prime",ESymbol Ord "\8242") , ("\\dots",ESymbol Ord "\8230") , ("\\ldots",ESymbol Ord "\8230") + , ("\\hdots",ESymbol Ord "\8230") , ("\\cdots",ESymbol Ord "\8943") , ("\\vdots",ESymbol Ord "\8942") , ("\\ddots",ESymbol Ord "\8945") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texmath-0.11.1.2/texmath.cabal new/texmath-0.11.2/texmath.cabal --- old/texmath-0.11.1.2/texmath.cabal 2018-10-24 19:08:17.000000000 +0200 +++ new/texmath-0.11.2/texmath.cabal 2019-01-31 07:09:29.000000000 +0100 @@ -1,5 +1,5 @@ Name: texmath -Version: 0.11.1.2 +Version: 0.11.2 Cabal-Version: >= 1.10 Build-type: Simple Synopsis: Conversion between formats used to represent mathematics.