diff --git a/MarXup/Beamer.hs b/MarXup/Beamer.hs
--- a/MarXup/Beamer.hs
+++ b/MarXup/Beamer.hs
@@ -14,8 +14,6 @@
   bod
 
 framesubtitle = cmd "framesubtitle"
-itemiz xs = itemize $ mconcat $ fmap (item <>) xs
-enumerat xs = enumerate $ mconcat $ fmap (item <>) xs
 
 note = cmd "note"
 
diff --git a/MarXup/Latex.hs b/MarXup/Latex.hs
--- a/MarXup/Latex.hs
+++ b/MarXup/Latex.hs
@@ -5,8 +5,7 @@
 import MarXup.Verbatim
 import Control.Monad (forM_,when,forM)
 import MarXup.Tex
-import Data.List (intersperse,groupBy,elemIndex,nub,intercalate)
-import Data.Monoid
+import Data.List (intersperse,groupBy,elemIndex,nub)
 import Data.Function (on)
 
 -- | Separate the arguments with '\\'
@@ -35,17 +34,21 @@
 
 -- | author info as triplets name, institution, email
 authorinfo' :: AuthorInfoStyle -> [AuthorInfo] -> TeX
+authorinfo' ACMArt as = forM_ (groupBy ((==) `on` authorInst) as) $ \ (g@((AuthorInfo _ _ institution):_)) -> do
+  let names = map authorName g
+  forM_ names $ \n -> cmd "author" $ textual n
+  cmd "affiliation" $ do
+    cmd "institution" $ textual institution
 authorinfo' LNCS as = do
   cmd "author" $ mconcat $ intersperse (cmd0 "and") $ map oneauthor as
   cmd "institute" $ mconcat $ intersperse (cmd0 "and") $ map textual $ insts
   where oneauthor AuthorInfo{..} = textual authorName <> (if length insts > 1 then cmd "inst" (textual $ show $ 1 + instIdx) else mempty)
            where Just instIdx = elemIndex authorInst insts
         insts = nub $ map authorInst as
-
 authorinfo' SIGPlan as = forM_ (groupBy ((==) `on` authorInst) as) $ \ (g@((AuthorInfo _ _ institution):_)) -> do
     let names = map authorName g
         emails = mconcat $ intersperse (cmd0 "and") $ map (textual . authorEmail) g
-    cmdn "authorinfo" [mconcat $ intersperse (cmd0 "and") $ map textual names, textual institution, emails]
+    _ <- cmdn "authorinfo" [mconcat $ intersperse (cmd0 "and") $ map textual names, textual institution, emails]
     return ()
 authorinfo' EPTCS as = mconcat $ intersperse and' $
   flip map (groupBy ((==) `on` authorInst) as) $ \ (g@((AuthorInfo _ _ institution):_)) -> do
@@ -109,7 +112,16 @@
 newcol = tex "&"
 newpara :: Tex ()
 newpara = texLn "\\par"
+newpage :: TeX
+newpage = cmd0 "newpage"
 
+rawMath :: Verbatim a -> Tex ()
+rawMath x = do
+  tex "$"
+  tex $ fromVerbatim x
+  tex "$"
+  return ()
+
 maketitle :: Tex ()
 maketitle = cmd "maketitle" $ return ()
 
@@ -125,8 +137,10 @@
 
 color :: String -> Tex a -> Tex a
 color col bod = do
-  [_,x] <- cmdn' "textcolor" [] [tex col >> return undefined, bod]
-  return x
+  xs <- cmdn' "textcolor" [] [tex col >> return undefined, bod]
+  case xs of
+    [_,x] -> return x
+    _ -> error "MarXup.Tex.color: the impossible happened"
 
 ----------------
 -- Preamble stuff
@@ -155,8 +169,11 @@
 -- Lists
 
 {-# DEPRECATED item, enumerate, itemize "Since Aug 2015. Use itemList, enumList, descList instead "#-}
+item :: Tex ()
 item = cmd0 "item"
+enumerate :: Tex a -> Tex a
 enumerate = env "enumerate"
+itemize :: Tex a -> Tex a
 itemize = env "itemize"
 
 itemList :: [TeX] -> TeX
@@ -201,6 +218,12 @@
   body
   cmd "caption" caption
   label "Fig."
+
+table :: TeX -> TeX -> Tex SortedLabel
+table caption body = env "table" $ do
+  cmd "caption" caption
+  body
+  MarXup.Tex.label "Table"
 
 ----------
 -- Fonts
diff --git a/MarXup/Latex/Math.hs b/MarXup/Latex/Math.hs
--- a/MarXup/Latex/Math.hs
+++ b/MarXup/Latex/Math.hs
@@ -61,8 +61,9 @@
 -- Environement of name @nv@, which should be refered as @referent@.
 deflike :: String -> String -> String -> TeX -> TeX -> Tex SortedLabel
 deflike referent nv header name statement = do
-  newtheorem nv header
   cls <- askClass
+  unless (cls == ACMArt && nv `elem` ["theorem","lemma"]) $ do
+    newtheorem nv header
   unless (cls == LNCS) $ usepkg "amsthm" 100 []
   let envir body = case cls of
         SIGPlan -> env'' nv [name] [] (hspace "0cm" >> body)
diff --git a/MarXup/LineUp/Haskell.hs b/MarXup/LineUp/Haskell.hs
--- a/MarXup/LineUp/Haskell.hs
+++ b/MarXup/LineUp/Haskell.hs
@@ -36,10 +36,14 @@
   ParseFailed location err -> textual (show location ++ show err)
 
 splitTok :: String -> (String, Maybe String)
-splitTok input = (reverse prefix ++ primes, if null numbers then Nothing else Just (reverse numbers))
-  where (numbers,prefix) = span isDigit revNonPrimes
-        (primes,revNonPrimes) = span (== '\'') revIn
-        revIn = reverse input
+splitTok input = (reverse rev3 ++ primes, if null subscript then Nothing else Just (reverse subscript))
+  where (explicitSubscript,rev3) = case break (== '_') rev2 of
+          (everything,"") -> ("",everything)
+          (suff,'_':pref) -> (suff,pref)
+        (numbers,rev2) = span isDigit rev1
+        (primes,rev1) = span (== '\'') rev0
+        rev0 = reverse input
+        subscript = explicitSubscript ++ numbers
 
 printTok :: PrintTok
 printTok t = let s = textual $ showToken t
diff --git a/MarXup/PrettyPrint/Core.hs b/MarXup/PrettyPrint/Core.hs
--- a/MarXup/PrettyPrint/Core.hs
+++ b/MarXup/PrettyPrint/Core.hs
@@ -38,7 +38,8 @@
 
 instance Monoid Doc where
   mempty = Empty
-  mappend = Cat
+instance Semigroup Doc where
+  (<>) = Cat
   
 group :: Doc -> Doc
 group x         = Union (flatten x) x
diff --git a/MarXup/Tex.hs b/MarXup/Tex.hs
--- a/MarXup/Tex.hs
+++ b/MarXup/Tex.hs
@@ -14,20 +14,20 @@
 import qualified Data.Map as Map
 import Graphics.Diagrams.Core (BoxSpec (..))
 
-data ClassFile = Plain | LNCS | SIGPlan | IEEE | EPTCS | Beamer
+data ClassFile = ACMArt | Plain | LNCS | SIGPlan | IEEE | EPTCS | Beamer
   deriving Eq
 
 
 ------------------------------------
 -- MetaData
 
-data Key = PreClass String | PrePackage Int String | PreTheorem String String   -- priority
+data Key = PreClass String | PrePackage Int {- priority -} String | PreTheorem String String
   deriving (Ord,Eq)
 
 newtheorem :: String -> String -> TeX
 newtheorem ident txt = do
   sty <- askClass
-  unless ((sty == LNCS || sty == Beamer) && ident `elem` ["theorem", "corollary", "lemma", "definition", "proposition"]) $ do
+  unless ((sty == LNCS || sty == Beamer || sty == ACMArt) && ident `elem` ["theorem", "corollary", "lemma", "definition", "proposition"]) $ do
   Tex $ metaData (PreTheorem ident txt) ""
 
 usepkg :: String -> Int -> [String] -> TeX
@@ -90,8 +90,10 @@
 
 instance Monoid (TeX) where
   mempty = tex ""
-  mappend = (>>)
 
+instance Semigroup (TeX) where
+  (<>) = (>>)
+
 instance IsString (TeX) where
   fromString = textual
 
@@ -125,8 +127,10 @@
 -- | Command with options
 cmd' :: String -> [String] -> Tex b -> Tex b
 cmd' cmd options arg = do
-  [x] <- cmdn' cmd options [arg]
-  return x
+  xs <- cmdn' cmd options [arg]
+  case xs of
+    [x] -> return x
+    _ -> error "MarXup.Tex: cmd': the impossible happened"
 
 -- | Command with options and many arguments
 cmdn' :: String -> [String] -> [Tex a] -> Tex [a]
diff --git a/marxup.cabal b/marxup.cabal
--- a/marxup.cabal
+++ b/marxup.cabal
@@ -1,5 +1,5 @@
 name:           marxup
-version:        3.1.0.0
+version:        3.1.1.0
 category:       Text
 synopsis:       Markup language preprocessor for Haskell
 description:
