packages feed

HaTeX 1.0.1 → 2.0.0

raw patch · 12 files changed

+527/−451 lines, 12 filessetup-changedPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.LaTeX.IO: appendFileLx :: FilePath -> LaTeXM a -> LaTeX
- Text.LaTeX.IO: getContentsLx :: LaTeXM LaTeX
- Text.LaTeX.IO: getLineLx :: LaTeXM LaTeX
- Text.LaTeX.IO: hGetContentsLx :: Handle -> LaTeXM LaTeX
- Text.LaTeX.IO: hGetLineLx :: Handle -> LaTeXM LaTeX
- Text.LaTeX.IO: hPutStrLnLx :: Handle -> LaTeXM a -> LaTeX
- Text.LaTeX.IO: hPutStrLx :: Handle -> LaTeXM a -> LaTeX
- Text.LaTeX.IO: putStrLnLx :: LaTeXM a -> LaTeX
- Text.LaTeX.IO: putStrLx :: LaTeXM a -> LaTeX
- Text.LaTeX.IO: readFileLx :: FilePath -> LaTeXM LaTeX
- Text.LaTeX.IO: writeFileLx :: FilePath -> LaTeXM a -> LaTeX
- Text.LaTeX.Monad: instance Eq (LaTeXM a)
- Text.LaTeX.Monad: instance IsString (LaTeXM a)
- Text.LaTeX.Monad: instance Monoid (LaTeXM a)
- Text.LaTeX.Monad: instance Show (LaTeXM a)
- Text.LaTeX.Monad: iolx :: IO a -> LaTeXM a
- Text.LaTeX.Monad: type LaTeXM a = WriterT Result IO a
- Text.LaTeX.Packages: instance Floating (LaTeXM a)
- Text.LaTeX.Packages: instance Fractional (LaTeXM a)
- Text.LaTeX.Packages: instance Num (LaTeXM a)
- Text.LaTeX.Packages: latexsym :: Package
+ Text.LaTeX: render :: (Monad m) => LaTeX m -> m String
+ Text.LaTeX.Commands: ldots :: (Monad m) => LaTeX m
+ Text.LaTeX.Commands: qts :: (Monad m) => LaTeX m -> LaTeX m
+ Text.LaTeX.Commands: string :: (Monad m) => String -> LaTeX m
+ Text.LaTeX.Macro: m_articlep :: (Monad m) => Name m -> Title m -> [([PackageOption m], Package m)] -> LaTeX m -> LaTeX m
+ Text.LaTeX.Macro: m_math :: (Monad m) => Name m -> Title m -> LaTeX m -> LaTeX m
+ Text.LaTeX.Monad: instance (Monad m) => Eq (LaTeXT m a)
+ Text.LaTeX.Monad: instance (Monad m) => IsString (LaTeXT m a)
+ Text.LaTeX.Monad: instance (Monad m) => Monoid (LaTeXT m a)
+ Text.LaTeX.Monad: instance (Monad m) => Show (LaTeXT m a)
+ Text.LaTeX.Monad: mlx :: (Monad m) => m a -> LaTeXT m a
+ Text.LaTeX.Monad: type LaTeXT m a = WriterT Result m a
+ Text.LaTeX.Packages: instance (Monad m) => Floating (LaTeXT m a)
+ Text.LaTeX.Packages: instance (Monad m) => Fractional (LaTeXT m a)
+ Text.LaTeX.Packages: instance (Monad m) => Num (LaTeXT m a)
+ Text.LaTeX.Packages: msym :: (Monad m) => Package m
- Text.LaTeX: export :: LaTeX -> FilePath -> IO ()
+ Text.LaTeX: export :: (MonadIO m) => LaTeX m -> FilePath -> m ()
- Text.LaTeX: hatex :: LaTeX
+ Text.LaTeX: hatex :: (Monad m) => LaTeX m
- Text.LaTeX: hatexVersion :: LaTeX
+ Text.LaTeX: hatexVersion :: (Monad m) => LaTeX m
- Text.LaTeX.Arguments: a4paper :: ClassOption
+ Text.LaTeX.Arguments: a4paper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: a5paper :: ClassOption
+ Text.LaTeX.Arguments: a5paper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: article :: Class
+ Text.LaTeX.Arguments: article :: (Monad m) => Class m
- Text.LaTeX.Arguments: b5paper :: ClassOption
+ Text.LaTeX.Arguments: b5paper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: book :: Class
+ Text.LaTeX.Arguments: book :: (Monad m) => Class m
- Text.LaTeX.Arguments: cm :: Float -> LaTeX
+ Text.LaTeX.Arguments: cm :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Arguments: depth :: LaTeX
+ Text.LaTeX.Arguments: depth :: (Monad m) => LaTeX m
- Text.LaTeX.Arguments: em :: Float -> LaTeX
+ Text.LaTeX.Arguments: em :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Arguments: empty :: Style
+ Text.LaTeX.Arguments: empty :: (Monad m) => Style m
- Text.LaTeX.Arguments: ex :: Float -> LaTeX
+ Text.LaTeX.Arguments: ex :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Arguments: executivepaper :: ClassOption
+ Text.LaTeX.Arguments: executivepaper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: fleqn :: ClassOption
+ Text.LaTeX.Arguments: fleqn :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: headings :: Style
+ Text.LaTeX.Arguments: headings :: (Monad m) => Style m
- Text.LaTeX.Arguments: height :: LaTeX
+ Text.LaTeX.Arguments: height :: (Monad m) => LaTeX m
- Text.LaTeX.Arguments: inch :: Float -> LaTeX
+ Text.LaTeX.Arguments: inch :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Arguments: landscape :: ClassOption
+ Text.LaTeX.Arguments: landscape :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: legalpaper :: ClassOption
+ Text.LaTeX.Arguments: legalpaper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: leqno :: ClassOption
+ Text.LaTeX.Arguments: leqno :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: letterpaper :: ClassOption
+ Text.LaTeX.Arguments: letterpaper :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: minimal :: Class
+ Text.LaTeX.Arguments: minimal :: (Monad m) => Class m
- Text.LaTeX.Arguments: mm :: Float -> LaTeX
+ Text.LaTeX.Arguments: mm :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Arguments: notitlepage :: ClassOption
+ Text.LaTeX.Arguments: notitlepage :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: onecolumn :: ClassOption
+ Text.LaTeX.Arguments: onecolumn :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: oneside :: ClassOption
+ Text.LaTeX.Arguments: oneside :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: openany :: ClassOption
+ Text.LaTeX.Arguments: openany :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: openright :: ClassOption
+ Text.LaTeX.Arguments: openright :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: plain :: Style
+ Text.LaTeX.Arguments: plain :: (Monad m) => Style m
- Text.LaTeX.Arguments: proc :: Class
+ Text.LaTeX.Arguments: proc :: (Monad m) => Class m
- Text.LaTeX.Arguments: pt :: Int -> LaTeX
+ Text.LaTeX.Arguments: pt :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Arguments: report :: Class
+ Text.LaTeX.Arguments: report :: (Monad m) => Class m
- Text.LaTeX.Arguments: slides :: Class
+ Text.LaTeX.Arguments: slides :: (Monad m) => Class m
- Text.LaTeX.Arguments: titlepage :: ClassOption
+ Text.LaTeX.Arguments: titlepage :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: totalheight :: LaTeX
+ Text.LaTeX.Arguments: totalheight :: (Monad m) => LaTeX m
- Text.LaTeX.Arguments: twocolumn :: ClassOption
+ Text.LaTeX.Arguments: twocolumn :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: twoside :: ClassOption
+ Text.LaTeX.Arguments: twoside :: (Monad m) => ClassOption m
- Text.LaTeX.Arguments: type Class = LaTeX
+ Text.LaTeX.Arguments: type Class m = LaTeX m
- Text.LaTeX.Arguments: type ClassOption = LaTeX
+ Text.LaTeX.Arguments: type ClassOption m = LaTeX m
- Text.LaTeX.Arguments: type Color = LaTeX
+ Text.LaTeX.Arguments: type Color m = LaTeX m
- Text.LaTeX.Arguments: type Date = LaTeX
+ Text.LaTeX.Arguments: type Date m = LaTeX m
- Text.LaTeX.Arguments: type Encoding = LaTeX
+ Text.LaTeX.Arguments: type Encoding m = LaTeX m
- Text.LaTeX.Arguments: type Extend = LaTeX
+ Text.LaTeX.Arguments: type Extend m = LaTeX m
- Text.LaTeX.Arguments: type ItemOption = LaTeX
+ Text.LaTeX.Arguments: type ItemOption m = LaTeX m
- Text.LaTeX.Arguments: type Language = LaTeX
+ Text.LaTeX.Arguments: type Language m = LaTeX m
- Text.LaTeX.Arguments: type Lift = LaTeX
+ Text.LaTeX.Arguments: type Lift m = LaTeX m
- Text.LaTeX.Arguments: type Marker = LaTeX
+ Text.LaTeX.Arguments: type Marker m = LaTeX m
- Text.LaTeX.Arguments: type Name = LaTeX
+ Text.LaTeX.Arguments: type Name m = LaTeX m
- Text.LaTeX.Arguments: type PlacementSpecifier = LaTeX
+ Text.LaTeX.Arguments: type PlacementSpecifier m = LaTeX m
- Text.LaTeX.Arguments: type Style = LaTeX
+ Text.LaTeX.Arguments: type Style m = LaTeX m
- Text.LaTeX.Arguments: type Text = LaTeX
+ Text.LaTeX.Arguments: type Text m = LaTeX m
- Text.LaTeX.Arguments: type Title = LaTeX
+ Text.LaTeX.Arguments: type Title m = LaTeX m
- Text.LaTeX.Arguments: type URL = LaTeX
+ Text.LaTeX.Arguments: type URL m = LaTeX m
- Text.LaTeX.Arguments: type Width = LaTeX
+ Text.LaTeX.Arguments: type Width m = LaTeX m
- Text.LaTeX.Arguments: type Word = LaTeX
+ Text.LaTeX.Arguments: type Word m = LaTeX m
- Text.LaTeX.Arguments: width :: LaTeX
+ Text.LaTeX.Arguments: width :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: (&) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: (&) :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: (//) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: (//) :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: abstract :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: abstract :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: appendix :: LaTeX
+ Text.LaTeX.Commands: appendix :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: author :: Name -> LaTeX
+ Text.LaTeX.Commands: author :: (Monad m) => Name m -> LaTeX m
- Text.LaTeX.Commands: backmatter :: LaTeX
+ Text.LaTeX.Commands: backmatter :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: bigskip :: LaTeX
+ Text.LaTeX.Commands: bigskip :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: caption :: Text -> LaTeX
+ Text.LaTeX.Commands: caption :: (Monad m) => Text m -> LaTeX m
- Text.LaTeX.Commands: center :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: center :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: chapter :: Title -> LaTeX
+ Text.LaTeX.Commands: chapter :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: chapter_ :: Title -> LaTeX
+ Text.LaTeX.Commands: chapter_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: chaptertab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: chaptertab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: cjustified :: Width -> LaTeX
+ Text.LaTeX.Commands: cjustified :: (Monad m) => Width m -> LaTeX m
- Text.LaTeX.Commands: cleardoublepage :: LaTeX
+ Text.LaTeX.Commands: cleardoublepage :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: clearpage :: LaTeX
+ Text.LaTeX.Commands: clearpage :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: cline :: Int -> Int -> LaTeX
+ Text.LaTeX.Commands: cline :: (Monad m) => Int -> Int -> LaTeX m
- Text.LaTeX.Commands: csep :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: csep :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: description :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: description :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: document :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: document :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: documentclass :: [ClassOption] -> Class -> LaTeX
+ Text.LaTeX.Commands: documentclass :: (Monad m) => [ClassOption m] -> Class m -> LaTeX m
- Text.LaTeX.Commands: emph :: Text -> LaTeX
+ Text.LaTeX.Commands: emph :: (Monad m) => Text m -> LaTeX m
- Text.LaTeX.Commands: endsen :: LaTeX
+ Text.LaTeX.Commands: endsen :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: enumerate :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: enumerate :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: fbox :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: fbox :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: figure :: [PlacementSpecifier] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: figure :: (Monad m) => [PlacementSpecifier m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: flushleft :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: flushleft :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: flushright :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: flushright :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: footnote :: Text -> LaTeX
+ Text.LaTeX.Commands: footnote :: (Monad m) => Text m -> LaTeX m
- Text.LaTeX.Commands: footnotesize :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: footnotesize :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: framebox :: [Width] -> [Char] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: framebox :: (Monad m) => [Width m] -> [Char] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: frenchspacing :: LaTeX
+ Text.LaTeX.Commands: frenchspacing :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: frontmatter :: LaTeX
+ Text.LaTeX.Commands: frontmatter :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: fussy :: LaTeX
+ Text.LaTeX.Commands: fussy :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: hline :: LaTeX
+ Text.LaTeX.Commands: hline :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: hspace :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: hspace :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: hspace_ :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: hspace_ :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: huge :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: huge :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: huge2 :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: huge2 :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: hyp :: LaTeX
+ Text.LaTeX.Commands: hyp :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: hyphenation :: [Word] -> LaTeX
+ Text.LaTeX.Commands: hyphenation :: (Monad m) => [Word m] -> LaTeX m
- Text.LaTeX.Commands: ignorespaces :: LaTeX
+ Text.LaTeX.Commands: ignorespaces :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: ignorespacesafterend :: LaTeX
+ Text.LaTeX.Commands: ignorespacesafterend :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: include :: FilePath -> LaTeX
+ Text.LaTeX.Commands: include :: (Monad m) => FilePath -> LaTeX m
- Text.LaTeX.Commands: includeonly :: [FilePath] -> LaTeX
+ Text.LaTeX.Commands: includeonly :: (Monad m) => [FilePath] -> LaTeX m
- Text.LaTeX.Commands: input :: FilePath -> LaTeX
+ Text.LaTeX.Commands: input :: (Monad m) => FilePath -> LaTeX m
- Text.LaTeX.Commands: item :: [ItemOption] -> LaTeX
+ Text.LaTeX.Commands: item :: (Monad m) => [ItemOption m] -> LaTeX m
- Text.LaTeX.Commands: itemize :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: itemize :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: label :: Marker -> LaTeX
+ Text.LaTeX.Commands: label :: (Monad m) => Marker m -> LaTeX m
- Text.LaTeX.Commands: large :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: large :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: large2 :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: large2 :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: large3 :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: large3 :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: latex :: LaTeX
+ Text.LaTeX.Commands: latex :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: latexe :: LaTeX
+ Text.LaTeX.Commands: latexe :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: linebreak :: Int -> LaTeX
+ Text.LaTeX.Commands: linebreak :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Commands: linespread :: Float -> LaTeX
+ Text.LaTeX.Commands: linespread :: (Monad m) => Float -> LaTeX m
- Text.LaTeX.Commands: listoffigures :: LaTeX
+ Text.LaTeX.Commands: listoffigures :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: listoftables :: LaTeX
+ Text.LaTeX.Commands: listoftables :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: lnbk :: LaTeX
+ Text.LaTeX.Commands: lnbk :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: lnbk_ :: LaTeX
+ Text.LaTeX.Commands: lnbk_ :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: mainmatter :: LaTeX
+ Text.LaTeX.Commands: mainmatter :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: makebox :: [Width] -> [Char] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: makebox :: (Monad m) => [Width m] -> [Char] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: maketitle :: LaTeX
+ Text.LaTeX.Commands: maketitle :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: matrixTab :: [LaTeX] -> LaTeX -> LxMatrix -> Tabular
+ Text.LaTeX.Commands: matrixTab :: (Monad m) => [LaTeX m] -> LaTeX m -> LxMatrix m -> Tabular m
- Text.LaTeX.Commands: mbox :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: mbox :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: mbox_ :: LaTeX
+ Text.LaTeX.Commands: mbox_ :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: minipage :: [Char] -> Width -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: minipage :: (Monad m) => [Char] -> Width m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: multicolumn :: Int -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: multicolumn :: (Monad m) => Int -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: newcommand :: Name -> [Int] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: newcommand :: (Monad m) => Name m -> [Int] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: newenvironment :: Name -> [Int] -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: newenvironment :: (Monad m) => Name m -> [Int] -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: newpage :: LaTeX
+ Text.LaTeX.Commands: newpage :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: nolinebreak :: Int -> LaTeX
+ Text.LaTeX.Commands: nolinebreak :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Commands: nopagebreak :: Int -> LaTeX
+ Text.LaTeX.Commands: nopagebreak :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Commands: normalsize :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: normalsize :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: pagebreak :: Int -> LaTeX
+ Text.LaTeX.Commands: pagebreak :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Commands: pageref :: Marker -> LaTeX
+ Text.LaTeX.Commands: pageref :: (Monad m) => Marker m -> LaTeX m
- Text.LaTeX.Commands: pagestyle :: Style -> LaTeX
+ Text.LaTeX.Commands: pagestyle :: (Monad m) => Style m -> LaTeX m
- Text.LaTeX.Commands: par :: LaTeX
+ Text.LaTeX.Commands: par :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: paragraph :: Title -> LaTeX
+ Text.LaTeX.Commands: paragraph :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: paragraph_ :: Title -> LaTeX
+ Text.LaTeX.Commands: paragraph_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: paragraphtab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: paragraphtab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: parbox :: [Char] -> Width -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: parbox :: (Monad m) => [Char] -> Width m -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: part :: Title -> LaTeX
+ Text.LaTeX.Commands: part :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: part_ :: Title -> LaTeX
+ Text.LaTeX.Commands: part_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: parttab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: parttab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: pfbk :: LaTeX
+ Text.LaTeX.Commands: pfbk :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: phantom :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: phantom :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: protect :: LaTeX
+ Text.LaTeX.Commands: protect :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: providecommand :: Name -> [Int] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: providecommand :: (Monad m) => Name m -> [Int] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: providesPackage :: Name -> LaTeX
+ Text.LaTeX.Commands: providesPackage :: (Monad m) => Name m -> LaTeX m
- Text.LaTeX.Commands: quotation :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: quotation :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: quote :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: quote :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: raisebox :: Lift -> [Extend] -> [Extend] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: raisebox :: (Monad m) => Lift m -> [Extend m] -> [Extend m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: ref :: Marker -> LaTeX
+ Text.LaTeX.Commands: ref :: (Monad m) => Marker m -> LaTeX m
- Text.LaTeX.Commands: renewcommand :: Name -> [Int] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: renewcommand :: (Monad m) => Name m -> [Int] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: scriptsize :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: scriptsize :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: section :: Title -> LaTeX
+ Text.LaTeX.Commands: section :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: section_ :: Title -> LaTeX
+ Text.LaTeX.Commands: section_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: sectiontab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: sectiontab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: skip :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: skip :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: sloppy :: LaTeX
+ Text.LaTeX.Commands: sloppy :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: small :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: small :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: smallskip :: LaTeX
+ Text.LaTeX.Commands: smallskip :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: stretch :: Int -> LaTeX
+ Text.LaTeX.Commands: stretch :: (Monad m) => Int -> LaTeX m
- Text.LaTeX.Commands: subparagraph :: Title -> LaTeX
+ Text.LaTeX.Commands: subparagraph :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subparagraph_ :: Title -> LaTeX
+ Text.LaTeX.Commands: subparagraph_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subparagraphtab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: subparagraphtab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: subsection :: Title -> LaTeX
+ Text.LaTeX.Commands: subsection :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subsection_ :: Title -> LaTeX
+ Text.LaTeX.Commands: subsection_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subsectiontab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: subsectiontab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: subsubsection :: Title -> LaTeX
+ Text.LaTeX.Commands: subsubsection :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subsubsection_ :: Title -> LaTeX
+ Text.LaTeX.Commands: subsubsection_ :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: subsubsectiontab :: Title -> Title -> LaTeX
+ Text.LaTeX.Commands: subsubsectiontab :: (Monad m) => Title m -> Title m -> LaTeX m
- Text.LaTeX.Commands: table :: [PlacementSpecifier] -> LaTeX -> LaTeX
+ Text.LaTeX.Commands: table :: (Monad m) => [PlacementSpecifier m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Commands: tableofcontents :: LaTeX
+ Text.LaTeX.Commands: tableofcontents :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: tabular :: [LaTeX] -> LaTeX -> LaTeX -> Tabular
+ Text.LaTeX.Commands: tabular :: (Monad m) => [LaTeX m] -> LaTeX m -> LaTeX m -> Tabular m
- Text.LaTeX.Commands: tex :: LaTeX
+ Text.LaTeX.Commands: tex :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: textbf :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textbf :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textit :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textit :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textmd :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textmd :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textnormal :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textnormal :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textrm :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textrm :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textsc :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textsc :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textsf :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textsf :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textsl :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textsl :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: texttt :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: texttt :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: textup :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: textup :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: thispagestyle :: Style -> LaTeX
+ Text.LaTeX.Commands: thispagestyle :: (Monad m) => Style m -> LaTeX m
- Text.LaTeX.Commands: tiny :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: tiny :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: title :: Title -> LaTeX
+ Text.LaTeX.Commands: title :: (Monad m) => Title m -> LaTeX m
- Text.LaTeX.Commands: today :: LaTeX
+ Text.LaTeX.Commands: today :: (Monad m) => LaTeX m
- Text.LaTeX.Commands: type LxMatrix = [[LaTeX]]
+ Text.LaTeX.Commands: type LxMatrix m = [[LaTeX m]]
- Text.LaTeX.Commands: type Tabular = LaTeX
+ Text.LaTeX.Commands: type Tabular m = LaTeX m
- Text.LaTeX.Commands: underline :: Text -> LaTeX
+ Text.LaTeX.Commands: underline :: (Monad m) => Text m -> LaTeX m
- Text.LaTeX.Commands: usepackage :: [PackageOption] -> Package -> LaTeX
+ Text.LaTeX.Commands: usepackage :: (Monad m) => [PackageOption m] -> Package m -> LaTeX m
- Text.LaTeX.Commands: verb :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: verb :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: verb_ :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: verb_ :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: verbatim :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: verbatim :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: verbatim_ :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: verbatim_ :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: verse :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: verse :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: vspace :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: vspace :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Commands: vspace_ :: LaTeX -> LaTeX
+ Text.LaTeX.Commands: vspace_ :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm0 :: LaTeX -> LaTeX
+ Text.LaTeX.Define: comm0 :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm0_ :: LaTeX -> LaTeX
+ Text.LaTeX.Define: comm0_ :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm1 :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm1 :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm10 :: LaTeX -> [LaTeX] -> [LaTeX] -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm10 :: (Monad m) => LaTeX m -> [LaTeX m] -> [LaTeX m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm11 :: LaTeX -> LaTeX -> [LaTeX] -> [LaTeX] -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm11 :: (Monad m) => LaTeX m -> LaTeX m -> [LaTeX m] -> [LaTeX m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm12 :: LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm12 :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm2 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX
+ Text.LaTeX.Define: comm2 :: (Monad m) => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m
- Text.LaTeX.Define: comm3 :: LaTeX -> [LaTeX] -> LaTeX
+ Text.LaTeX.Define: comm3 :: (Monad m) => LaTeX m -> [LaTeX m] -> LaTeX m
- Text.LaTeX.Define: comm4 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm4 :: (Monad m) => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm5 :: LaTeX -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm5 :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm6 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm6 :: (Monad m) => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm7 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm7 :: (Monad m) => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm8 :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm8 :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: comm9 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: comm9 :: (Monad m) => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: env :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: env :: (Monad m) => LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: env2 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+ Text.LaTeX.Define: env2 :: (Monad m) => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
- Text.LaTeX.Define: env3 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Define: env3 :: (Monad m) => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
- Text.LaTeX.Macro: m_article :: Name -> Title -> LaTeX -> LaTeX
+ Text.LaTeX.Macro: m_article :: (Monad m) => Name m -> Title m -> LaTeX m -> LaTeX m
- Text.LaTeX.Macro: m_simple :: [ClassOption] -> Class -> Name -> Title -> LaTeX -> LaTeX
+ Text.LaTeX.Macro: m_simple :: (Monad m) => [ClassOption m] -> Class m -> Name m -> Title m -> LaTeX m -> LaTeX m
- Text.LaTeX.Macro: m_wpkgs :: [ClassOption] -> Class -> Name -> Title -> [([PackageOption], Package)] -> LaTeX -> LaTeX
+ Text.LaTeX.Macro: m_wpkgs :: (Monad m) => [ClassOption m] -> Class m -> Name m -> Title m -> [([PackageOption m], Package m)] -> LaTeX m -> LaTeX m
- Text.LaTeX.Monad: genlx :: LaTeX -> LaTeXM a
+ Text.LaTeX.Monad: genlx :: (Monad m) => LaTeX m -> LaTeXT m a
- Text.LaTeX.Monad: lx :: Result -> LaTeX
+ Text.LaTeX.Monad: lx :: (Monad m) => Result -> LaTeX m
- Text.LaTeX.Monad: lxany :: (Show a) => a -> LaTeX
+ Text.LaTeX.Monad: lxany :: (Monad m, Show a) => a -> LaTeX m
- Text.LaTeX.Monad: lxanyw :: (Show b) => b -> LaTeXM a
+ Text.LaTeX.Monad: lxanyw :: (Monad m, Show b) => b -> LaTeXT m a
- Text.LaTeX.Monad: lxw :: Result -> LaTeXM a
+ Text.LaTeX.Monad: lxw :: (Monad m) => Result -> LaTeXT m a
- Text.LaTeX.Monad: nlx :: LaTeXM a -> IO Result
+ Text.LaTeX.Monad: nlx :: (Monad m) => LaTeXT m a -> m Result
- Text.LaTeX.Monad: reslx :: (Result -> Result) -> (LaTeXM a -> LaTeXM a)
+ Text.LaTeX.Monad: reslx :: (Monad m) => (Result -> Result) -> (LaTeXT m a -> LaTeXT m a)
- Text.LaTeX.Monad: type LaTeX = LaTeXM ()
+ Text.LaTeX.Monad: type LaTeX m = LaTeXT m ()
- Text.LaTeX.Monad: ungenlx :: LaTeXM a -> LaTeX
+ Text.LaTeX.Monad: ungenlx :: (Monad m) => LaTeXT m a -> LaTeX m
- Text.LaTeX.Packages: (!:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (!:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (*:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (*:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (+-) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (+-) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (-+) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (-+) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (-/) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (-/) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (->>) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (->>) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (-|) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (-|) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (/=:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (/=:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (/@) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (/@) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (<*>) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (<*>) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (<=:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (<=:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (<=@) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (<=@) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (<@) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (<@) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (==:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (==:) :: (Monad m) => LaTeXT m a -> LaTeXT m a -> LaTeXT m a
- Text.LaTeX.Packages: (===) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (===) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (>=:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (>=:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (>=@) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (>=@) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (>@) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (>@) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (^:) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (^:) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (|-) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (|-) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (|.|) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (|.|) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (~=) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (~=) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: (~~) :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: (~~) :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: acute :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: acute :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: alpha :: LaTeX
+ Text.LaTeX.Packages: alpha :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: amsmath :: Package
+ Text.LaTeX.Packages: amsmath :: (Monad m) => Package m
- Text.LaTeX.Packages: ansinew :: Encoding
+ Text.LaTeX.Packages: ansinew :: (Monad m) => Encoding m
- Text.LaTeX.Packages: applemac :: Encoding
+ Text.LaTeX.Packages: applemac :: (Monad m) => Encoding m
- Text.LaTeX.Packages: babel :: Package
+ Text.LaTeX.Packages: babel :: (Monad m) => Package m
- Text.LaTeX.Packages: bar :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: bar :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: beta :: LaTeX
+ Text.LaTeX.Packages: beta :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: binom :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: binom :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: breve :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: breve :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: cdot :: MathTerm
+ Text.LaTeX.Packages: cdot :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: cdots :: MathTerm
+ Text.LaTeX.Packages: cdots :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: check :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: check :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: chi :: LaTeX
+ Text.LaTeX.Packages: chi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: color :: Color -> LaTeX
+ Text.LaTeX.Packages: color :: (Monad m) => Color m -> LaTeX m
- Text.LaTeX.Packages: colorpkg :: Package
+ Text.LaTeX.Packages: colorpkg :: (Monad m) => Package m
- Text.LaTeX.Packages: cp1251 :: Encoding
+ Text.LaTeX.Packages: cp1251 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: cp850 :: Encoding
+ Text.LaTeX.Packages: cp850 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: cp866nav :: Encoding
+ Text.LaTeX.Packages: cp866nav :: (Monad m) => Encoding m
- Text.LaTeX.Packages: dagger :: LaTeX
+ Text.LaTeX.Packages: dagger :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: ddagger :: LaTeX
+ Text.LaTeX.Packages: ddagger :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: ddot :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: ddot :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: ddots :: MathTerm
+ Text.LaTeX.Packages: ddots :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: delta :: LaTeX
+ Text.LaTeX.Packages: delta :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: delta_ :: LaTeX
+ Text.LaTeX.Packages: delta_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: doc :: Package
+ Text.LaTeX.Packages: doc :: (Monad m) => Package m
- Text.LaTeX.Packages: dot :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: dot :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: dvipsnames :: PackageOption
+ Text.LaTeX.Packages: dvipsnames :: (Monad m) => PackageOption m
- Text.LaTeX.Packages: epsilon :: LaTeX
+ Text.LaTeX.Packages: epsilon :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: equation :: MathTerm -> LaTeX
+ Text.LaTeX.Packages: equation :: (Monad m) => MathTerm m -> LaTeX m
- Text.LaTeX.Packages: equation_ :: MathTerm -> LaTeX
+ Text.LaTeX.Packages: equation_ :: (Monad m) => MathTerm m -> LaTeX m
- Text.LaTeX.Packages: eta :: LaTeX
+ Text.LaTeX.Packages: eta :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: euro :: LaTeX
+ Text.LaTeX.Packages: euro :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: eurosym :: Package
+ Text.LaTeX.Packages: eurosym :: (Monad m) => Package m
- Text.LaTeX.Packages: exscale :: Package
+ Text.LaTeX.Packages: exscale :: (Monad m) => Package m
- Text.LaTeX.Packages: fontenc :: Package
+ Text.LaTeX.Packages: fontenc :: (Monad m) => Package m
- Text.LaTeX.Packages: forall :: LaTeX
+ Text.LaTeX.Packages: forall :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: gamma :: LaTeX
+ Text.LaTeX.Packages: gamma :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: gamma_ :: LaTeX
+ Text.LaTeX.Packages: gamma_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: grave :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: grave :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: hat :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: hat :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: href :: URL -> Text -> LaTeX
+ Text.LaTeX.Packages: href :: (Monad m) => URL m -> Text m -> LaTeX m
- Text.LaTeX.Packages: hyperref :: Package
+ Text.LaTeX.Packages: hyperref :: (Monad m) => Package m
- Text.LaTeX.Packages: ifthen :: Package
+ Text.LaTeX.Packages: ifthen :: (Monad m) => Package m
- Text.LaTeX.Packages: inputenc :: Package
+ Text.LaTeX.Packages: inputenc :: (Monad m) => Package m
- Text.LaTeX.Packages: iota :: LaTeX
+ Text.LaTeX.Packages: iota :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: kappa :: LaTeX
+ Text.LaTeX.Packages: kappa :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: koi8_ru :: Encoding
+ Text.LaTeX.Packages: koi8_ru :: (Monad m) => Encoding m
- Text.LaTeX.Packages: lambda :: LaTeX
+ Text.LaTeX.Packages: lambda :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: lambda_ :: LaTeX
+ Text.LaTeX.Packages: lambda_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: latin1 :: Encoding
+ Text.LaTeX.Packages: latin1 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: lgr :: Encoding
+ Text.LaTeX.Packages: lgr :: (Monad m) => Encoding m
- Text.LaTeX.Packages: lim :: MathTerm
+ Text.LaTeX.Packages: lim :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: macukr :: Encoding
+ Text.LaTeX.Packages: macukr :: (Monad m) => Encoding m
- Text.LaTeX.Packages: makeidx :: Package
+ Text.LaTeX.Packages: makeidx :: (Monad m) => Package m
- Text.LaTeX.Packages: math :: MathTerm -> LaTeX
+ Text.LaTeX.Packages: math :: (Monad m) => MathTerm m -> LaTeX m
- Text.LaTeX.Packages: mathring :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: mathring :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: monochrome :: PackageOption
+ Text.LaTeX.Packages: monochrome :: (Monad m) => PackageOption m
- Text.LaTeX.Packages: mu :: LaTeX
+ Text.LaTeX.Packages: mu :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: nodvipsnames :: PackageOption
+ Text.LaTeX.Packages: nodvipsnames :: (Monad m) => PackageOption m
- Text.LaTeX.Packages: normalcolor :: LaTeX
+ Text.LaTeX.Packages: normalcolor :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: nu :: LaTeX
+ Text.LaTeX.Packages: nu :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: oT1 :: Encoding
+ Text.LaTeX.Packages: oT1 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: omega :: LaTeX
+ Text.LaTeX.Packages: omega :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: omega_ :: LaTeX
+ Text.LaTeX.Packages: omega_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: overbrace :: MathTerm -> MathTerm
+ Text.LaTeX.Packages: overbrace :: (Monad m) => MathTerm m -> MathTerm m
- Text.LaTeX.Packages: overline :: MathTerm -> MathTerm
+ Text.LaTeX.Packages: overline :: (Monad m) => MathTerm m -> MathTerm m
- Text.LaTeX.Packages: pagecolor :: Color -> LaTeX
+ Text.LaTeX.Packages: pagecolor :: (Monad m) => Color m -> LaTeX m
- Text.LaTeX.Packages: pdftex :: PackageOption
+ Text.LaTeX.Packages: pdftex :: (Monad m) => PackageOption m
- Text.LaTeX.Packages: phi :: LaTeX
+ Text.LaTeX.Packages: phi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: phi_ :: LaTeX
+ Text.LaTeX.Packages: phi_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: pi_ :: LaTeX
+ Text.LaTeX.Packages: pi_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: proof :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: proof :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: psi :: LaTeX
+ Text.LaTeX.Packages: psi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: psi_ :: LaTeX
+ Text.LaTeX.Packages: psi_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: rgb :: Float -> Float -> Float -> Color
+ Text.LaTeX.Packages: rgb :: (Monad m) => Float -> Float -> Float -> Color m
- Text.LaTeX.Packages: rho :: LaTeX
+ Text.LaTeX.Packages: rho :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: selectlanguage :: Language -> LaTeX
+ Text.LaTeX.Packages: selectlanguage :: (Monad m) => Language m -> LaTeX m
- Text.LaTeX.Packages: sigma :: LaTeX
+ Text.LaTeX.Packages: sigma :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: sigma_ :: LaTeX
+ Text.LaTeX.Packages: sigma_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: smash :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: smash :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: sqroot :: [MathTerm] -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: sqroot :: (Monad m) => [MathTerm m] -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: summ :: MathTerm -> MathTerm -> MathTerm
+ Text.LaTeX.Packages: summ :: (Monad m) => MathTerm m -> MathTerm m -> MathTerm m
- Text.LaTeX.Packages: sums :: MathTerm
+ Text.LaTeX.Packages: sums :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: sums_ :: MathTerm
+ Text.LaTeX.Packages: sums_ :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: syntaxonly :: LaTeX
+ Text.LaTeX.Packages: syntaxonly :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: syntonly :: Package
+ Text.LaTeX.Packages: syntonly :: (Monad m) => Package m
- Text.LaTeX.Packages: t1 :: Encoding
+ Text.LaTeX.Packages: t1 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: t2A :: Encoding
+ Text.LaTeX.Packages: t2A :: (Monad m) => Encoding m
- Text.LaTeX.Packages: t2B :: Encoding
+ Text.LaTeX.Packages: t2B :: (Monad m) => Encoding m
- Text.LaTeX.Packages: t2C :: Encoding
+ Text.LaTeX.Packages: t2C :: (Monad m) => Encoding m
- Text.LaTeX.Packages: tau :: LaTeX
+ Text.LaTeX.Packages: tau :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: textcelsius :: LaTeX
+ Text.LaTeX.Packages: textcelsius :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: textcomp :: Package
+ Text.LaTeX.Packages: textcomp :: (Monad m) => Package m
- Text.LaTeX.Packages: textdegree :: LaTeX
+ Text.LaTeX.Packages: textdegree :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: texteuro :: LaTeX
+ Text.LaTeX.Packages: texteuro :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: theta :: LaTeX
+ Text.LaTeX.Packages: theta :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: theta_ :: LaTeX
+ Text.LaTeX.Packages: theta_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: tilde :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: tilde :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: type MathTerm = LaTeX
+ Text.LaTeX.Packages: type MathTerm m = LaTeX m
- Text.LaTeX.Packages: type Package = LaTeX
+ Text.LaTeX.Packages: type Package m = LaTeX m
- Text.LaTeX.Packages: type PackageOption = LaTeX
+ Text.LaTeX.Packages: type PackageOption m = LaTeX m
- Text.LaTeX.Packages: ucs :: Package
+ Text.LaTeX.Packages: ucs :: (Monad m) => Package m
- Text.LaTeX.Packages: underbrace :: MathTerm -> MathTerm
+ Text.LaTeX.Packages: underbrace :: (Monad m) => MathTerm m -> MathTerm m
- Text.LaTeX.Packages: upsilon :: LaTeX
+ Text.LaTeX.Packages: upsilon :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: upsilon_ :: LaTeX
+ Text.LaTeX.Packages: upsilon_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: usenames :: PackageOption
+ Text.LaTeX.Packages: usenames :: (Monad m) => PackageOption m
- Text.LaTeX.Packages: utf8x :: Encoding
+ Text.LaTeX.Packages: utf8x :: (Monad m) => Encoding m
- Text.LaTeX.Packages: varepsilon :: LaTeX
+ Text.LaTeX.Packages: varepsilon :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: varphi :: LaTeX
+ Text.LaTeX.Packages: varphi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: varpi :: LaTeX
+ Text.LaTeX.Packages: varpi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: varrho :: LaTeX
+ Text.LaTeX.Packages: varrho :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: varsigma :: LaTeX
+ Text.LaTeX.Packages: varsigma :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: vartheta :: LaTeX
+ Text.LaTeX.Packages: vartheta :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: vdots :: MathTerm
+ Text.LaTeX.Packages: vdots :: (Monad m) => MathTerm m
- Text.LaTeX.Packages: vec :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: vec :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: widehat :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: widehat :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: widetilde :: LaTeX -> LaTeX
+ Text.LaTeX.Packages: widetilde :: (Monad m) => LaTeX m -> LaTeX m
- Text.LaTeX.Packages: x2 :: Encoding
+ Text.LaTeX.Packages: x2 :: (Monad m) => Encoding m
- Text.LaTeX.Packages: xi :: LaTeX
+ Text.LaTeX.Packages: xi :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: xi_ :: LaTeX
+ Text.LaTeX.Packages: xi_ :: (Monad m) => LaTeX m
- Text.LaTeX.Packages: zeta :: LaTeX
+ Text.LaTeX.Packages: zeta :: (Monad m) => LaTeX m

Files

HaTeX.cabal view
@@ -1,40 +1,46 @@-Name:           HaTeX
-Version:        1.0.1
-Author:         Daniel Díaz
+Name:           HaTeX
+Version:        2.0.0
+Author:         Daniel Diaz
+Homepage:       http://ddiaz.asofilak.es/packages/HaTeX
 License:        BSD3
 License-file:   license
-Maintainer:     lazy.ddiaz@gmail.com
+Maintainer:     danieldiaz@asofilak.es
 Category:       Text
-Synopsis:       Library for generate LaTeX code.
+Synopsis:       Library for write LaTeX code.
 Description:    
          You can write LaTeX files using this package.
          See Text.LaTeX for a brief introduction.
          .
-         You can test the library and report me any bug or suggestion at:
+         Report any bug or suggestion to the author:
          .
-         lazy.ddiaz\@gmail.com
+         danieldiaz\@asofilak.es
          .
-         Also, if you have an example where you use HaTeX, you could send it to my email. Thank you.
+         Also, if you have an example where you use HaTeX, you could send it to the same email. Thanks in advance.
          .
          Changes from last version:
          .
+         * IMPORTANT: @LaTeXM@ monad has been replaced by @LaTeXT@ monadic transformer.
+         So, change types of form @LaTeXM a@ (or @LaTeX@) to @LaTeXT m a@ (or @LaTeX m@).
+         This allow you to use computations of any monad through a lift function.
+         .
+         * Function @iolx@ replaced by @mlx@.
+         .
+         * IMPORTANT: IO module has been removed.
+         .
          * Added new documentation.
          .
-         * Added string combinators for omit some definitions
+         * Added new macros.
          .
-         * Deleted some unnecessary definitions.
 Extensions:     OverloadedStrings , FlexibleInstances , TypeSynonymInstances
 Build-type:     Simple
-Build-depends:  base >= 4 && < 5
+Build-depends:  base == 4.*
               , mtl
               , dstring
               , to-string-class
               , string-combinators
               , filepath
 Cabal-version:  >= 1.6
-Tested-with:    GHC == 6.12.1
 Exposed-modules: Text.LaTeX
-               , Text.LaTeX.IO
                , Text.LaTeX.Macro
                , Text.LaTeX.Commands
                , Text.LaTeX.Packages
Setup.hs view
@@ -1,4 +1,2 @@-
 import Distribution.Simple
-
 main = defaultMain
Text/LaTeX.hs view
@@ -1,4 +1,6 @@ 
+{-# OPTIONS_GHC -XOverloadedStrings #-}
+
 module Text.LaTeX 
      ( -- * How to use HaTeX
        -- ** Introduction
@@ -13,13 +15,17 @@        -- ** Enriching your text
        -- $guide4
 
-       -- ** Performing IO computations
+       -- ** Performing monadic computations
        -- $guide5
 
+       -- ** Adding sections
+       -- $guide6
+
        -- * HaTeX related functions
        hatex
      , hatexVersion
        -- * Exporting to /.tex/
+     , render
      , export
        -- * Re-exports
      , module Text.LaTeX.Result
@@ -29,7 +35,6 @@      , module Text.LaTeX.Packages
      , module Text.LaTeX.Commands
      , module Text.LaTeX.Macro
-     , module Text.LaTeX.IO
      ) where
 
 import Text.LaTeX.Monad
@@ -37,32 +42,36 @@ import Text.LaTeX.Arguments
 import Text.LaTeX.Define
 import Text.LaTeX.Packages
-import Text.LaTeX.IO
 import Text.LaTeX.Result
 import Text.LaTeX.Macro
 --
 import System.FilePath (takeExtension)
+import Control.Monad.Trans (MonadIO (..))
 
 -- | HaTeX nice word.
-hatex :: LaTeX
+hatex :: Monad m => LaTeX m
 hatex = makebox [] [] $ do "H"
                            raisebox (ex (-0.55)) [] [] $
                              makebox [0.5 >> width] [] "A"
                            tex
 
 -- | Your HaTeX version.
-hatexVersion :: LaTeX
-hatexVersion = do textbf "1" ; ".0.1"
+hatexVersion :: Monad m => LaTeX m
+hatexVersion = do textbf "1" ; ".0.2"
 
+-- | Render 'LaTeX' to 'String'.
+render :: Monad m => LaTeX m -> m String
+render = (>>= return . fromResult) . nlx
+
 -- | Export the 'Result' of a 'LaTeX' sequence in a /.tex/ file.
-export ::
-     LaTeX    -- ^ 'LaTeX' to export.
+export :: MonadIO m =>
+     LaTeX m  -- ^ 'LaTeX' to export.
   -> FilePath -- ^ Path of export.
-  -> IO ()
+  -> m ()
 export x fp = do y <- nlx x
                  let z = fromResult y
-                 if takeExtension fp == ".tex" then writeFile fp z
-                                               else writeFile (fp ++ ".tex") z
+                 if takeExtension fp == ".tex" then liftIO $ writeFile fp z
+                                               else liftIO $ writeFile (fp ++ ".tex") z
 
 -----------------------------------------------------------------------------------------------------------
 
@@ -155,18 +164,29 @@ Applying the function to only part of the text, we achieve modify just that part.
 -}
 
--- Performing IO computations
+-- Performing monadic computations
 
 {- $guide5
-To includes an 'IO' computation in 'LaTeX' monad, use 'iolx'.
+All computations in HaTeX take place in the 'LaTeXT' monadic transformer.
+To includes a monadic computation, use 'mlx'.
 
-> gtime = do t <- iolx getClockTime
+> gtime = do t <- mlx getClockTime
 >            ...
 
-Some 'IO' computations are predefined in "Text.LaTeX.IO".
 -}
 
+-- Adding sections
 
+{- $guide6
+Commands to adding sections are included in "Text.LaTeX.Commands".
+Examples are 'section' or 'paragraph'.
+
+If you want sections without number, use 'section_'.
+This also avoid showing the section into the table of contents.
+
+If you want title of section to be different in the context than in the table of contents,
+use 'sectiontab'.
+-}
 
 
 
Text/LaTeX/Arguments.hs view
@@ -1,4 +1,6 @@ 
+{-# LANGUAGE OverloadedStrings #-}
+
 module Text.LaTeX.Arguments (
     -- * Renaming @LaTeX@
     Language
@@ -62,172 +64,172 @@ 
 import Data.List
 
-type Language = LaTeX
+type Language m = LaTeX m
 
-type Encoding = LaTeX
+type Encoding m = LaTeX m
 
-type URL = LaTeX
+type URL m = LaTeX m
 
-type Color = LaTeX
+type Color m = LaTeX m
 
-type Name = LaTeX
+type Name m = LaTeX m
 
-type Title = LaTeX
+type Title m = LaTeX m
 
-type Date = LaTeX
+type Date m = LaTeX m
 
-type Word = LaTeX
+type Word m = LaTeX m
 
-type Marker = LaTeX
+type Marker m = LaTeX m
 
-type Text = LaTeX
+type Text m = LaTeX m
 
-type ItemOption = LaTeX
+type ItemOption m = LaTeX m
 
-type PlacementSpecifier = LaTeX
+type PlacementSpecifier m = LaTeX m
 
 --
 
-type ClassOption = LaTeX
+type ClassOption m = LaTeX m
 
-letterpaper :: ClassOption
+letterpaper :: Monad m => ClassOption m
 letterpaper = "letterpaper"
 
-a4paper :: ClassOption
+a4paper :: Monad m => ClassOption m
 a4paper = "a4paper"
 
-a5paper :: ClassOption
+a5paper :: Monad m => ClassOption m
 a5paper = "a5paper"
 
-b5paper :: ClassOption
+b5paper :: Monad m => ClassOption m
 b5paper = "b5paper"
 
-executivepaper :: ClassOption
+executivepaper :: Monad m => ClassOption m
 executivepaper = "executivepaper"
 
-legalpaper :: ClassOption
+legalpaper :: Monad m => ClassOption m
 legalpaper = "legalpaper"
 
 --
 
-fleqn :: ClassOption
+fleqn :: Monad m => ClassOption m
 fleqn = "fleqn"
 
-leqno :: ClassOption
+leqno :: Monad m => ClassOption m
 leqno = "leqno"
 
 --
 
-titlepage :: ClassOption
+titlepage :: Monad m => ClassOption m
 titlepage = "titlepage"
 
-notitlepage :: ClassOption
+notitlepage :: Monad m => ClassOption m
 notitlepage = "notitlepage"
 
 --
 
-onecolumn :: ClassOption
+onecolumn :: Monad m => ClassOption m
 onecolumn = "onecolumn"
 
-twocolumn :: ClassOption
+twocolumn :: Monad m => ClassOption m
 twocolumn = "twocolumn"
 
 --
 
-twoside :: ClassOption
+twoside :: Monad m => ClassOption m
 twoside = "twoside"
 
-oneside :: ClassOption
+oneside :: Monad m => ClassOption m
 oneside = "oneside"
 
 --
 
-landscape :: ClassOption
+landscape :: Monad m => ClassOption m
 landscape = "landscape"
 
 --
 
-openright :: ClassOption
+openright :: Monad m => ClassOption m
 openright = "openright"
 
-openany :: ClassOption
+openany :: Monad m => ClassOption m
 openany = "openany"
 
 --
 
-type Class = LaTeX
+type Class m = LaTeX m
 
-article :: Class
+article :: Monad m => Class m
 article = "article"
 
-proc :: Class
+proc :: Monad m => Class m
 proc = "proc"
 
-minimal :: Class
+minimal :: Monad m => Class m
 minimal = "minimal"
 
-report :: Class
+report :: Monad m => Class m
 report = "report"
 
-book :: Class
+book :: Monad m => Class m
 book = "book"
 
-slides :: Class
+slides :: Monad m => Class m
 slides = "slides"
 
 --
 
 
-type Style = LaTeX
+type Style m = LaTeX m
 
-plain :: Style
+plain :: Monad m => Style m
 plain = "plain"
 
-headings :: Style
+headings :: Monad m => Style m
 headings = "headings"
 
-empty :: Style
+empty :: Monad m => Style m
 empty = "empty"
 
 -- Meters
 
-type Width = LaTeX
+type Width m = LaTeX m
 
-type Lift = LaTeX
+type Lift m = LaTeX m
 
-type Extend = LaTeX
+type Extend m = LaTeX m
 
-width :: LaTeX
+width :: Monad m => LaTeX m
 width = comm0_ "width"
 
-height :: LaTeX
+height :: Monad m => LaTeX m
 height = comm0_ "height"
 
-depth :: LaTeX
+depth :: Monad m => LaTeX m
 depth = comm0_ "depth"
 
-totalheight :: LaTeX
+totalheight :: Monad m => LaTeX m
 totalheight = comm0_ "totalheight"
 
 -- $measures
 -- #Measures#
 
-mm :: Float -> LaTeX
+mm :: Monad m => Float -> LaTeX m
 mm = (>>"mm") . lxany
 
-cm :: Float -> LaTeX
+cm :: Monad m => Float -> LaTeX m
 cm = (>>"cm") . lxany
 
-inch :: Float -> LaTeX
+inch :: Monad m => Float -> LaTeX m
 inch = (>>"in") . lxany
 
-pt :: Int -> LaTeX
+pt :: Monad m => Int -> LaTeX m
 pt = (>>"pt") . lxany
 
-em :: Float -> LaTeX
+em :: Monad m => Float -> LaTeX m
 em = (>>"em") . lxany
 
-ex :: Float -> LaTeX
+ex :: Monad m => Float -> LaTeX m
 ex = (>>"ex") . lxany
 
 
Text/LaTeX/Commands.hs view
@@ -1,5 +1,7 @@ 
--- | Here, principal LaTeX /commands/ and /environments/.
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | Here, principal LaTeX m /commands/ and /environments/.
 module Text.LaTeX.Commands (
     -- * Document's Properties
     documentclass
@@ -10,7 +12,7 @@   , title
     -- * Document Environment
   , document
-    -- * Text order
+    -- * Text Layout
   , lnbk , lnbk_
   , pfbk
   , newpage
@@ -111,6 +113,9 @@     -- * Others
   , protect
   , phantom
+  , string
+  , qts
+  , ldots
   ) where
 
 import Prelude hiding (unwords)
@@ -129,359 +134,369 @@ 
 -- Special Characters
 
-char :: Char -> LaTeX
+char :: Monad m => Char -> LaTeX m
 char = chReplace resCharsStr
    where
      chReplace [] c = lx $ toResult [c]
      chReplace ((x,y):xs) c = if x == c then lx y else chReplace xs c
 
-string :: String -> LaTeX
+-- | Like 'fromString', but taking care with reserved characters.
+string :: Monad m => String -> LaTeX m
 string = mapM_ char
 
--- | Delimites between quotes a text.
-qts :: LaTeX -> LaTeX
+-- | Delimite between quotes a text.
+qts :: Monad m => LaTeX m -> LaTeX m
 qts = between "``" "''"
 
-ldots :: LaTeX
+-- | Write a ellipsis.
+ldots :: Monad m => LaTeX m
 ldots = comm0 "ldots"
 
 --
 
 -- | In header, determines the document class.
-documentclass :: [ClassOption] -> Class -> LaTeX
+documentclass :: Monad m => [ClassOption m] -> Class m -> LaTeX m
 documentclass = comm4 "documentclass"
 
 -- | In header, import a package.
-usepackage :: [PackageOption] -> Package -> LaTeX
+usepackage :: Monad m => [PackageOption m] -> Package m -> LaTeX m
 usepackage = comm4 "usepackage"
 
 -- | In header, determines page style.
-pagestyle :: Style -> LaTeX
+pagestyle :: Monad m => Style m -> LaTeX m
 pagestyle = comm1 "pagestyle"
 
 -- | A local version of 'pagestyle', to use for any page.
-thispagestyle :: Style -> LaTeX
+thispagestyle :: Monad m => Style m -> LaTeX m
 thispagestyle = comm1 "thispagestyle"
 
 -- | In header, especifies the document's author.
-author :: Name -> LaTeX
+author :: Monad m => Name m -> LaTeX m
 author = comm1 "author"
 
 -- | In header, especifies the document's title.
-title :: Title -> LaTeX
+title :: Monad m => Title m -> LaTeX m
 title = comm1 "title"
 
 -- | In header, inserts a date of writing.
 -- If you don't specify one, it takes the date of export.
-date :: Date -> LaTeX
+date :: Monad m => Date m -> LaTeX m
 date = comm1 "date"
 
 -- Document environment
 
-document :: LaTeX -> LaTeX
+document :: Monad m => LaTeX m -> LaTeX m
 document = env "document"
 
--- Text Order
+-- Text m Order
 
 -- | Starts a new line.
-lnbk :: LaTeX
+lnbk :: Monad m => LaTeX m
 lnbk = comm0_ "\\"
 
 -- | Starts a new paragraph.
-pfbk :: LaTeX
+pfbk :: Monad m => LaTeX m
 pfbk = newline >> newline
 
-lnbk_ :: LaTeX
+lnbk_ :: Monad m => LaTeX m
 lnbk_ = comm0_ "\\*"
 
 -- | Starts a new page.
-newpage :: LaTeX
+newpage :: Monad m => LaTeX m
 newpage = comm0 "newpage"
 
-linebreak :: Int -> LaTeX
+linebreak :: Monad m => Int -> LaTeX m
 linebreak = comm3 "linebreak" . (:[]) . lxany
 
-nolinebreak :: Int -> LaTeX
+nolinebreak :: Monad m => Int -> LaTeX m
 nolinebreak = comm3 "nolinebreak" . (:[]) . lxany
 
-pagebreak :: Int -> LaTeX
+pagebreak :: Monad m => Int -> LaTeX m
 pagebreak = comm3 "pagebreak" . (:[]) . lxany
 
-nopagebreak :: Int -> LaTeX
+nopagebreak :: Monad m => Int -> LaTeX m
 nopagebreak = comm3 "nopagebreak" . (:[]) . lxany
 
-fussy :: LaTeX
+fussy :: Monad m => LaTeX m
 fussy = comm0 "fussy"
 
-sloppy :: LaTeX
+sloppy :: Monad m => LaTeX m
 sloppy = comm0 "sloppy"
 
-endsen :: LaTeX
+endsen :: Monad m => LaTeX m
 endsen = comm0_ "@"
 
-frenchspacing :: LaTeX
+frenchspacing :: Monad m => LaTeX m
 frenchspacing = comm0 "frenchspacing"
 
 -- Importing
 
-include :: FilePath -> LaTeX
+include :: Monad m => FilePath -> LaTeX m
 include = comm1 "include" . fromString
 
-includeonly :: [FilePath] -> LaTeX
+includeonly :: Monad m => [FilePath] -> LaTeX m
 includeonly = comm1 "includeonly" . mapM_ fromString . intersperse ","
 
-input :: FilePath -> LaTeX
+input :: Monad m => FilePath -> LaTeX m
 input = comm1 "input" . fromString
 
 -- Hyphenation
 
-hyphenation :: [Word] -> LaTeX
+hyphenation :: Monad m => [Word m] -> LaTeX m
 hyphenation = comm1 "hyphenation" . unwords
 
-hyp :: LaTeX
+hyp :: Monad m => LaTeX m
 hyp = comm0 "-"
 
 -- Ready-Made Strings
 
 -- | Writes current date.
-today :: LaTeX
+today :: Monad m => LaTeX m
 today = comm0 "today"
 
 -- | TeX nice word.
-tex :: LaTeX
+tex :: Monad m => LaTeX m
 tex = comm0 "TeX"
 
--- | LaTeX nice word.
-latex :: LaTeX
-latex = comm0 "LaTeX"
+-- | LaTeX m nice word.
+latex :: Monad m => LaTeX m
+latex = comm0 "LaTeX m"
 
--- | LaTeX2e nice word.
-latexe :: LaTeX
-latexe = comm0 "LaTeXe"
+-- | LaTeX m2e nice word.
+latexe :: Monad m => LaTeX m
+latexe = comm0 "LaTeX me"
 
 -- Sections (Article)
 
-section :: Title -> LaTeX
+section :: Monad m => Title m -> LaTeX m
 section = comm1 "section"
 
-section_ :: Title -> LaTeX
+section_ :: Monad m => Title m -> LaTeX m
 section_ = comm1 "section*"
 
-sectiontab :: Title -> Title -> LaTeX
+sectiontab :: Monad m => Title m -> Title m -> LaTeX m
 sectiontab t1 = comm4 "section" [t1]
 
-subsection :: Title -> LaTeX
+subsection :: Monad m => Title m -> LaTeX m
 subsection = comm1 "subsection"
 
-subsection_ :: Title -> LaTeX
+subsection_ :: Monad m => Title m -> LaTeX m
 subsection_ = comm1 "subsection*"
 
-subsectiontab :: Title -> Title -> LaTeX
+subsectiontab :: Monad m => Title m -> Title m -> LaTeX m
 subsectiontab t1 = comm4 "subsection" [t1]
 
-subsubsection :: Title -> LaTeX
+subsubsection :: Monad m => Title m -> LaTeX m
 subsubsection = comm1 "subsubsection"
 
-subsubsection_ :: Title -> LaTeX
+subsubsection_ :: Monad m => Title m -> LaTeX m
 subsubsection_ = comm1 "subsubsection*"
 
-subsubsectiontab :: Title -> Title -> LaTeX
+subsubsectiontab :: Monad m => Title m -> Title m -> LaTeX m
 subsubsectiontab t1 = comm4 "subsubsection" [t1]
 
-paragraph :: Title -> LaTeX
+paragraph :: Monad m => Title m -> LaTeX m
 paragraph = comm1 "paragraph"
 
-paragraph_ :: Title -> LaTeX
+paragraph_ :: Monad m => Title m -> LaTeX m
 paragraph_ = comm1 "paragraph*"
 
-paragraphtab :: Title -> Title -> LaTeX
+paragraphtab :: Monad m => Title m -> Title m -> LaTeX m
 paragraphtab t1 = comm4 "paragraph" [t1]
 
-subparagraph :: Title -> LaTeX
+subparagraph :: Monad m => Title m -> LaTeX m
 subparagraph = comm1 "subparagraph"
 
-subparagraph_ :: Title -> LaTeX
+subparagraph_ :: Monad m => Title m -> LaTeX m
 subparagraph_ = comm1 "subparagraph*"
 
-subparagraphtab :: Title -> Title -> LaTeX
+subparagraphtab :: Monad m => Title m -> Title m -> LaTeX m
 subparagraphtab t1 = comm4 "subparagraph" [t1]
 
-part :: Title -> LaTeX
+part :: Monad m => Title m -> LaTeX m
 part = comm1 "part"
 
-part_ :: Title -> LaTeX
+part_ :: Monad m => Title m -> LaTeX m
 part_ = comm1 "part*"
 
-parttab :: Title -> Title -> LaTeX
+parttab :: Monad m => Title m -> Title m -> LaTeX m
 parttab t1 = comm4 "part" [t1]
 
 -- Sections (Report or Book)
 
-chapter :: Title -> LaTeX
+chapter :: Monad m => Title m -> LaTeX m
 chapter = comm1 "chapter"
 
-chapter_ :: Title -> LaTeX
+chapter_ :: Monad m => Title m -> LaTeX m
 chapter_ = comm1 "chapter*"
 
-chaptertab :: Title -> Title -> LaTeX
+chaptertab :: Monad m => Title m -> Title m -> LaTeX m
 chaptertab t1 = comm4 "chapter" [t1]
 
 -- Sections (Others)
 
-appendix :: LaTeX
+-- | Generate the appendix.
+appendix :: Monad m => LaTeX m
 appendix = comm0 "appendix"
 
--- | Generates the title page.
-maketitle :: LaTeX
+-- | Generate the title page.
+maketitle :: Monad m => LaTeX m
 maketitle = comm0 "maketitle"
 
--- | Generates the table of contents.
-tableofcontents :: LaTeX
+-- | Generate the table of contents.
+tableofcontents :: Monad m => LaTeX m
 tableofcontents = comm0 "tableofcontents"
 
 -- For Book Class
 
-frontmatter :: LaTeX
+frontmatter :: Monad m => LaTeX m
 frontmatter = comm0 "frontmatter"
 
-mainmatter :: LaTeX
+mainmatter :: Monad m => LaTeX m
 mainmatter = comm0 "mainmatter"
 
-backmatter :: LaTeX
+backmatter :: Monad m => LaTeX m
 backmatter = comm0 "backmatter"
 
 -- Cross References
 
-label :: Marker -> LaTeX
+label :: Monad m => Marker m -> LaTeX m
 label = comm1 "label"
 
-ref :: Marker -> LaTeX
+ref :: Monad m => Marker m -> LaTeX m
 ref = comm1 "ref"
 
-pageref :: Marker -> LaTeX
+pageref :: Monad m => Marker m -> LaTeX m
 pageref = comm1 "pageref"
 
 -- Footnotes
 
 -- | Adds a given text to the page's footnote.
-footnote :: Text -> LaTeX
+footnote :: Monad m => Text m -> LaTeX m
 footnote = comm1 "footnote"
 
 -- Emphasized
 
 -- | Underlines a text.
-underline :: Text -> LaTeX
+underline :: Monad m => Text m -> LaTeX m
 underline = comm1 "underline"
 
 -- | Emphasizes a text.
-emph :: Text -> LaTeX
+emph :: Monad m => Text m -> LaTeX m
 emph = comm1 "emph"
 
 -- Environments
 
-itemize :: LaTeX -> LaTeX
+-- | Environment for create simple lists. See 'item'.
+itemize :: Monad m => LaTeX m -> LaTeX m
 itemize = env "itemize"
 
-enumerate :: LaTeX -> LaTeX
+enumerate :: Monad m => LaTeX m -> LaTeX m
 enumerate = env "enumerate"
 
-description :: LaTeX -> LaTeX
+description :: Monad m => LaTeX m -> LaTeX m
 description = env "description"
 
-item :: [ItemOption] -> LaTeX
+-- | Create a list item. Optional argument is used to change its icon.
+--
+-- Example:
+--
+-- > item [\"-\"] \"Item content.\"
+--
+item :: Monad m => [ItemOption m] -> LaTeX m
 item = comm3 "item"
 
 -- | Left alignment.
-flushleft :: LaTeX -> LaTeX
+flushleft :: Monad m => LaTeX m -> LaTeX m
 flushleft = env "flushleft"
 
 -- | Right alignment.
-flushright :: LaTeX -> LaTeX
+flushright :: Monad m => LaTeX m -> LaTeX m
 flushright = env "flushright"
 
 -- | Center alignment.
-center :: LaTeX -> LaTeX
+center :: Monad m => LaTeX m -> LaTeX m
 center = env "center"
 
 -- | Quote from a text.
-quote :: LaTeX -> LaTeX
+quote :: Monad m => LaTeX m -> LaTeX m
 quote = env "quote"
 
 -- | Like 'quote', but indenting the first line of each paragraph.
-quotation :: LaTeX -> LaTeX
+quotation :: Monad m => LaTeX m -> LaTeX m
 quotation = env "quotation"
 
-verse :: LaTeX -> LaTeX
+verse :: Monad m => LaTeX m -> LaTeX m
 verse = env "verse"
 
 -- | Use 'abstract' to create an abstract, containing the argument's text.
-abstract :: LaTeX -> LaTeX
+abstract :: Monad m => LaTeX m -> LaTeX m
 abstract = env "abstract"
 
 -- | A text within the 'verbatim' environment has monospaced font
 -- and no commands or environments will be executed.
-verbatim :: LaTeX -> LaTeX
+verbatim :: Monad m => LaTeX m -> LaTeX m
 verbatim = env "verbatim"
 
 -- | Like 'verbatim', but it makes visible the spaces.
-verbatim_ :: LaTeX -> LaTeX
+verbatim_ :: Monad m => LaTeX m -> LaTeX m
 verbatim_ = env "verbatim*"
 
-sep :: LaTeX -> LaTeX
+sep :: Monad m => LaTeX m -> LaTeX m
 sep = between "|" "|"
 
 -- | An inline version of 'verbatim'.
-verb :: LaTeX -> LaTeX
+verb :: Monad m => LaTeX m -> LaTeX m
 verb = (comm0_ "verb" >>) . sep
 
 -- | An inline version of 'verbatim_'.
-verb_ :: LaTeX -> LaTeX
+verb_ :: Monad m => LaTeX m -> LaTeX m
 verb_ = (comm0_ "verb*" >>) . sep
 
 -- Floating Bodies
 
-figure :: [PlacementSpecifier] -> LaTeX -> LaTeX
+figure :: Monad m => [PlacementSpecifier m] -> LaTeX m -> LaTeX m
 figure = env2 "figure"
 
-table :: [PlacementSpecifier] -> LaTeX -> LaTeX
+table :: Monad m => [PlacementSpecifier m] -> LaTeX m -> LaTeX m
 table = env2 "table"
 
-caption :: Text -> LaTeX
+caption :: Monad m => Text m -> LaTeX m
 caption = comm1 "caption"
 
-listoffigures :: LaTeX
+listoffigures :: Monad m => LaTeX m
 listoffigures = comm0 "listoffigures"
 
-listoftables :: LaTeX
+listoftables :: Monad m => LaTeX m
 listoftables = comm0 "listoftables"
 
-clearpage :: LaTeX
+clearpage :: Monad m => LaTeX m
 clearpage = comm0 "clearpage"
 
-cleardoublepage :: LaTeX
+cleardoublepage :: Monad m => LaTeX m
 cleardoublepage = "cleardoblepage"
 
 -- Customizing
 
-newcommand :: Name -> [Int] -> LaTeX -> LaTeX
+newcommand :: Monad m => Name m -> [Int] -> LaTeX m -> LaTeX m
 newcommand n i = comm6 "newcommand" n (map lxany i)
 
-renewcommand :: Name -> [Int] -> LaTeX -> LaTeX
+renewcommand :: Monad m => Name m -> [Int] -> LaTeX m -> LaTeX m
 renewcommand n i = comm6 "renewcommand" n (map lxany i)
 
-providecommand :: Name -> [Int] -> LaTeX -> LaTeX
+providecommand :: Monad m => Name m -> [Int] -> LaTeX m -> LaTeX m
 providecommand n i = comm6 "providecommand" n (map lxany i)
 
-newenvironment :: Name -> [Int] -> LaTeX -> LaTeX -> LaTeX
+newenvironment :: Monad m => Name m -> [Int] -> LaTeX m -> LaTeX m -> LaTeX m
 newenvironment n i = comm7 "newenvironment" n (map lxany i)
 
-ignorespaces :: LaTeX
+ignorespaces :: Monad m => LaTeX m
 ignorespaces = comm0 "ignorespaces"
 
-ignorespacesafterend :: LaTeX
+ignorespacesafterend :: Monad m => LaTeX m
 ignorespacesafterend = comm0 "ignorespacesafterend"
 
-providesPackage :: Name -> LaTeX
+providesPackage :: Monad m => Name m -> LaTeX m
 providesPackage = comm1 "ProvidesPackage"
 
 -- Fonts
@@ -490,43 +505,43 @@ -- #Fonts#
 
 -- | Roman font
-textrm :: LaTeX -> LaTeX
+textrm :: Monad m => LaTeX m -> LaTeX m
 textrm = comm1 "textrm"
 
 -- | Monospaced font
-texttt :: LaTeX -> LaTeX
+texttt :: Monad m => LaTeX m -> LaTeX m
 texttt = comm1 "texttt"
 
 -- | Medium font
-textmd :: LaTeX -> LaTeX
+textmd :: Monad m => LaTeX m -> LaTeX m
 textmd = comm1 "textmd"
 
 -- | Upright font
-textup :: LaTeX -> LaTeX
+textup :: Monad m => LaTeX m -> LaTeX m
 textup = comm1 "textup"
 
 -- | Slanted font
-textsl :: LaTeX -> LaTeX
+textsl :: Monad m => LaTeX m -> LaTeX m
 textsl = comm1 "textsl"
 
 -- | Sans Serif font
-textsf :: LaTeX -> LaTeX
+textsf :: Monad m => LaTeX m -> LaTeX m
 textsf = comm1 "textsf"
 
 -- | Bold font
-textbf :: LaTeX -> LaTeX
+textbf :: Monad m => LaTeX m -> LaTeX m
 textbf = comm1 "textbf"
 
 -- | Italic font
-textit :: LaTeX -> LaTeX
+textit :: Monad m => LaTeX m -> LaTeX m
 textit = comm1 "textit"
 
 -- | Small Caps font
-textsc :: LaTeX -> LaTeX
+textsc :: Monad m => LaTeX m -> LaTeX m
 textsc = comm1 "textsc"
 
 -- | Default font
-textnormal :: LaTeX -> LaTeX
+textnormal :: Monad m => LaTeX m -> LaTeX m
 textnormal = comm1 "textnormal"
 
 -- Font Sizes
@@ -534,119 +549,119 @@ -- $fontsize
 -- Differents fonts size are sorted from lowest to highest.
 
-tiny :: LaTeX -> LaTeX
+tiny :: Monad m => LaTeX m -> LaTeX m
 tiny = comm8 "tiny"
 
-scriptsize :: LaTeX -> LaTeX
+scriptsize :: Monad m => LaTeX m -> LaTeX m
 scriptsize = comm8 "scriptsize"
 
-footnotesize :: LaTeX -> LaTeX
+footnotesize :: Monad m => LaTeX m -> LaTeX m
 footnotesize = comm8 "footnotesize"
 
-small :: LaTeX -> LaTeX
+small :: Monad m => LaTeX m -> LaTeX m
 small = comm8 "small"
 
-normalsize :: LaTeX -> LaTeX
+normalsize :: Monad m => LaTeX m -> LaTeX m
 normalsize = comm8 "normalsize"
 
-large :: LaTeX -> LaTeX
+large :: Monad m => LaTeX m -> LaTeX m
 large = comm8 "large"
 
-large2 :: LaTeX -> LaTeX
+large2 :: Monad m => LaTeX m -> LaTeX m
 large2 = comm8 "Large"
 
-large3 :: LaTeX -> LaTeX
+large3 :: Monad m => LaTeX m -> LaTeX m
 large3 = comm8 "LARGE"
 
-huge :: LaTeX -> LaTeX
+huge :: Monad m => LaTeX m -> LaTeX m
 huge = comm8 "huge"
 
-huge2 :: LaTeX -> LaTeX
+huge2 :: Monad m => LaTeX m -> LaTeX m
 huge2 = comm8 "Huge"
 
 --
 
-par :: LaTeX
+par :: Monad m => LaTeX m
 par = comm0 "par"
 
 -- Spacing
 
-linespread :: Float -> LaTeX
+linespread :: Monad m => Float -> LaTeX m
 linespread = comm1 "linespread" . lxany
 
 -- | Creates an horizontal spaces with length specified by the argument.
 -- See "Text.LaTeX.Arguments#Measures" to create a correct argument.
-hspace :: LaTeX -> LaTeX
+hspace :: Monad m => LaTeX m -> LaTeX m
 hspace = comm1 "hspace"
 
 -- | Same as 'hspace', but it ignores start or end of lines.
-hspace_ :: LaTeX -> LaTeX
+hspace_ :: Monad m => LaTeX m -> LaTeX m
 hspace_ = comm1 "hspace*"
 
 -- | Vertical version of 'hspace'. Useful to separate two paragraphs.
-vspace :: LaTeX -> LaTeX
+vspace :: Monad m => LaTeX m -> LaTeX m
 vspace = comm1 "vspace"
 
 -- | Same as 'vspace', but it ignores start or end of pages.
-vspace_ :: LaTeX -> LaTeX
+vspace_ :: Monad m => LaTeX m -> LaTeX m
 vspace_ = comm1 "vspace*"
 
-stretch :: Int -> LaTeX
+stretch :: Monad m => Int -> LaTeX m
 stretch = comm1 "stretch" . lxany
 
 -- | Like 'vspace', but for lines of the same paragraph.
--- 'bigskip' and 'smallskip' use 'skip' with predefined arguments.
-skip :: LaTeX -> LaTeX
+-- 'bigskip' and 'smallskip' use 'skip' with a predefined argument.
+skip :: Monad m => LaTeX m -> LaTeX m
 skip = mappend lnbk . brackets
 
-bigskip :: LaTeX
+bigskip :: Monad m => LaTeX m
 bigskip = comm0 "bigskip"
 
-smallskip :: LaTeX
+smallskip :: Monad m => LaTeX m
 smallskip = comm0 "smallskip"
 
 -- Boxes
 
-mbox :: LaTeX -> LaTeX
+mbox :: Monad m => LaTeX m -> LaTeX m
 mbox = comm1 "mbox"
 
-mbox_ :: LaTeX
+mbox_ :: Monad m => LaTeX m
 mbox_ = mbox ""
 
-fbox :: LaTeX -> LaTeX
+fbox :: Monad m => LaTeX m -> LaTeX m
 fbox = comm1 "fbox"
 
-parbox :: [Char] -> Width -> LaTeX -> LaTeX
+parbox :: Monad m => [Char] -> Width m -> LaTeX m -> LaTeX m
 parbox c = comm9 "parbox" (if null c then [] else [fromString c])
 
-minipage :: [Char] -> Width -> LaTeX -> LaTeX
+minipage :: Monad m => [Char] -> Width m -> LaTeX m -> LaTeX m
 minipage c = env3 "minipage" (if null c then [] else [fromString c])
 
-makebox :: [Width] -> [Char] -> LaTeX -> LaTeX
+makebox :: Monad m => [Width m] -> [Char] -> LaTeX m -> LaTeX m
 makebox w c = comm10 "makebox" w (if null c then [] else [fromString c])
 
-framebox :: [Width] -> [Char] -> LaTeX -> LaTeX
+framebox :: Monad m => [Width m] -> [Char] -> LaTeX m -> LaTeX m
 framebox w c = comm10 "framebox" w (if null c then [] else [fromString c])
 
-raisebox :: Lift -> [Extend] -> [Extend] -> LaTeX -> LaTeX
+raisebox :: Monad m => Lift m -> [Extend m] -> [Extend m] -> LaTeX m -> LaTeX m
 raisebox = comm11 "raisebox"
 
 -- Others
 
-protect :: LaTeX
+protect :: Monad m => LaTeX m
 protect = comm0_ "protect"
 
-phantom :: LaTeX -> LaTeX
+phantom :: Monad m => LaTeX m -> LaTeX m
 phantom = comm1 "phantom"
 
--- Tabular
+-- Tabular m
 
-type Tabular = LaTeX
+type Tabular m = LaTeX m
 
-cjustified :: Width -> LaTeX
+cjustified :: Monad m => Width m -> LaTeX m
 cjustified = ("p">>) . braces
 
-csep :: LaTeX -> LaTeX
+csep :: Monad m => LaTeX m -> LaTeX m
 csep = ("@">>) . braces
 
 -- | The 'tabular' environment can be used to creates tables.
@@ -670,34 +685,34 @@ -- 'cline' inserts a partial horizontal line,
 -- ('&') separates columns and
 -- ('//') separates rows.
-tabular :: [LaTeX] -> LaTeX -> LaTeX -> Tabular
+tabular :: Monad m => [LaTeX m] -> LaTeX m -> LaTeX m -> Tabular m
 tabular = env3 "tabular"
 
-(&) :: LaTeX -> LaTeX -> LaTeX
+(&) :: Monad m => LaTeX m -> LaTeX m -> LaTeX m
 (&) = mid " & "
 
-(//) :: LaTeX -> LaTeX -> LaTeX
+(//) :: Monad m => LaTeX m -> LaTeX m -> LaTeX m
 (//) = mid $ lnbk >> newline
 
 -- | Insert an horizontal line in a 'tabular'.
-hline :: LaTeX
+hline :: Monad m => LaTeX m
 hline = comm0 "hline"
 
 -- | Insert a partial horizontal line in a 'tabular'.
-cline :: Int -- ^ Start column
+cline :: Monad m => Int -- ^ Start column
       -> Int -- ^ End column
-      -> LaTeX
+      -> LaTeX m
 cline n m = comm1 "cline" $ lxany n - lxany m
 
-multicolumn :: Int -> LaTeX -> LaTeX -> LaTeX
+multicolumn :: Monad m => Int -> LaTeX m -> LaTeX m -> LaTeX m
 multicolumn n = comm12 "multicolumn" $ lxany n
 
-type LxMatrix = [[LaTeX]]
+type LxMatrix m = [[LaTeX m]]
 
 -- | A matrix version of 'tabular'.
--- First and second arguments are equal.
+-- First and second arguments have the same meaning.
 -- The generated 'tabular' has the same rows and columns as the matrix.
-matrixTab :: [LaTeX] -> LaTeX -> LxMatrix -> Tabular
+matrixTab :: Monad m => [LaTeX m] -> LaTeX m -> LxMatrix m -> Tabular m
 matrixTab p spec m = let f = tabular p spec . foldr1 (//) . map (foldr1 (&))
                      in  if sum (map length m) == 0 then "" else f m
 
Text/LaTeX/Define.hs view
@@ -1,4 +1,10 @@ 
+{-# LANGUAGE OverloadedStrings #-}
+
+-- | This module allows you to add commands and environments of LaTeX wich are not defined in HaTeX.
+-- Usually, you don't need to use this functions.
+--
+-- If a desired command doesn't appear in HaTeX and you need it, use these functions and report the missing function to the maintainer.
 module Text.LaTeX.Define (
     -- * Defining Commands
     comm0_
@@ -29,80 +35,81 @@ import Text.LaTeX.Monad
 import Text.LaTeX.Result
 
-listOpts :: [LaTeX] -> LaTeX
+listOpts :: Monad m => [LaTeX m] -> LaTeX m
 listOpts [] = ""
 listOpts xs = brackets . sequence_ . intersperse comma $ xs
 
 --
 
-comm0_ :: LaTeX -> LaTeX
+comm0_ :: Monad m => LaTeX m -> LaTeX m
 comm0_ = mappend "\\"
 
-comm0 :: LaTeX -> LaTeX
+comm0 :: Monad m => LaTeX m -> LaTeX m
 comm0 n = do comm0_ n
              braces ""
 
-comm1 :: LaTeX -> LaTeX -> LaTeX
+
+comm1 :: Monad m => LaTeX m -> LaTeX m -> LaTeX m
 comm1 n x = do comm0_ n
                braces x
 
-comm2 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX
+comm2 :: Monad m => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m
 comm2 n x opts = do comm1 n x
                     listOpts opts
 
-comm3 :: LaTeX -> [LaTeX] -> LaTeX
+comm3 :: Monad m => LaTeX m -> [LaTeX m] -> LaTeX m
 comm3 n opts = do comm0_ n
                   listOpts opts
 
-comm4 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+comm4 :: Monad m => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
 comm4 n opts x = do comm3 n opts
                     braces x
 
-comm5 :: LaTeX -> LaTeX -> LaTeX -> LaTeX
+comm5 :: Monad m => LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m
 comm5 n x y = do comm1 n x
                  braces y
 
-comm6 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+comm6 :: Monad m => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
 comm6 n x opts y = do comm2 n x opts
                       braces y
 
-comm7 :: LaTeX -> LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+comm7 :: Monad m => LaTeX m -> LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
 comm7 n x opts y z = do comm6 n x opts y
                         braces z
 
-comm8 :: LaTeX -> LaTeX -> LaTeX
+comm8 :: Monad m => LaTeX m -> LaTeX m -> LaTeX m
 comm8 n x = braces $ do comm0 n
                         x
 
-comm9 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+comm9 :: Monad m => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
 comm9 n opts x y = do comm4 n opts x
                       braces y
 
-comm10 :: LaTeX -> [LaTeX] -> [LaTeX] -> LaTeX -> LaTeX
+comm10 :: Monad m => LaTeX m -> [LaTeX m] -> [LaTeX m] -> LaTeX m -> LaTeX m
 comm10 n opts1 opts2 x = do comm3 n opts1
                             listOpts opts2
                             braces x
 
-comm11 :: LaTeX -> LaTeX -> [LaTeX] -> [LaTeX] -> LaTeX -> LaTeX
+comm11 :: Monad m => LaTeX m -> LaTeX m -> [LaTeX m] -> [LaTeX m] -> LaTeX m -> LaTeX m
 comm11 n x opts1 opts2 y = do comm2 n x opts1
                               listOpts opts2
                               braces y
 
-comm12 :: LaTeX -> LaTeX -> LaTeX -> LaTeX -> LaTeX
+comm12 :: Monad m => LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m -> LaTeX m
 comm12 n x y z = do comm5 n x y
                     braces z
 
-env :: LaTeX -> LaTeX -> LaTeX 
+env :: Monad m => LaTeX m -> LaTeX m -> LaTeX m 
 env t x = do comm1 "begin" t
              x
              comm1 "end" t
 
-env2 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX
+env2 :: Monad m => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m
 env2 t opts x = do comm2 "begin" t opts
                    x
                    comm1 "end" t
 
-env3 :: LaTeX -> [LaTeX] -> LaTeX -> LaTeX -> LaTeX
+env3 :: Monad m => LaTeX m -> [LaTeX m] -> LaTeX m -> LaTeX m -> LaTeX m
 env3 t opts x y = do comm6 "begin" t opts x
                      y
                      comm1 "end" t
− Text/LaTeX/IO.hs
@@ -1,48 +0,0 @@-
--- | Some 'IO' computations on 'LaTeX' monad.
--- These functions are similar to those you can find in "System.IO".
-module Text.LaTeX.IO where
-
-import System.IO
-
-import Text.LaTeX.Monad
-import Text.LaTeX.Result
-
-readFileLx :: FilePath -> LaTeXM LaTeX
-readFileLx = (>>= return . lx . toResult) . iolx . readFile
-
-writeFileLx :: FilePath -> LaTeXM a -> LaTeX
-writeFileLx fp l = iolx $ do x <- nlx l
-                             writeFile fp $ fromResult x
-
-appendFileLx :: FilePath -> LaTeXM a -> LaTeX
-appendFileLx fp l = iolx $ do x <- nlx l
-                              appendFile fp $ fromResult x
-
-hGetLineLx :: Handle -> LaTeXM LaTeX
-hGetLineLx = (>>= return . lx . toResult) . iolx . hGetLine
-
-hGetContentsLx :: Handle -> LaTeXM LaTeX
-hGetContentsLx = (>>= return . lx . toResult) . iolx . hGetContents
-
-hPutStrLx :: Handle -> LaTeXM a -> LaTeX
-hPutStrLx h l = iolx $ do x <- nlx l
-                          hPutStr h $ fromResult x
-
-hPutStrLnLx :: Handle -> LaTeXM a -> LaTeX
-hPutStrLnLx h l = iolx $ do x <- nlx l
-                            hPutStrLn h $ fromResult x
-
-putStrLx :: LaTeXM a -> LaTeX
-putStrLx x = iolx $ nlx x >>= putStr . fromResult
-
-putStrLnLx :: LaTeXM a -> LaTeX
-putStrLnLx x = iolx $ nlx x >>= putStrLn . fromResult
-
-getLineLx :: LaTeXM LaTeX
-getLineLx = (>>= return . lx . toResult) $ iolx $ getLine
-
-getContentsLx :: LaTeXM LaTeX
-getContentsLx = (>>= return . lx . toResult) $ iolx $ getContents
-
-
Text/LaTeX/Macro.hs view
@@ -1,11 +1,16 @@ 
 -- | This module defines some macros to speed up writing documents.
+--
+-- Note: Have you an idea for a macro? Send your suggestions!
 module Text.LaTeX.Macro (
        -- * Simple macros
        m_simple
      , m_wpkgs
        -- * Article macros
      , m_article
+     , m_articlep
+       -- * Math macros
+     , m_math
        ) where
 
 import Text.LaTeX.Monad
@@ -15,12 +20,13 @@ 
 -- Simple macros
 
-m_simple :: [ClassOption] -- ^ Class options
-         ->  Class        -- ^ Class
-         ->  Name         -- ^ Author's name
-         ->  Title        -- ^ Document's title
-         ->  LaTeX        -- ^ Document's content
-         ->  LaTeX        -- ^ Output
+m_simple :: Monad m =>
+             [ClassOption m] -- ^ Class options
+         ->  Class m         -- ^ Class
+         ->  Name m          -- ^ Author's name
+         ->  Title m         -- ^ Document's title
+         ->  LaTeX m         -- ^ Document's content
+         ->  LaTeX m         -- ^ Output
 m_simple copts c a t cnt =
    do documentclass copts c
       author a
@@ -28,14 +34,15 @@       document cnt
 
 m_wpkgs
-  :: [ClassOption]        -- ^ Class options
-     -> Class             -- ^ Class
-     -> Name              -- ^ Author's name
-     -> Title             -- ^ Document's title
-     -> [([PackageOption] 
-        ,  Package)]      -- ^ A list of imported packages
-     -> LaTeX             -- ^ Document's content
-     -> LaTeX             -- ^ Output
+  :: Monad m =>
+     [ClassOption m]        -- ^ Class options
+     -> Class m             -- ^ Class
+     -> Name m              -- ^ Author's name
+     -> Title m             -- ^ Document's title
+     -> [([PackageOption m] 
+        ,  Package m)]      -- ^ A list of imported packages
+     -> LaTeX m             -- ^ Document's content
+     -> LaTeX m             -- ^ Output
 m_wpkgs copts c a t pkgs cnt =
    do documentclass copts c
       mapM_ (uncurry usepackage) pkgs
@@ -55,16 +62,43 @@ --
 -- * A4 paper.
 m_article
-  :: Name      -- ^ Author's name
-     -> Title  -- ^ Article's title
-     -> LaTeX  -- ^ Article's content
-     -> LaTeX  -- ^ Output
+  :: Monad m =>
+     Name m      -- ^ Author's name
+     -> Title m  -- ^ Article's title
+     -> LaTeX m  -- ^ Article's content
+     -> LaTeX m  -- ^ Output
 m_article a t cnt =
    do documentclass [pt 11, titlepage, a4paper] article
       author a
       title t
       document $ do maketitle
                     cnt
+
+-- | Like 'm_article', but it lets you import packages.
+m_articlep
+  :: Monad m =>
+     Name m                              -- ^ Author's name
+     -> Title m                          -- ^ Article's title
+     -> [([PackageOption m], Package m)] -- ^ A list of imported packages
+     -> LaTeX m                          -- ^ Document's content
+     -> LaTeX m                          -- ^ Output
+m_articlep a t pkgs cnt =
+   do documentclass [pt 11, titlepage, a4paper] article
+      mapM_ (uncurry usepackage) pkgs
+      author a ; title t
+      document $ do maketitle
+                    cnt
+
+-- Math macros
+
+-- | Macro for math articles. Like 'm_article', but importing 'amsmath' package.
+m_math
+  :: Monad m =>
+     Name m        -- ^ Author's name
+     -> Title m    -- ^ Article's title
+     -> LaTeX m    -- ^ Document's content
+        -> LaTeX m -- ^ Output
+m_math a t cnt = m_articlep a t [([],amsmath)] cnt
 
 
 
Text/LaTeX/Monad.hs view
@@ -1,7 +1,9 @@ 
+{-# LANGUAGE OverloadedStrings,TypeSynonymInstances #-}
+
 module Text.LaTeX.Monad (
     -- * @LaTeX@ Monad
-    LaTeXM
+    LaTeXT
   , LaTeX
     -- * Basic functions over @LaTeX@ Monad
   , lx
@@ -9,7 +11,7 @@   , lxw
   , lxanyw
   , nlx
-  , iolx
+  , mlx
   , reslx
     -- * Generalizing
   , genlx , ungenlx
@@ -25,17 +27,13 @@ 
 ----------------------------
 
--- | 'LaTeXM' is the monad that represents LaTeX code.
+-- | 'LaTeXT' is the monadic transformer that represents LaTeX code.
 -- Bind operator plays as concatenator.
 --
--- Instances of 'LaTeXM' @a@:
+-- Instances of 'LaTeXT':
 --
 -- * 'IsString'
 --
--- * 'Show' (unsafe)
---
--- * 'Eq' (unsafe)
---
 -- * 'Num'
 --
 -- * 'Fractional'
@@ -43,62 +41,62 @@ -- * 'Floating'
 --
 -- * 'Monoid'
-type LaTeXM a = WriterT Result IO a
+type LaTeXT m a = WriterT Result m a
 
-type LaTeX = LaTeXM ()
+type LaTeX m = LaTeXT m ()
 
 ----------------------------
 -- Running the Monad
 
--- | Run a 'LaTeXM' computation, returning his result.
-nlx :: LaTeXM a -> IO Result
+-- | Run a 'LaTeXT' computation.
+nlx :: Monad m => LaTeXT m a -> m Result
 nlx = execWriterT
 
 ----------------------------
 
 -- | Write a result.
-lx :: Result -> LaTeX
+lx :: Monad m => Result -> LaTeX m
 lx = tell
 
 -- | Write anything of 'Show' class.
-lxany :: Show a => a -> LaTeX
+lxany :: (Monad m , Show a) => a -> LaTeX m
 lxany = ungenlx . lxanyw
 
 -- | Like 'lx', but returns an undefined value.
-lxw :: Result -> LaTeXM a
+lxw :: Monad m => Result -> LaTeXT m a
 lxw = genlx . lx
 
 -- | Like 'lxany', but returns an undefined value.
-lxanyw :: Show b => b -> LaTeXM a
+lxanyw :: (Monad m , Show b) => b -> LaTeXT m a
 lxanyw = fromShow
 
--- | Performs an 'IO' computation, returning his value in the 'LaTeXM' monad.
-iolx :: IO a -> LaTeXM a
-iolx = liftIO
+-- | Performs a monadic computation, returning his value in the 'LaTeXT' monad.
+mlx :: Monad m => m a -> LaTeXT m a
+mlx = lift
 
--- | Transform a 'Result' modifier in a 'LaTeXM' modifier.
-reslx :: (Result -> Result) -> (LaTeXM a -> LaTeXM a)
+-- | Transform a 'Result' modifier in a 'LaTeXT' modifier.
+reslx :: Monad m => (Result -> Result) -> (LaTeXT m a -> LaTeXT m a)
 reslx = censor
 
-instance IsString (LaTeXM a) where
+instance Monad m => IsString (LaTeXT m a) where
  fromString = lxw . toResult
 
-instance Show (LaTeXM a) where
- show = fromResult . unsafePerformIO . nlx
+instance Monad m => Show (LaTeXT m a) where
+ show _ = ""
 
-instance Eq (LaTeXM a) where
- x == y = show x == show y
+instance Monad m => Eq (LaTeXT m a) where
+ _ == _ = error "(==): LaTeXT values can't be compared."
 
-instance Monoid (LaTeXM a) where
+instance Monad m => Monoid (LaTeXT m a) where
  mempty = ""
  mappend = (>>)
 
 -- Generalizing
 
-genlx :: LaTeX -> LaTeXM a
+genlx :: Monad m => LaTeX m -> LaTeXT m a
 genlx = (>> return undefined)
 
-ungenlx :: LaTeXM a -> LaTeX
+ungenlx :: Monad m => LaTeXT m a -> LaTeX m
 ungenlx = (>> return ())
 
 
Text/LaTeX/Packages.hs view
@@ -1,17 +1,19 @@ 
+{-# LANGUAGE OverloadedStrings,TypeSynonymInstances,NoMonomorphismRestriction #-} 
+
 module Text.LaTeX.Packages
-    ( -- * Packages
+    ( -- * Package ms
       Package
     , PackageOption
-      -- * List of packages
+      -- * List of Package ms
       -- ** @doc@
     , doc
       -- ** @exscale@
     , exscale
       -- ** @ifthen@
     , ifthen
-      -- ** @latexsym@
-    , latexsym
+      -- ** @msym@
+    , msym
       -- ** @makeidx@
     , makeidx
       -- ** @fontenc@
@@ -138,166 +140,168 @@ import Text.LaTeX.Arguments
 import Text.LaTeX.Result
 
-type Package = LaTeX
+type Package m = LaTeX m
 
-type PackageOption = LaTeX
+type PackageOption m = LaTeX m
 
-doc :: Package
+doc :: Monad m => Package m
 doc = "doc"
 
-exscale :: Package
+exscale :: Monad m => Package m
 exscale = "exscale"
 
-ifthen :: Package
+ifthen :: Monad m => Package m
 ifthen = "ifthen"
 
-latexsym :: Package
-latexsym = "latexsym"
+msym :: Monad m => Package m
+msym = "LaTeX msym"
 
-makeidx :: Package
+makeidx :: Monad m => Package m
 makeidx = "makeidx"
 
-fontenc :: Package
+fontenc :: Monad m => Package m
 fontenc = "fontenc"
 
-oT1 :: Encoding
+oT1 :: Monad m => Encoding m
 oT1 = "0T1"
 
-t1 :: Encoding
+t1 :: Monad m => Encoding m
 t1 = "T1"
 
-t2A :: Encoding
+t2A :: Monad m => Encoding m
 t2A = "T2A"
 
-t2B :: Encoding
+t2B :: Monad m => Encoding m
 t2B = "T2B"
 
-t2C :: Encoding
+t2C :: Monad m => Encoding m
 t2C = "T2C"
 
-x2 :: Encoding
+x2 :: Monad m => Encoding m
 x2 = "X2"
 
-lgr :: Encoding
+lgr :: Monad m => Encoding m
 lgr = "LGR"
 
-syntonly :: Package
+syntonly :: Monad m => Package m
 syntonly = "syntonly"
 
-syntaxonly :: LaTeX
+syntaxonly :: Monad m => LaTeX m
 syntaxonly = comm0 "syntaxonly"
 
-inputenc :: Package
+inputenc :: Monad m => Package m
 inputenc = "inputenc"
 
-applemac :: Encoding
+applemac :: Monad m => Encoding m
 applemac = "applemac"
 
-macukr :: Encoding
+macukr :: Monad m => Encoding m
 macukr = "macukr"
 
-latin1 :: Encoding
+latin1 :: Monad m => Encoding m
 latin1 = "latin1"
 
-koi8_ru :: Encoding
+koi8_ru :: Monad m => Encoding m
 koi8_ru = "koi8-ru"
 
-ansinew :: Encoding
+ansinew :: Monad m => Encoding m
 ansinew = "ansinew"
 
-cp1251 :: Encoding
+cp1251 :: Monad m => Encoding m
 cp1251 = "cp1251"
 
-cp850 :: Encoding
+cp850 :: Monad m => Encoding m
 cp850 = "cp850"
 
-cp866nav :: Encoding
+cp866nav :: Monad m => Encoding m
 cp866nav = "cp866nav"
 
-ucs :: Package
+ucs :: Monad m => Package m
 ucs = "ucs"
 
-utf8x :: Encoding
+utf8x :: Monad m => Encoding m
 utf8x = "utf8x"
 
-textcomp :: Package
+textcomp :: Monad m => Package m
 textcomp = "textcomp"
 
-textdegree :: LaTeX
+textdegree :: Monad m => LaTeX m
 textdegree = comm0 "textdegree"
 
-textcelsius :: LaTeX
+textcelsius :: Monad m => LaTeX m
 textcelsius = comm0 "textcelsius"
 
-texteuro :: LaTeX
+texteuro :: Monad m => LaTeX m
 texteuro = comm0 "texteuro"
 
-eurosym :: Package
+eurosym :: Monad m => Package m
 eurosym = "eurosym"
 
-euro :: LaTeX
+euro :: Monad m => LaTeX m
 euro = comm0 "euro"
 
-babel :: Package
+babel :: Monad m => Package m
 babel = "babel"
 
-selectlanguage :: Language -> LaTeX
+selectlanguage :: Monad m => Language m -> LaTeX m
 selectlanguage = comm1 "selectlanguage"
 
-hyperref :: Package
+hyperref :: Monad m => Package m
 hyperref = "hyperref"
 
-pdftex :: PackageOption
+pdftex :: Monad m => PackageOption m
 pdftex = "pdftex"
 
-href :: URL -> Text -> LaTeX
+href :: Monad m => URL m -> Text m -> LaTeX m
 href = comm5 "href"
 
-colorpkg :: Package
+colorpkg :: Monad m => Package m
 colorpkg = "color"
 
-monochrome :: PackageOption
+monochrome :: Monad m => PackageOption m
 monochrome = "monochrome"
 
-dvipsnames :: PackageOption
+dvipsnames :: Monad m => PackageOption m
 dvipsnames = "dvipsnames"
 
-nodvipsnames :: PackageOption
+nodvipsnames :: Monad m => PackageOption m
 nodvipsnames = "nodvipsnames"
 
-usenames :: PackageOption
+usenames :: Monad m => PackageOption m
 usenames = "usenames"
 
-rgb :: Float -> Float -> Float -> Color
+-- | 'Color' from RGB components.
+rgb :: Monad m => Float -> Float -> Float -> Color m
 rgb r g b = do "[rgb]"
                braces . lx . mconcat . intersperse (toResult ",") $ map fromShow [r,g,b]
 
-pagecolor :: Color -> LaTeX
+-- | Set page color. 'pagecolor' in header defines the default page color of the document.
+pagecolor :: Monad m => Color m -> LaTeX m
 pagecolor = (comm0_ "pagecolor" >>)
 
-color :: Color -> LaTeX
+-- | Set font color from current position. 'color' in header defines the default font color of the document.
+color :: Monad m => Color m -> LaTeX m
 color = (comm0_ "color" >>)
 
-normalcolor :: LaTeX
+-- | Restore font color from current position.
+normalcolor :: Monad m => LaTeX m
 normalcolor = comm0 "normalcolor"
 
 ----------------------------------
----------- AMS-LaTeX -------------
+---------- AMS-LaTeX m -------------
 
--- LaTeXM numeric instances.
+-- LaTeXT numeric instances.
 
-inOp :: LaTeXM a -> (LaTeXM a -> LaTeXM a -> LaTeXM a)
+inOp :: Monad m => LaTeXT m a -> (LaTeXT m a -> LaTeXT m a -> LaTeXT m a)
 inOp op x y = do x ; op ; y
 
-inOp_ :: LaTeXM a -> (MathTerm -> MathTerm -> MathTerm)
-inOp_ op x y = do x ; op ; y
-
-inOpCom = inOp_ . comm0
+inOpCom :: Monad m => LaTeX m -> (MathTerm m -> MathTerm m -> MathTerm m)
+inOpCom = inOp . comm0
 
-genOp :: (LaTeX -> LaTeX -> LaTeX) -> (LaTeXM a -> LaTeXM a -> LaTeXM a)
+genOp :: Monad m => (LaTeX m -> LaTeX m -> LaTeX m) -> (LaTeXT m a -> LaTeXT m a -> LaTeXT m a)
 genOp op x y = genlx $ op (ungenlx x) (ungenlx y)
 
-(==:) = inOp_ "="
+(==:) = inOp "="
 (/=:) = inOpCom "neq"
 (<=:) = inOpCom "leq"
 (>=:) = inOpCom "geq"
@@ -321,21 +325,21 @@ 
 (<*>) = inOpCom "star"
 
-instance Num (LaTeXM a) where
+instance (Monad m) => Num (LaTeXT m a) where
  (+) = inOp "+"
  (-) = inOp "-"
  (*) = (>>)
  negate = (comm0 "not" >>)
  fromInteger = lxanyw
 
-(*:) :: MathTerm -> MathTerm -> MathTerm
+(*:) :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 (*:) = inOp cdot
 
-instance Fractional (LaTeXM a) where
+instance (Monad m) => Fractional (LaTeXT m a) where
  (/) = genOp $ comm5 "frac"
  fromRational = lxanyw . (fromRational :: Rational -> Float)
 
-instance Floating (LaTeXM a) where
+instance (Monad m) => Floating (LaTeXT m a) where
  pi = genlx $ comm0 "pi"
  exp = (comm0 "exp" >>)
  log = (comm0 "log" >>)
@@ -353,69 +357,75 @@ 
 -- AMS-Math
 
-type MathTerm = LaTeX
+type MathTerm m = LaTeX m
 
-amsmath :: Package
+-- | AMS-Math package. It allows you to write mathematical expressions.
+amsmath :: Monad m => Package m
 amsmath = "amsmath"
 
-math :: MathTerm -> LaTeX
+-- | Write a mathematical expression inline.
+math :: Monad m => MathTerm m -> LaTeX m
 math = between "$" "$"
 
-equation :: MathTerm -> LaTeX
+-- | Mathematical expressions environment.
+equation :: Monad m => MathTerm m -> LaTeX m
 equation = env "equation"
 
-equation_ :: MathTerm -> LaTeX
+-- | Like 'equation', but expressions are not numbered.
+equation_ :: Monad m => MathTerm m -> LaTeX m
 equation_ = env "equation*"
 
-smash :: LaTeX -> LaTeX
+smash :: Monad m => LaTeX m -> LaTeX m
 smash = comm1 "smash"
 
-text :: LaTeX -> LaTeX
+text :: Monad m => LaTeX m -> LaTeX m
 text = comm1 "text"
 
-(^:) :: MathTerm -> MathTerm -> MathTerm
+-- | Superscript.
+(^:) :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 x ^: y = do x ; "^" ; braces y
 
-(!:) :: MathTerm -> MathTerm -> MathTerm
+-- | Subscript.
+(!:) :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 x !: y = do x ; "_" ; braces y
 
-lim :: MathTerm
+lim :: Monad m => MathTerm m
 lim = comm0 "lim"
 
-(->>) :: MathTerm -> MathTerm -> MathTerm
+(->>) :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 x ->> y = do x ; comm0 "to" ; y
 
-sums :: MathTerm
+sums :: Monad m => MathTerm m
 sums = comm0 "sum"
 
-sums_ :: MathTerm
+sums_ :: Monad m => MathTerm m
 sums_ = comm0_ "sum"
 
-summ :: MathTerm -> MathTerm -> MathTerm
+summ :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 summ x y = sums_ !: x ^: y
 
-sqroot :: [MathTerm] -> MathTerm -> MathTerm
+sqroot :: Monad m => [MathTerm m] -> MathTerm m -> MathTerm m
 sqroot = comm4 "sqrt"
 
-cdot :: MathTerm
+cdot :: Monad m => MathTerm m
 cdot = comm0 "cdot"
 
-cdots :: MathTerm
+cdots :: Monad m => MathTerm m
 cdots = comm0 "cdots"
 
-vdots :: MathTerm
+vdots :: Monad m => MathTerm m
 vdots = comm0 "vdots"
 
-ddots :: MathTerm
+ddots :: Monad m => MathTerm m
 ddots = comm0 "ddots"
 
-overline :: MathTerm -> MathTerm
+overline :: Monad m => MathTerm m -> MathTerm m
 overline = comm1 "overline"
 
-overbrace :: MathTerm -> MathTerm
+overbrace :: Monad m => MathTerm m -> MathTerm m
 overbrace = comm1 "overbrace"
 
-underbrace :: MathTerm -> MathTerm
+underbrace :: Monad m => MathTerm m -> MathTerm m
 underbrace = comm1 "underbrace"
 
 -- Math Mode Accents
@@ -481,21 +491,23 @@ 
 -- Symbols
 
-dagger :: LaTeX
+dagger :: Monad m => LaTeX m
 dagger = comm0 "dag"
 
-ddagger :: LaTeX
+ddagger :: Monad m => LaTeX m
 ddagger = comm0 "ddag"
 
-forall :: LaTeX
+-- | \"For all\" symbol.
+forall :: Monad m => LaTeX m
 forall = comm0 "forall"
 
 -- Others
 
-binom :: MathTerm -> MathTerm -> MathTerm
+binom :: Monad m => MathTerm m -> MathTerm m -> MathTerm m
 binom = comm5 "binom"
 
-proof :: LaTeX -> LaTeX
+-- | Environment for a proof.
+proof :: Monad m => LaTeX m -> LaTeX m
 proof = env "proof"
 
 
Text/LaTeX/Result.hs view
@@ -1,4 +1,6 @@ 
+{-# LANGUAGE OverloadedStrings #-}
+
 module Text.LaTeX.Result (
      -- * Result Type
      Result
license view
@@ -0,0 +1,30 @@+Copyright (c)2010, Daniel Díaz
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Daniel Díaz nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.