module Text.LaTeX.Packages.AMSThm.Monad
(
amsthm
, newtheorem
, theorem
, proof
, qedhere
, TheoremStyle (..)
, theoremstyle
) where
import Text.LaTeX.Base.Writer
import Text.LaTeX.Base.Render
import Text.LaTeX.Base.Types
import qualified Text.LaTeX.Packages.AMSThm as App
import Text.LaTeX.Packages.AMSThm(TheoremStyle)
amsthm :: PackageName
amsthm = App.amsthm
newtheorem :: (Monad m) => String -> LaTeXT_ m -> LaTeXT_ m
newtheorem a1 a2
= do a2 <- extractLaTeX_ a2
textell ( App.newtheorem a1 a2)
theorem :: (Monad m) => String -> LaTeXT_ m -> LaTeXT_ m
theorem a1 a2
= do a2 <- extractLaTeX_ a2
textell ( App.theorem a1 a2)
proof :: (Monad m) => Maybe (LaTeXT_ m) -> LaTeXT_ m -> LaTeXT_ m
proof a1 a2
= do a1 <- maybe (return Nothing)
((>>= return . Just) . extractLaTeX_)
a1
a2 <- extractLaTeX_ a2
textell ( App.proof a1 a2)
qedhere :: (Monad m) => LaTeXT_ m
qedhere = do textell ( App.qedhere)
theoremstyle :: (Monad m) => TheoremStyle -> LaTeXT_ m
theoremstyle a1 = do textell ( App.theoremstyle a1)