HaTeX 3.2.0.1 → 3.3
raw patch · 39 files changed
+980/−2694 lines, 39 filesdep ~transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: transformers
API changes (from Hackage documentation)
- Text.LaTeX.Base: (<>) :: Monoid m => m -> m -> m
- Text.LaTeX.Base.Commands.Monad: (&) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: A0 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A1 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A2 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A3 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A4 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A5 :: PaperType
- Text.LaTeX.Base.Commands.Monad: A6 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B0 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B1 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B2 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B3 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B4 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B5 :: PaperType
- Text.LaTeX.Base.Commands.Monad: B6 :: PaperType
- Text.LaTeX.Base.Commands.Monad: CustomOption :: String -> ClassOption
- Text.LaTeX.Base.Commands.Monad: Draft :: ClassOption
- Text.LaTeX.Base.Commands.Monad: Executive :: PaperType
- Text.LaTeX.Base.Commands.Monad: Fleqn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: FontSize :: Measure -> ClassOption
- Text.LaTeX.Base.Commands.Monad: Landscape :: ClassOption
- Text.LaTeX.Base.Commands.Monad: Legal :: PaperType
- Text.LaTeX.Base.Commands.Monad: Leqno :: ClassOption
- Text.LaTeX.Base.Commands.Monad: Letter :: PaperType
- Text.LaTeX.Base.Commands.Monad: NoTitlePage :: ClassOption
- Text.LaTeX.Base.Commands.Monad: OneColumn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: OneSide :: ClassOption
- Text.LaTeX.Base.Commands.Monad: OpenAny :: ClassOption
- Text.LaTeX.Base.Commands.Monad: OpenRight :: ClassOption
- Text.LaTeX.Base.Commands.Monad: Paper :: PaperType -> ClassOption
- Text.LaTeX.Base.Commands.Monad: TitlePage :: ClassOption
- Text.LaTeX.Base.Commands.Monad: TwoColumn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: TwoSide :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a0paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a1paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a2paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a3paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a4paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a5paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: a6paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: abstract :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: alph :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: alph_ :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: appendix :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: arabic :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: article :: ClassName
- Text.LaTeX.Base.Commands.Monad: author :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: b0paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b1paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b2paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b3paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b4paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b5paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: b6paper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: between :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: bigskip :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: book :: ClassName
- Text.LaTeX.Base.Commands.Monad: center :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: chapter :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: cite :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: cleardoublepage :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: clearpage :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: cline :: Monad m => Int -> Int -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: customopt :: String -> ClassOption
- Text.LaTeX.Base.Commands.Monad: data ClassOption
- Text.LaTeX.Base.Commands.Monad: data PaperType
- Text.LaTeX.Base.Commands.Monad: date :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: ddots :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: description :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: document :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: documentclass :: Monad m => [ClassOption] -> ClassName -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: draft :: ClassOption
- Text.LaTeX.Base.Commands.Monad: emph :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: empty :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: enumerate :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: equation :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: equation_ :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: executivepaper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: fbox :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: fleqn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: flushleft :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: flushright :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: footnote :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: footnotesize :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: framebox :: Monad m => Maybe Measure -> Maybe Pos -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hatex :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hatex3 :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hatex_meta :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hatex_version :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: headings :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hline :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hspace :: Monad m => Measure -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hspace_ :: Monad m => Measure -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: huge :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: huge2 :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hyp :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: hyphenation :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: indent :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: institute :: Monad m => Maybe (LaTeXT_ m) -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: item :: Monad m => Maybe (LaTeXT_ m) -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: itemize :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: laTeX2 :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: laTeXe :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: label :: Monad m => Label -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: landscape :: ClassOption
- Text.LaTeX.Base.Commands.Monad: large :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: large2 :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: large3 :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: latex :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: ldots :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: legalpaper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: leqno :: ClassOption
- Text.LaTeX.Base.Commands.Monad: letterpaper :: ClassOption
- Text.LaTeX.Base.Commands.Monad: linebreak :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: linespread :: Monad m => Float -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: linewidth :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: lnbk :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: lnbk_ :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: makebox :: Monad m => Maybe Measure -> Maybe Pos -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: maketitle :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: markboth :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: markright :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: mbox :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: minimal :: ClassName
- Text.LaTeX.Base.Commands.Monad: minipage :: Monad m => Maybe Pos -> LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: myheadings :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: newline :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: newpage :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: noindent :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: nolinebreak :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: nopagebreak :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: normalsize :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: notitlepage :: ClassOption
- Text.LaTeX.Base.Commands.Monad: onecolumn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: oneside :: ClassOption
- Text.LaTeX.Base.Commands.Monad: openany :: ClassOption
- Text.LaTeX.Base.Commands.Monad: openright :: ClassOption
- Text.LaTeX.Base.Commands.Monad: pagebreak :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: pagenumbering :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: pageref :: Monad m => Label -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: pagestyle :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: par :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: paragraph :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: parbox :: Monad m => Maybe Pos -> Measure -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: part :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: plain :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: proc :: ClassName
- Text.LaTeX.Base.Commands.Monad: protect :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: qts :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: quote :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: raisebox :: Monad m => Measure -> Maybe Measure -> Maybe Measure -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: raw :: Monad m => Text -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: ref :: Monad m => Label -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: report :: ClassName
- Text.LaTeX.Base.Commands.Monad: roman :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: roman_ :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: rule :: Monad m => Maybe Measure -> Measure -> Measure -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: scriptsize :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: section :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: slides :: ClassName
- Text.LaTeX.Base.Commands.Monad: small :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: smallskip :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: stretch :: Monad m => Int -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: subparagraph :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: subsection :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: subsubsection :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: tableofcontents :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: tabular :: Monad m => Maybe Pos -> [TableSpec] -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: tex :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textbf :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textit :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textmd :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textnormal :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textrm :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textsc :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textsf :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textsl :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: texttt :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textup :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: textwidth :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: thanks :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: thispagestyle :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: tiny :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: title :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: titlepage :: ClassOption
- Text.LaTeX.Base.Commands.Monad: today :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: twocolumn :: ClassOption
- Text.LaTeX.Base.Commands.Monad: twoside :: ClassOption
- Text.LaTeX.Base.Commands.Monad: underline :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: usepackage :: Monad m => [LaTeXT_ m] -> PackageName -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: vdots :: Monad m => LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: verbatim :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: verse :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Base.Commands.Monad: vspace :: Monad m => Measure -> LaTeXT_ m
- Text.LaTeX.Base.Monad: (<>) :: Monoid m => m -> m -> m
- Text.LaTeX.Base.Monad: data LaTeX
- Text.LaTeX.Base.Monad: instance Eq (LaTeXT m a)
- Text.LaTeX.Base.Monad: instance Monad m => Num (LaTeXT m a)
- Text.LaTeX.Base.Monad: instance Show (LaTeXT m a)
- Text.LaTeX.Base.Syntax: braces :: LaTeX -> LaTeX
- Text.LaTeX.Base.Syntax: comm :: String -> LaTeX
- Text.LaTeX.Packages.AMSFonts.Monad: amsfonts :: ClassName
- Text.LaTeX.Packages.AMSFonts.Monad: mathbb :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (!:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (/=:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (<:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (<=:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (=:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (>:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (>=:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: (^:) :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: alpha :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: amsmath :: PackageName
- Text.LaTeX.Packages.AMSMath.Monad: arccos :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: arcsin :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: arctan :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: beta :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: chi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: dagger :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: ddagger :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: delta :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: deltau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: epsilon :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: eta :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: forall :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: gamma :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: gammau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: in_ :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: iota :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: kappa :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: lambda :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: lambdau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: ln :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: math :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathbf :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathcal :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathit :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathrm :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathsf :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mathtt :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: mu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: ni :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: notin :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: nu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: omega :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: omegau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: phi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: phiu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: pi_ :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: piu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: psi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: psiu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: rho :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: sigma :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: sigmau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: tau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: tcos :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: texp :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: theta :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: thetau :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: tlog :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: to :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: tsin :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: ttan :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: upsilon :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: upsilonu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: varepsilon :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: varphi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: varpi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: varrho :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: varsigma :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: xi :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: xiu :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSMath.Monad: zeta :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSThm.Monad: CustomThmStyle :: String -> TheoremStyle
- Text.LaTeX.Packages.AMSThm.Monad: Definition :: TheoremStyle
- Text.LaTeX.Packages.AMSThm.Monad: Plain :: TheoremStyle
- Text.LaTeX.Packages.AMSThm.Monad: Remark :: TheoremStyle
- Text.LaTeX.Packages.AMSThm.Monad: amsthm :: PackageName
- Text.LaTeX.Packages.AMSThm.Monad: data TheoremStyle
- Text.LaTeX.Packages.AMSThm.Monad: newtheorem :: Monad m => String -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSThm.Monad: proof :: Monad m => Maybe (LaTeXT_ m) -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSThm.Monad: qedhere :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.AMSThm.Monad: theorem :: Monad m => String -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.AMSThm.Monad: theoremstyle :: Monad m => TheoremStyle -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: AnnArbor :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Antibes :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Bergen :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Berkeley :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Berlin :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Boadilla :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Boxes :: Theme
- Text.LaTeX.Packages.Beamer.Monad: CambridgeUS :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Copenhagen :: Theme
- Text.LaTeX.Packages.Beamer.Monad: CustomTheme :: String -> Theme
- Text.LaTeX.Packages.Beamer.Monad: Darmstadt :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Default :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Dresden :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Frankfurt :: Theme
- Text.LaTeX.Packages.Beamer.Monad: FromSlide :: Int -> OverlaySpec
- Text.LaTeX.Packages.Beamer.Monad: FromToSlide :: Int -> Int -> OverlaySpec
- Text.LaTeX.Packages.Beamer.Monad: Goettingen :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Hannover :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Ilmenau :: Theme
- Text.LaTeX.Packages.Beamer.Monad: JuanLesPins :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Luebeck :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Madrid :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Malmoe :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Marburg :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Montpellier :: Theme
- Text.LaTeX.Packages.Beamer.Monad: OneSlide :: Int -> OverlaySpec
- Text.LaTeX.Packages.Beamer.Monad: PaloAlto :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Pittsburgh :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Rochester :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Singapore :: Theme
- Text.LaTeX.Packages.Beamer.Monad: Szeged :: Theme
- Text.LaTeX.Packages.Beamer.Monad: ToSlide :: Int -> OverlaySpec
- Text.LaTeX.Packages.Beamer.Monad: Warsaw :: Theme
- Text.LaTeX.Packages.Beamer.Monad: alert :: Monad m => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: beamer :: ClassName
- Text.LaTeX.Packages.Beamer.Monad: beameritem :: Monad m => [OverlaySpec] -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: block :: Monad m => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: data OverlaySpec
- Text.LaTeX.Packages.Beamer.Monad: data Theme
- Text.LaTeX.Packages.Beamer.Monad: frame :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: framesubtitle :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: frametitle :: Monad m => LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: only :: Monad m => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: pause :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: uncover :: Monad m => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Beamer.Monad: usetheme :: Monad m => Theme -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: Apricot :: ColorName
- Text.LaTeX.Packages.Color.Monad: Aquamarine :: ColorName
- Text.LaTeX.Packages.Color.Monad: Bittersweet :: ColorName
- Text.LaTeX.Packages.Color.Monad: Black :: Color
- Text.LaTeX.Packages.Color.Monad: Blue :: Color
- Text.LaTeX.Packages.Color.Monad: BlueGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: BlueViolet :: ColorName
- Text.LaTeX.Packages.Color.Monad: BrickRed :: ColorName
- Text.LaTeX.Packages.Color.Monad: Brown :: ColorName
- Text.LaTeX.Packages.Color.Monad: BurntOrange :: ColorName
- Text.LaTeX.Packages.Color.Monad: CMYK :: Float -> Float -> Float -> Float -> ColorModel
- Text.LaTeX.Packages.Color.Monad: CadetBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: CarnationPink :: ColorName
- Text.LaTeX.Packages.Color.Monad: Cerulean :: ColorName
- Text.LaTeX.Packages.Color.Monad: CornflowerBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: Cyan :: Color
- Text.LaTeX.Packages.Color.Monad: Dandelion :: ColorName
- Text.LaTeX.Packages.Color.Monad: DarkOrchid :: ColorName
- Text.LaTeX.Packages.Color.Monad: DefColor :: Color -> ColSpec
- Text.LaTeX.Packages.Color.Monad: DvipsColor :: ColorName -> ColSpec
- Text.LaTeX.Packages.Color.Monad: Emerald :: ColorName
- Text.LaTeX.Packages.Color.Monad: ForestGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Fuchsia :: ColorName
- Text.LaTeX.Packages.Color.Monad: Goldenrod :: ColorName
- Text.LaTeX.Packages.Color.Monad: Gray :: ColorName
- Text.LaTeX.Packages.Color.Monad: GrayM :: Float -> ColorModel
- Text.LaTeX.Packages.Color.Monad: Green :: Color
- Text.LaTeX.Packages.Color.Monad: GreenYellow :: ColorName
- Text.LaTeX.Packages.Color.Monad: HTML :: String -> ColorModel
- Text.LaTeX.Packages.Color.Monad: JungleGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Lavender :: ColorName
- Text.LaTeX.Packages.Color.Monad: LimeGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Magenta :: Color
- Text.LaTeX.Packages.Color.Monad: Mahogany :: ColorName
- Text.LaTeX.Packages.Color.Monad: Maroon :: ColorName
- Text.LaTeX.Packages.Color.Monad: Melon :: ColorName
- Text.LaTeX.Packages.Color.Monad: MidnightBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: ModColor :: ColorModel -> ColSpec
- Text.LaTeX.Packages.Color.Monad: Mulberry :: ColorName
- Text.LaTeX.Packages.Color.Monad: NavyBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: OliveGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Orange :: ColorName
- Text.LaTeX.Packages.Color.Monad: OrangeRed :: ColorName
- Text.LaTeX.Packages.Color.Monad: Orchid :: ColorName
- Text.LaTeX.Packages.Color.Monad: Peach :: ColorName
- Text.LaTeX.Packages.Color.Monad: Periwinkle :: ColorName
- Text.LaTeX.Packages.Color.Monad: PineGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Plum :: ColorName
- Text.LaTeX.Packages.Color.Monad: ProcessBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: Purple :: ColorName
- Text.LaTeX.Packages.Color.Monad: RGB :: Float -> Float -> Float -> ColorModel
- Text.LaTeX.Packages.Color.Monad: RGB255 :: Int -> Int -> Int -> ColorModel
- Text.LaTeX.Packages.Color.Monad: RawSienna :: ColorName
- Text.LaTeX.Packages.Color.Monad: Red :: Color
- Text.LaTeX.Packages.Color.Monad: RedOrange :: ColorName
- Text.LaTeX.Packages.Color.Monad: RedViolet :: ColorName
- Text.LaTeX.Packages.Color.Monad: Rhodamine :: ColorName
- Text.LaTeX.Packages.Color.Monad: RoyalBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: RubineRed :: ColorName
- Text.LaTeX.Packages.Color.Monad: Salmon :: ColorName
- Text.LaTeX.Packages.Color.Monad: SeaGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Sepia :: ColorName
- Text.LaTeX.Packages.Color.Monad: SkyBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: SpringGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: Tan :: ColorName
- Text.LaTeX.Packages.Color.Monad: TealBlue :: ColorName
- Text.LaTeX.Packages.Color.Monad: Thistle :: ColorName
- Text.LaTeX.Packages.Color.Monad: Turquoise :: ColorName
- Text.LaTeX.Packages.Color.Monad: Violet :: ColorName
- Text.LaTeX.Packages.Color.Monad: VioletRed :: ColorName
- Text.LaTeX.Packages.Color.Monad: White :: Color
- Text.LaTeX.Packages.Color.Monad: WildStrawberry :: ColorName
- Text.LaTeX.Packages.Color.Monad: Yellow :: Color
- Text.LaTeX.Packages.Color.Monad: YellowGreen :: ColorName
- Text.LaTeX.Packages.Color.Monad: YellowOrange :: ColorName
- Text.LaTeX.Packages.Color.Monad: color :: Monad m => ColSpec -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: colorbox :: Monad m => ColSpec -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: data ColSpec
- Text.LaTeX.Packages.Color.Monad: data Color
- Text.LaTeX.Packages.Color.Monad: data ColorModel
- Text.LaTeX.Packages.Color.Monad: data ColorName
- Text.LaTeX.Packages.Color.Monad: dvipsnames :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: fcolorbox :: Monad m => ColSpec -> ColSpec -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: monochrome :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: nodvipsnames :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: normalcolor :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: pagecolor :: Monad m => ColSpec -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: pcolor :: PackageName
- Text.LaTeX.Packages.Color.Monad: textcolor :: Monad m => ColSpec -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Color.Monad: usenames :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Graphicx.Monad: IGAngle :: Int -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGClip :: Bool -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGHeight :: Measure -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGPage :: Int -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGScale :: Float -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGTrim :: Measure -> Measure -> Measure -> Measure -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: IGWidth :: Measure -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: KeepAspectRatio :: Bool -> IGOption
- Text.LaTeX.Packages.Graphicx.Monad: data IGOption
- Text.LaTeX.Packages.Graphicx.Monad: dvipdfm :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Graphicx.Monad: dvips :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Graphicx.Monad: graphicx :: PackageName
- Text.LaTeX.Packages.Graphicx.Monad: includegraphics :: Monad m => [IGOption] -> FilePath -> LaTeXT_ m
- Text.LaTeX.Packages.Graphicx.Monad: pdftex :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: HRefPage :: Int -> HRefOption
- Text.LaTeX.Packages.Hyperref.Monad: PDFNewWindow :: HRefOption
- Text.LaTeX.Packages.Hyperref.Monad: PDFRemoteStartView :: HRefOption
- Text.LaTeX.Packages.Hyperref.Monad: autoref :: Monad m => Label -> LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: createURL :: String -> URL
- Text.LaTeX.Packages.Hyperref.Monad: data HRefOption
- Text.LaTeX.Packages.Hyperref.Monad: data URL
- Text.LaTeX.Packages.Hyperref.Monad: href :: Monad m => [HRefOption] -> URL -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: hyperbaseurl :: Monad m => URL -> LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: hyperimage :: Monad m => URL -> LaTeXT_ m -> LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: hyperref :: PackageName
- Text.LaTeX.Packages.Hyperref.Monad: nolinkurl :: Monad m => URL -> LaTeXT_ m
- Text.LaTeX.Packages.Hyperref.Monad: url :: Monad m => URL -> LaTeXT_ m
- Text.LaTeX.Packages.Inputenc.Monad: inputenc :: PackageName
- Text.LaTeX.Packages.Inputenc.Monad: latin1 :: Monad m => LaTeXT_ m
- Text.LaTeX.Packages.Inputenc.Monad: utf8 :: Monad m => LaTeXT_ m
+ Text.LaTeX.Base: protectString :: String -> String
+ Text.LaTeX.Base: protectText :: Text -> Text
+ Text.LaTeX.Base.Class: braces :: LaTeXC l => l -> l
+ Text.LaTeX.Base.Class: class (Monoid l, IsString l) => LaTeXC l
+ Text.LaTeX.Base.Class: class Monoid a
+ Text.LaTeX.Base.Class: comm0 :: LaTeXC l => String -> l
+ Text.LaTeX.Base.Class: commS :: LaTeXC l => String -> l
+ Text.LaTeX.Base.Class: fromLaTeX :: LaTeXC l => LaTeX -> l
+ Text.LaTeX.Base.Class: instance LaTeXC LaTeX
+ Text.LaTeX.Base.Class: liftL :: LaTeXC l => (LaTeX -> LaTeX) -> l -> l
+ Text.LaTeX.Base.Class: liftL2 :: LaTeXC l => (LaTeX -> LaTeX -> LaTeX) -> l -> l -> l
+ Text.LaTeX.Base.Class: liftListL :: LaTeXC l => ([LaTeX] -> LaTeX) -> [l] -> l
+ Text.LaTeX.Base.Class: mappend :: Monoid a => a -> a -> a
+ Text.LaTeX.Base.Class: mconcat :: Monoid a => [a] -> a
+ Text.LaTeX.Base.Class: mempty :: Monoid a => a
+ Text.LaTeX.Base.Commands: (%) :: LaTeXC l => l -> Text -> l
+ Text.LaTeX.Base.Commands: caption :: LaTeXC l => l -> l
+ Text.LaTeX.Base.Commands: comment :: LaTeXC l => Text -> l
+ Text.LaTeX.Base.Commands: figure :: LaTeXC l => Maybe Pos -> l -> l
+ Text.LaTeX.Base.Commands: version :: Version
+ Text.LaTeX.Base.Render: instance Render Double
+ Text.LaTeX.Base.Render: instance Render Integer
+ Text.LaTeX.Base.Syntax: TeXComment :: Text -> LaTeX
+ Text.LaTeX.Base.Syntax: protectString :: String -> String
+ Text.LaTeX.Base.Syntax: protectText :: Text -> Text
+ Text.LaTeX.Base.Writer: instance Monad m => LaTeXC (LaTeXT m a)
+ Text.LaTeX.Base.Writer: instance Monad m => Monoid (LaTeXT m a)
+ Text.LaTeX.Base.Writer: merror :: Monad m => String -> LaTeXT m a -> LaTeXT m b
+ Text.LaTeX.Base.Writer: rendertexM :: (Render a, Monad m) => a -> LaTeXT_ m
+ Text.LaTeX.Packages.Graphicx: reflectbox :: LaTeXC l => l -> l
+ Text.LaTeX.Packages.Graphicx: resizebox :: LaTeXC l => Measure -> Measure -> l -> l
+ Text.LaTeX.Packages.Graphicx: rotatebox :: LaTeXC l => Float -> l -> l
+ Text.LaTeX.Packages.Graphicx: scalebox :: LaTeXC l => Float -> Maybe Float -> l -> l
+ Text.LaTeX.Packages.Trees: Leaf :: a -> Tree a
+ Text.LaTeX.Packages.Trees: Node :: (Maybe a) -> [Tree a] -> Tree a
+ Text.LaTeX.Packages.Trees: data Tree a
+ Text.LaTeX.Packages.Trees: instance Foldable Tree
+ Text.LaTeX.Packages.Trees: instance Functor Tree
+ Text.LaTeX.Packages.Trees: instance Traversable Tree
+ Text.LaTeX.Packages.Trees.Qtree: qtree :: PackageName
+ Text.LaTeX.Packages.Trees.Qtree: rendertree :: (Render a, LaTeXC l) => Tree a -> l
+ Text.LaTeX.Packages.Trees.Qtree: tree :: LaTeXC l => (a -> l) -> Tree a -> l
- Text.LaTeX.Base.Commands: (&) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: (&) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Base.Commands: abstract :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: abstract :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: alph :: LaTeX
+ Text.LaTeX.Base.Commands: alph :: LaTeXC l => l
- Text.LaTeX.Base.Commands: alph_ :: LaTeX
+ Text.LaTeX.Base.Commands: alph_ :: LaTeXC l => l
- Text.LaTeX.Base.Commands: appendix :: LaTeX
+ Text.LaTeX.Base.Commands: appendix :: LaTeXC l => l
- Text.LaTeX.Base.Commands: arabic :: LaTeX
+ Text.LaTeX.Base.Commands: arabic :: LaTeXC l => l
- Text.LaTeX.Base.Commands: author :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: author :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: between :: LaTeX -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: between :: Monoid m => m -> m -> m -> m
- Text.LaTeX.Base.Commands: bigskip :: LaTeX
+ Text.LaTeX.Base.Commands: bigskip :: LaTeXC l => l
- Text.LaTeX.Base.Commands: center :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: center :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: chapter :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: chapter :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: cleardoublepage :: LaTeX
+ Text.LaTeX.Base.Commands: cleardoublepage :: LaTeXC l => l
- Text.LaTeX.Base.Commands: clearpage :: LaTeX
+ Text.LaTeX.Base.Commands: clearpage :: LaTeXC l => l
- Text.LaTeX.Base.Commands: cline :: Int -> Int -> LaTeX
+ Text.LaTeX.Base.Commands: cline :: LaTeXC l => Int -> Int -> l
- Text.LaTeX.Base.Commands: date :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: date :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: ddots :: LaTeX
+ Text.LaTeX.Base.Commands: ddots :: LaTeXC l => l
- Text.LaTeX.Base.Commands: description :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: description :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: document :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: document :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: documentclass :: [ClassOption] -> ClassName -> LaTeX
+ Text.LaTeX.Base.Commands: documentclass :: LaTeXC l => [ClassOption] -> ClassName -> l
- Text.LaTeX.Base.Commands: emph :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: emph :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: empty :: LaTeX
+ Text.LaTeX.Base.Commands: empty :: LaTeXC l => l
- Text.LaTeX.Base.Commands: enumerate :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: enumerate :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: equation :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: equation :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: equation_ :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: equation_ :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: fbox :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: fbox :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: flushleft :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: flushleft :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: flushright :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: flushright :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: footnote :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: footnote :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: footnotesize :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: footnotesize :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: framebox :: Maybe Measure -> Maybe Pos -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: framebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> l -> l
- Text.LaTeX.Base.Commands: hatex :: LaTeX
+ Text.LaTeX.Base.Commands: hatex :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hatex3 :: LaTeX
+ Text.LaTeX.Base.Commands: hatex3 :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hatex_meta :: LaTeX
+ Text.LaTeX.Base.Commands: hatex_meta :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hatex_version :: LaTeX
+ Text.LaTeX.Base.Commands: hatex_version :: LaTeXC l => l
- Text.LaTeX.Base.Commands: headings :: LaTeX
+ Text.LaTeX.Base.Commands: headings :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hline :: LaTeX
+ Text.LaTeX.Base.Commands: hline :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hspace :: Measure -> LaTeX
+ Text.LaTeX.Base.Commands: hspace :: LaTeXC l => Measure -> l
- Text.LaTeX.Base.Commands: hspace_ :: Measure -> LaTeX
+ Text.LaTeX.Base.Commands: hspace_ :: LaTeXC l => Measure -> l
- Text.LaTeX.Base.Commands: huge :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: huge :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: huge2 :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: huge2 :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: hyp :: LaTeX
+ Text.LaTeX.Base.Commands: hyp :: LaTeXC l => l
- Text.LaTeX.Base.Commands: hyphenation :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: hyphenation :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: indent :: LaTeX
+ Text.LaTeX.Base.Commands: indent :: LaTeXC l => l
- Text.LaTeX.Base.Commands: institute :: Maybe LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: institute :: LaTeXC l => Maybe l -> l -> l
- Text.LaTeX.Base.Commands: item :: Maybe LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: item :: LaTeXC l => Maybe l -> l
- Text.LaTeX.Base.Commands: itemize :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: itemize :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: laTeX2 :: LaTeX
+ Text.LaTeX.Base.Commands: laTeX2 :: LaTeXC l => l
- Text.LaTeX.Base.Commands: laTeXe :: LaTeX
+ Text.LaTeX.Base.Commands: laTeXe :: LaTeXC l => l
- Text.LaTeX.Base.Commands: label :: Label -> LaTeX
+ Text.LaTeX.Base.Commands: label :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: large :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: large :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: large2 :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: large2 :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: large3 :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: large3 :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: latex :: LaTeX
+ Text.LaTeX.Base.Commands: latex :: LaTeXC l => l
- Text.LaTeX.Base.Commands: ldots :: LaTeX
+ Text.LaTeX.Base.Commands: ldots :: LaTeXC l => l
- Text.LaTeX.Base.Commands: linebreak :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: linebreak :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: linespread :: Float -> LaTeX
+ Text.LaTeX.Base.Commands: linespread :: LaTeXC l => Float -> l
- Text.LaTeX.Base.Commands: linewidth :: LaTeX
+ Text.LaTeX.Base.Commands: linewidth :: LaTeXC l => l
- Text.LaTeX.Base.Commands: lnbk :: LaTeX
+ Text.LaTeX.Base.Commands: lnbk :: LaTeXC l => l
- Text.LaTeX.Base.Commands: lnbk_ :: LaTeX
+ Text.LaTeX.Base.Commands: lnbk_ :: LaTeXC l => l
- Text.LaTeX.Base.Commands: makebox :: Maybe Measure -> Maybe Pos -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: makebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> l -> l
- Text.LaTeX.Base.Commands: maketitle :: LaTeX
+ Text.LaTeX.Base.Commands: maketitle :: LaTeXC l => l
- Text.LaTeX.Base.Commands: markboth :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: markboth :: LaTeXC l => l -> l -> l
- Text.LaTeX.Base.Commands: markright :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: markright :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: mbox :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: mbox :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: minipage :: Maybe Pos -> LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: minipage :: LaTeXC l => Maybe Pos -> l -> l -> l
- Text.LaTeX.Base.Commands: myheadings :: LaTeX
+ Text.LaTeX.Base.Commands: myheadings :: LaTeXC l => l
- Text.LaTeX.Base.Commands: newline :: LaTeX
+ Text.LaTeX.Base.Commands: newline :: LaTeXC l => l
- Text.LaTeX.Base.Commands: newpage :: LaTeX
+ Text.LaTeX.Base.Commands: newpage :: LaTeXC l => l
- Text.LaTeX.Base.Commands: noindent :: LaTeX
+ Text.LaTeX.Base.Commands: noindent :: LaTeXC l => l
- Text.LaTeX.Base.Commands: nolinebreak :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: nolinebreak :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: nopagebreak :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: nopagebreak :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: normalsize :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: normalsize :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: pagebreak :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: pagebreak :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: pagenumbering :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: pagenumbering :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: pageref :: Label -> LaTeX
+ Text.LaTeX.Base.Commands: pageref :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: pagestyle :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: pagestyle :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: par :: LaTeX
+ Text.LaTeX.Base.Commands: par :: LaTeXC l => l
- Text.LaTeX.Base.Commands: paragraph :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: paragraph :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: parbox :: Maybe Pos -> Measure -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: parbox :: LaTeXC l => Maybe Pos -> Measure -> l -> l
- Text.LaTeX.Base.Commands: part :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: part :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: plain :: LaTeX
+ Text.LaTeX.Base.Commands: plain :: LaTeXC l => l
- Text.LaTeX.Base.Commands: protect :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: protect :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: qts :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: qts :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: quote :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: quote :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: raisebox :: Measure -> Maybe Measure -> Maybe Measure -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: raisebox :: LaTeXC l => Measure -> Maybe Measure -> Maybe Measure -> l -> l
- Text.LaTeX.Base.Commands: raw :: Text -> LaTeX
+ Text.LaTeX.Base.Commands: raw :: LaTeXC l => Text -> l
- Text.LaTeX.Base.Commands: ref :: Label -> LaTeX
+ Text.LaTeX.Base.Commands: ref :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: roman :: LaTeX
+ Text.LaTeX.Base.Commands: roman :: LaTeXC l => l
- Text.LaTeX.Base.Commands: roman_ :: LaTeX
+ Text.LaTeX.Base.Commands: roman_ :: LaTeXC l => l
- Text.LaTeX.Base.Commands: rule :: Maybe Measure -> Measure -> Measure -> LaTeX
+ Text.LaTeX.Base.Commands: rule :: LaTeXC l => Maybe Measure -> Measure -> Measure -> l
- Text.LaTeX.Base.Commands: scriptsize :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: scriptsize :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: section :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: section :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: small :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: small :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: smallskip :: LaTeX
+ Text.LaTeX.Base.Commands: smallskip :: LaTeXC l => l
- Text.LaTeX.Base.Commands: stretch :: Int -> LaTeX
+ Text.LaTeX.Base.Commands: stretch :: LaTeXC l => Int -> l
- Text.LaTeX.Base.Commands: subparagraph :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: subparagraph :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: subsection :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: subsection :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: subsubsection :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: subsubsection :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: tableofcontents :: LaTeX
+ Text.LaTeX.Base.Commands: tableofcontents :: LaTeXC l => l
- Text.LaTeX.Base.Commands: tabular :: Maybe Pos -> [TableSpec] -> LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: tabular :: LaTeXC l => Maybe Pos -> [TableSpec] -> l -> l
- Text.LaTeX.Base.Commands: tex :: LaTeX
+ Text.LaTeX.Base.Commands: tex :: LaTeXC l => l
- Text.LaTeX.Base.Commands: textbf :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textbf :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textit :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textit :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textmd :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textmd :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textnormal :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textnormal :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textrm :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textrm :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textsc :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textsc :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textsf :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textsf :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textsl :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textsl :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: texttt :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: texttt :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textup :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: textup :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: textwidth :: LaTeX
+ Text.LaTeX.Base.Commands: textwidth :: LaTeXC l => l
- Text.LaTeX.Base.Commands: thanks :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: thanks :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: tiny :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: tiny :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: title :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: title :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: today :: LaTeX
+ Text.LaTeX.Base.Commands: today :: LaTeXC l => l
- Text.LaTeX.Base.Commands: underline :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: underline :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: usepackage :: [LaTeX] -> PackageName -> LaTeX
+ Text.LaTeX.Base.Commands: usepackage :: LaTeXC l => [l] -> PackageName -> l
- Text.LaTeX.Base.Commands: vdots :: LaTeX
+ Text.LaTeX.Base.Commands: vdots :: LaTeXC l => l
- Text.LaTeX.Base.Commands: verbatim :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: verbatim :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: verse :: LaTeX -> LaTeX
+ Text.LaTeX.Base.Commands: verse :: LaTeXC l => l -> l
- Text.LaTeX.Base.Commands: vspace :: Measure -> LaTeX
+ Text.LaTeX.Base.Commands: vspace :: LaTeXC l => Measure -> l
- Text.LaTeX.Base.Render: rendertex :: Render a => a -> LaTeX
+ Text.LaTeX.Base.Render: rendertex :: (Render a, LaTeXC l) => a -> l
- Text.LaTeX.Packages.AMSFonts: mathbb :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSFonts: mathbb :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: (!:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (!:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (<:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (<:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (<=:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (<=:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (=:, /=:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (=:, /=:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (>:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (>:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (>=:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (>=:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: (^:) :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: (^:) :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: alpha :: LaTeX
+ Text.LaTeX.Packages.AMSMath: alpha :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: arccos :: LaTeX
+ Text.LaTeX.Packages.AMSMath: arccos :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: arcsin :: LaTeX
+ Text.LaTeX.Packages.AMSMath: arcsin :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: arctan :: LaTeX
+ Text.LaTeX.Packages.AMSMath: arctan :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: beta :: LaTeX
+ Text.LaTeX.Packages.AMSMath: beta :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: chi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: chi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: dagger :: LaTeX
+ Text.LaTeX.Packages.AMSMath: dagger :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: ddagger :: LaTeX
+ Text.LaTeX.Packages.AMSMath: ddagger :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: delta :: LaTeX
+ Text.LaTeX.Packages.AMSMath: delta :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: deltau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: deltau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: epsilon :: LaTeX
+ Text.LaTeX.Packages.AMSMath: epsilon :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: eta :: LaTeX
+ Text.LaTeX.Packages.AMSMath: eta :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: forall :: LaTeX
+ Text.LaTeX.Packages.AMSMath: forall :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: gamma :: LaTeX
+ Text.LaTeX.Packages.AMSMath: gamma :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: gammau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: gammau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: in_ :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: in_ :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: iota :: LaTeX
+ Text.LaTeX.Packages.AMSMath: iota :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: kappa :: LaTeX
+ Text.LaTeX.Packages.AMSMath: kappa :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: lambda :: LaTeX
+ Text.LaTeX.Packages.AMSMath: lambda :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: lambdau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: lambdau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: ln :: LaTeX
+ Text.LaTeX.Packages.AMSMath: ln :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: math :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: math :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathbf :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathbf :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathcal :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathcal :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathit :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathit :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathrm :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathrm :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathsf :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathsf :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mathtt :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: mathtt :: LaTeXC l => l -> l
- Text.LaTeX.Packages.AMSMath: mu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: mu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: ni :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: ni :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: notin :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSMath: notin :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.AMSMath: nu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: nu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: omega :: LaTeX
+ Text.LaTeX.Packages.AMSMath: omega :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: omegau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: omegau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: phi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: phi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: phiu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: phiu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: pi_ :: LaTeX
+ Text.LaTeX.Packages.AMSMath: pi_ :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: piu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: piu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: psi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: psi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: psiu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: psiu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: rho :: LaTeX
+ Text.LaTeX.Packages.AMSMath: rho :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: sigma :: LaTeX
+ Text.LaTeX.Packages.AMSMath: sigma :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: sigmau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: sigmau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: tau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: tau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: tcos :: LaTeX
+ Text.LaTeX.Packages.AMSMath: tcos :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: texp :: LaTeX
+ Text.LaTeX.Packages.AMSMath: texp :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: theta :: LaTeX
+ Text.LaTeX.Packages.AMSMath: theta :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: thetau :: LaTeX
+ Text.LaTeX.Packages.AMSMath: thetau :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: tlog :: LaTeX
+ Text.LaTeX.Packages.AMSMath: tlog :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: to :: LaTeX
+ Text.LaTeX.Packages.AMSMath: to :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: tsin :: LaTeX
+ Text.LaTeX.Packages.AMSMath: tsin :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: ttan :: LaTeX
+ Text.LaTeX.Packages.AMSMath: ttan :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: upsilon :: LaTeX
+ Text.LaTeX.Packages.AMSMath: upsilon :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: upsilonu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: upsilonu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: varepsilon :: LaTeX
+ Text.LaTeX.Packages.AMSMath: varepsilon :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: varphi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: varphi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: varpi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: varpi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: varrho :: LaTeX
+ Text.LaTeX.Packages.AMSMath: varrho :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: varsigma :: LaTeX
+ Text.LaTeX.Packages.AMSMath: varsigma :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: xi :: LaTeX
+ Text.LaTeX.Packages.AMSMath: xi :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: xiu :: LaTeX
+ Text.LaTeX.Packages.AMSMath: xiu :: LaTeXC l => l
- Text.LaTeX.Packages.AMSMath: zeta :: LaTeX
+ Text.LaTeX.Packages.AMSMath: zeta :: LaTeXC l => l
- Text.LaTeX.Packages.AMSThm: newtheorem :: String -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSThm: newtheorem :: LaTeXC l => String -> l -> l
- Text.LaTeX.Packages.AMSThm: proof :: Maybe LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSThm: proof :: LaTeXC l => Maybe l -> l -> l
- Text.LaTeX.Packages.AMSThm: qedhere :: LaTeX
+ Text.LaTeX.Packages.AMSThm: qedhere :: LaTeXC l => l
- Text.LaTeX.Packages.AMSThm: theorem :: String -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.AMSThm: theorem :: LaTeXC l => String -> l -> l
- Text.LaTeX.Packages.AMSThm: theoremstyle :: TheoremStyle -> LaTeX
+ Text.LaTeX.Packages.AMSThm: theoremstyle :: LaTeXC l => TheoremStyle -> l
- Text.LaTeX.Packages.Beamer: alert :: [OverlaySpec] -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: alert :: LaTeXC l => [OverlaySpec] -> l -> l
- Text.LaTeX.Packages.Beamer: beameritem :: [OverlaySpec] -> LaTeX
+ Text.LaTeX.Packages.Beamer: beameritem :: LaTeXC l => [OverlaySpec] -> l
- Text.LaTeX.Packages.Beamer: block :: LaTeX -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: block :: LaTeXC l => l -> l -> l
- Text.LaTeX.Packages.Beamer: frame :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: frame :: LaTeXC l => l -> l
- Text.LaTeX.Packages.Beamer: framesubtitle :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: framesubtitle :: LaTeXC l => l -> l
- Text.LaTeX.Packages.Beamer: frametitle :: LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: frametitle :: LaTeXC l => l -> l
- Text.LaTeX.Packages.Beamer: only :: [OverlaySpec] -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: only :: LaTeXC l => [OverlaySpec] -> l -> l
- Text.LaTeX.Packages.Beamer: pause :: LaTeX
+ Text.LaTeX.Packages.Beamer: pause :: LaTeXC l => l
- Text.LaTeX.Packages.Beamer: uncover :: [OverlaySpec] -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Beamer: uncover :: LaTeXC l => [OverlaySpec] -> l -> l
- Text.LaTeX.Packages.Beamer: usetheme :: Theme -> LaTeX
+ Text.LaTeX.Packages.Beamer: usetheme :: LaTeXC l => Theme -> l
- Text.LaTeX.Packages.Color: color :: ColSpec -> LaTeX
+ Text.LaTeX.Packages.Color: color :: LaTeXC l => ColSpec -> l
- Text.LaTeX.Packages.Color: colorbox :: ColSpec -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Color: colorbox :: LaTeXC l => ColSpec -> l -> l
- Text.LaTeX.Packages.Color: dvipsnames :: LaTeX
+ Text.LaTeX.Packages.Color: dvipsnames :: LaTeXC l => l
- Text.LaTeX.Packages.Color: fcolorbox :: ColSpec -> ColSpec -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Color: fcolorbox :: LaTeXC l => ColSpec -> ColSpec -> l -> l
- Text.LaTeX.Packages.Color: monochrome :: LaTeX
+ Text.LaTeX.Packages.Color: monochrome :: LaTeXC l => l
- Text.LaTeX.Packages.Color: nodvipsnames :: LaTeX
+ Text.LaTeX.Packages.Color: nodvipsnames :: LaTeXC l => l
- Text.LaTeX.Packages.Color: normalcolor :: LaTeX
+ Text.LaTeX.Packages.Color: normalcolor :: LaTeXC l => l
- Text.LaTeX.Packages.Color: pagecolor :: ColSpec -> LaTeX
+ Text.LaTeX.Packages.Color: pagecolor :: LaTeXC l => ColSpec -> l
- Text.LaTeX.Packages.Color: textcolor :: ColSpec -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Color: textcolor :: LaTeXC l => ColSpec -> l -> l
- Text.LaTeX.Packages.Color: usenames :: LaTeX
+ Text.LaTeX.Packages.Color: usenames :: LaTeXC l => l
- Text.LaTeX.Packages.Graphicx: dvips, pdftex, dvipdfm :: LaTeX
+ Text.LaTeX.Packages.Graphicx: dvips, pdftex, dvipdfm :: LaTeXC l => l
- Text.LaTeX.Packages.Graphicx: includegraphics :: [IGOption] -> FilePath -> LaTeX
+ Text.LaTeX.Packages.Graphicx: includegraphics :: LaTeXC l => [IGOption] -> FilePath -> l
- Text.LaTeX.Packages.Hyperref: autoref :: Label -> LaTeX
+ Text.LaTeX.Packages.Hyperref: autoref :: LaTeXC l => Label -> l
- Text.LaTeX.Packages.Hyperref: href :: [HRefOption] -> URL -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Hyperref: href :: LaTeXC l => [HRefOption] -> URL -> l -> l
- Text.LaTeX.Packages.Hyperref: hyperbaseurl :: URL -> LaTeX
+ Text.LaTeX.Packages.Hyperref: hyperbaseurl :: LaTeXC l => URL -> l
- Text.LaTeX.Packages.Hyperref: hyperimage :: URL -> LaTeX -> LaTeX
+ Text.LaTeX.Packages.Hyperref: hyperimage :: LaTeXC l => URL -> l -> l
- Text.LaTeX.Packages.Hyperref: nolinkurl :: URL -> LaTeX
+ Text.LaTeX.Packages.Hyperref: nolinkurl :: LaTeXC l => URL -> l
- Text.LaTeX.Packages.Hyperref: url :: URL -> LaTeX
+ Text.LaTeX.Packages.Hyperref: url :: LaTeXC l => URL -> l
- Text.LaTeX.Packages.Inputenc: latin1 :: LaTeX
+ Text.LaTeX.Packages.Inputenc: latin1 :: LaTeXC l => l
- Text.LaTeX.Packages.Inputenc: utf8 :: LaTeX
+ Text.LaTeX.Packages.Inputenc: utf8 :: LaTeXC l => l
Files
- Examples/comments.hs +18/−0
- Examples/fibs.hs +3/−3
- Examples/simple.hs +42/−0
- Examples/tree.hs +41/−0
- HaTeX.cabal +25/−22
- README.md +19/−0
- ReadMe +0/−10
- ReleaseNotes +12/−0
- Text/LaTeX.hs +1/−1
- Text/LaTeX/Base.hs +23/−5
- Text/LaTeX/Base/Class.hs +48/−0
- Text/LaTeX/Base/Commands.hs +333/−283
- Text/LaTeX/Base/Commands/Monad.hs +0/−1054
- Text/LaTeX/Base/Monad.hs +0/−67
- Text/LaTeX/Base/Render.hs +15/−11
- Text/LaTeX/Base/Syntax.hs +16/−22
- Text/LaTeX/Base/Types.hs +3/−0
- Text/LaTeX/Base/Writer.hs +51/−0
- Text/LaTeX/Monad.hs +0/−13
- Text/LaTeX/Packages.hs +1/−0
- Text/LaTeX/Packages/AMSFonts.hs +7/−4
- Text/LaTeX/Packages/AMSFonts/Monad.hs +0/−46
- Text/LaTeX/Packages/AMSMath.hs +142/−140
- Text/LaTeX/Packages/AMSMath/Monad.hs +0/−421
- Text/LaTeX/Packages/AMSThm.hs +12/−13
- Text/LaTeX/Packages/AMSThm/Monad.hs +0/−84
- Text/LaTeX/Packages/Beamer.hs +24/−23
- Text/LaTeX/Packages/Beamer/Monad.hs +0/−115
- Text/LaTeX/Packages/Color.hs +19/−19
- Text/LaTeX/Packages/Color/Monad.hs +0/−107
- Text/LaTeX/Packages/Graphicx.hs +40/−6
- Text/LaTeX/Packages/Graphicx/Monad.hs +0/−57
- Text/LaTeX/Packages/Hyperref.hs +15/−16
- Text/LaTeX/Packages/Hyperref/Monad.hs +0/−81
- Text/LaTeX/Packages/Inputenc.hs +3/−3
- Text/LaTeX/Packages/Inputenc/Monad.hs +0/−45
- Text/LaTeX/Packages/Monad.hs +0/−23
- Text/LaTeX/Packages/Trees.hs +29/−0
- Text/LaTeX/Packages/Trees/Qtree.hs +38/−0
+ Examples/comments.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE OverloadedStrings #-} + +import Text.LaTeX.Base + +main :: IO () +main = execLaTeXT example >>= renderFile "Comments.tex" + +example :: Monad m => LaTeXT_ m +example = do + documentclass [] article + document exampleBody + +exampleBody :: Monad m => LaTeXT_ m +exampleBody = do + "This is a basic example for testing the " + "comments functionality in HaTeX." % "A short comment here." + "Multi-line comments are separated by lines." % "First line.\nSecond line." + "After a comment, the following code will start in a new line of the output."
Examples/fibs.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} -import Text.LaTeX.Base.Monad +import Text.LaTeX.Base main :: IO () main = execLaTeXT example >>= renderFile "Fibs.tex" @@ -23,9 +23,9 @@ textbf "Fibonacci number" & textbf "Value" lnbk hline - foldr (\n l -> do fromString (show n) & fromString (show $ fib n) + foldr (\n l -> do rendertexM n & rendertexM (fib n) lnbk - l ) (return ()) [0..12] + l ) (return ()) [0 .. 12] fibs :: [Int] fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
+ Examples/simple.hs view
@@ -0,0 +1,42 @@+ +{- Simple example + +This example is intended to be simplest as possible, but containing the most significant parts. + +The Overloaded Strings language extension is quite handy, because it allows you to write text without +using 'fromString' each time. + +-} + +{-# LANGUAGE OverloadedStrings #-} + +import Text.LaTeX.Base + +-- By executing 'execLaTeXT' you run the 'LaTeXT' monad and make a 'LaTeX' value as output. +-- With 'renderFile' you render it to 'Text' and write it in a file. +main :: IO () +main = execLaTeXT simple >>= renderFile "simple.tex" + +-- It's a good idea to separate the preamble of the body. +simple :: Monad m => LaTeXT_ m +simple = do + thePreamble + document theBody + +-- Preamble with some basic info. +thePreamble :: Monad m => LaTeXT_ m +thePreamble = do + documentclass [] article + author "Daniel Diaz" + title "Simple example" + +-- Body with a section. +theBody :: Monad m => LaTeXT_ m +theBody = do + maketitle + section "Hello" + "This is a simple example using the " + hatex + " library. " + -- 'textbf' turns characters to bold font. + textbf "Enjoy!"
+ Examples/tree.hs view
@@ -0,0 +1,41 @@++{-# LANGUAGE OverloadedStrings #-}++import Text.LaTeX.Base+import Text.LaTeX.Packages.Trees.Qtree+import Text.LaTeX.Packages.Inputenc++treeExample1 :: Tree String+treeExample1 = Node (Just "Root") [Leaf "Leaf 1",Leaf "Leaf 2"]++treeExample2 :: Tree Int+treeExample2 = Node (Just 0) [Node Nothing [Leaf 1,Leaf 2] , Leaf 3]++treeExample3 :: Tree LaTeX+treeExample3 = Node (Just $ textbf $ textit "Bold and italic")+ [ Leaf $ textbf "Bold"+ , Leaf $ textit "Italic"+ ]++-- Main++main :: IO ()+main = renderFile "tree.tex" example++example :: LaTeX+example = thePreamble <> document theBody++thePreamble :: LaTeX+thePreamble =+ documentclass [] article+ <> usepackage [] qtree+ <> usepackage [utf8] inputenc+ <> title "Examples with trees"+ <> author "Daniel Díaz"++theBody :: LaTeX+theBody =+ maketitle+ <> tree fromString treeExample1+ <> rendertree treeExample2+ <> tree id treeExample3
HaTeX.cabal view
@@ -1,5 +1,5 @@ Name: HaTeX -Version: 3.2.0.1 +Version: 3.3 Author: Daniel Díaz Category: Text Build-type: Simple @@ -9,19 +9,28 @@ Stability: Experimental Homepage: http://dhelta.net/hprojects/HaTeX Bug-reports: danieldiaz <at> dhelta <dot> net -Synopsis: LaTeX code writer. -Description: HaTeX consists in a set of combinators which allow you to build LaTeX code, - following the LaTeX syntax in a type-safe manner. +Synopsis: The Haskell LaTeX library. +Description: As it is said: \"LaTeX is a high-quality typesetting system\". This library provides + a bridge between that system and Haskell (i.e. it is a LaTeX DSL). . - This allows you to build programs which generates LaTeX code automatically - for any purpose you can figure out. + Write LaTeX documents with all the advantages you already have in Haskell (recursion, + type system, high order functions, ...), create a LaTeX backend for your own program, + make analysis of LaTeX code through its Abstract Syntax Tree (AST), find another way + to pretty-printing values, ... + . + See the @examples@ directory in the source distribution to look some simple examples. + It would be good to get you started. Download the HaTeX User's Guide from + <https://github.com/downloads/Daniel-Diaz/HaTeX-Guide/HaTeX-Guide.pdf>. Cabal-version: >= 1.6 -Tested-with: GHC == 6.12.3 , GHC == 7.0.3 +Tested-with: GHC == 7.0.3 , GHC == 7.4.1 Extra-source-files: ReleaseNotes - ReadMe + README.md -- Examples Examples/fibs.hs + Examples/comments.hs + Examples/simple.hs + Examples/tree.hs Source-repository head type: git @@ -30,41 +39,35 @@ Library Build-depends: base ==4.* , bytestring - , transformers ==0.2.* + , transformers ==0.3.* , text , parsec >=3.1.2 && <3.2 - GHC-Options: -fno-warn-unrecognised-pragmas Exposed-modules: Text.LaTeX - Text.LaTeX.Monad + -- Base (Core of the library) Text.LaTeX.Base - Text.LaTeX.Base.Monad + Text.LaTeX.Base.Class Text.LaTeX.Base.Commands - Text.LaTeX.Base.Commands.Monad Text.LaTeX.Base.Render Text.LaTeX.Base.Parser Text.LaTeX.Base.Syntax Text.LaTeX.Base.Types Text.LaTeX.Base.Writer Text.LaTeX.Base.Warnings + -- Packages Text.LaTeX.Packages - Text.LaTeX.Packages.Monad Text.LaTeX.Packages.AMSFonts - Text.LaTeX.Packages.AMSFonts.Monad Text.LaTeX.Packages.AMSMath - Text.LaTeX.Packages.AMSMath.Monad Text.LaTeX.Packages.AMSThm - Text.LaTeX.Packages.AMSThm.Monad Text.LaTeX.Packages.Beamer - Text.LaTeX.Packages.Beamer.Monad Text.LaTeX.Packages.Hyperref - Text.LaTeX.Packages.Hyperref.Monad Text.LaTeX.Packages.Inputenc - Text.LaTeX.Packages.Inputenc.Monad Text.LaTeX.Packages.Color - Text.LaTeX.Packages.Color.Monad Text.LaTeX.Packages.Graphicx - Text.LaTeX.Packages.Graphicx.Monad + -- Trees + Text.LaTeX.Packages.Trees + Text.LaTeX.Packages.Trees.Qtree + Other-modules: Paths_HaTeX Extensions: GeneralizedNewtypeDeriving , OverloadedStrings , CPP
+ README.md view
@@ -0,0 +1,19 @@+# HaTeX README + +`HaTeX` is the LaTeX syntax implementation done in Haskell. + +## TODO list + +* Add more examples. +* More testing on the parser. +* Add more documentation. +* A more complete `AMSMath` module. + +## Installation notes + +* To install `HaTeX`, use the typical `cabal install`. +* Eventually you may require to install `mtl` first (there is a problem with the `transformers` dependency). + +## HaTeX User's Guide + +* The HaTeX User's Guide lives [here](https://github.com/Daniel-Diaz/HaTeX-Guide).
− ReadMe
@@ -1,10 +0,0 @@-== HaTeX ReadMe == - -HaTeX is the LaTeX syntax implementation done in Haskell. - --- ToDo list - -* Add more examples. -* More testing on the parser. -* Add more documentation. -* A more complete AMSMath module.
ReleaseNotes view
@@ -1,6 +1,18 @@ HaTeX Release Notes -- From version 3.0.0 +>>> 3.3 + +- New functions 'protectString' and 'protectText'. +- New function 'rendertexM'. +- New environments: 'figure' and 'caption'. +- New example: simple.hs. +- Updated version of transfomers to 0.3.*. +- Trees implemented: datatype and Qtree package. +- Render instances for Integer and Double. +- New docs. +- Class system implemented. Monad modules dropped. + >>> 3.2.0.1 - This version only fix the patch that makes HaTeX compatible with GHC 7.4.
Text/LaTeX.hs view
@@ -10,4 +10,4 @@ ) where import Text.LaTeX.Base -import Text.LaTeX.Packages +import Text.LaTeX.Packages
Text/LaTeX/Base.hs view
@@ -1,4 +1,6 @@ +{-# LANGUAGE CPP #-} + {- | This module exports those minimal things you need to work with HaTeX. Those things are: @@ -18,16 +20,32 @@ Here is also defined a 'Num' instance for 'LaTeX'. -} module Text.LaTeX.Base - ( LaTeX , (<>) + ( -- * @LaTeX@ datatype + LaTeX + -- * Escaping reserved characters + , protectString , protectText + -- * Internal re-exports , module Text.LaTeX.Base.Render , module Text.LaTeX.Base.Types , module Text.LaTeX.Base.Commands + , module Text.LaTeX.Base.Writer + -- * External re-exports + -- + -- | Since the 'Monoid' instance is the only way to append 'LaTeX' + -- values, a re-export of "Data.Monoid" is given here. + , module Data.Monoid +#if __GLASGOW_HASKELL__ < 704 + , (<>) +#endif ) where -import Text.LaTeX.Base.Syntax (LaTeX (..),(<>)) +import Text.LaTeX.Base.Syntax (LaTeX (..),(<>),protectString,protectText) import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types import Text.LaTeX.Base.Commands +import Text.LaTeX.Base.Writer +-- +import Data.Monoid -- Num instance for LaTeX @@ -37,7 +55,7 @@ (-) = TeXOp "-" (*) = (<>) negate = (TeXEmpty -) - fromInteger = TeXRaw . fromString . show + fromInteger = rendertex -- Non-defined methods - abs _ = "Cannot use \"abs\" Num method with a LaTeX value." - signum _ = "Cannot use \"signum\" Num method with a LaTeX value." + abs _ = error "Cannot use \"abs\" Num method with a LaTeX value." + signum _ = error "Cannot use \"signum\" Num method with a LaTeX value."
+ Text/LaTeX/Base/Class.hs view
@@ -0,0 +1,48 @@+ +module Text.LaTeX.Base.Class ( + LaTeXC (..) + , Monoid (..) + -- * Combinators + , fromLaTeX + , liftL + , liftL2 + , comm0 + , commS + , braces + ) where + +import Text.LaTeX.Base.Syntax +import Data.Text (Text) +import Data.Monoid +import Data.String + +class (Monoid l,IsString l) => LaTeXC l where + liftListL :: ([LaTeX] -> LaTeX) -> [l] -> l + +instance LaTeXC LaTeX where + liftListL = id + +-- COMBINATORS + +fromLaTeX :: LaTeXC l => LaTeX -> l +fromLaTeX l = liftListL (\_ -> l) [] + +liftL :: LaTeXC l => (LaTeX -> LaTeX) -> l -> l +liftL f x = liftListL (\[x] -> f x) [x] + +liftL2 :: LaTeXC l => (LaTeX -> LaTeX -> LaTeX) -> l -> l -> l +liftL2 f x y = liftListL (\[x,y] -> f x y) [x,y] + +-- | A simple (without arguments) command generator, +-- given the name of the command. +-- +-- > comm0 str = fromLaTeX $ TeXComm str [] +-- +comm0 :: LaTeXC l => String -> l +comm0 str = fromLaTeX $ TeXComm str [] + +commS :: LaTeXC l => String -> l +commS = fromLaTeX . TeXCommS + +braces :: LaTeXC l => l -> l +braces = liftL TeXBraces
Text/LaTeX/Base/Commands.hs view
@@ -1,10 +1,9 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} -- | LaTeX standard commands and environments. module Text.LaTeX.Base.Commands ( -- * Basic functions - raw , between + raw , between , comment , (%) -- * Preamble commands , title , author @@ -93,6 +92,7 @@ , hatex , hatex3 , hatex_meta + , version , hatex_version -- ** Document layout , par @@ -120,6 +120,8 @@ -- ** Formatting text , verbatim -- *** Fonts + -- + -- Different font styles. , textbf , textit , texttt @@ -133,6 +135,8 @@ , underline , emph -- *** Sizes + -- + -- | Sizes are sorted from smallest to biggest. , tiny , scriptsize , footnotesize @@ -157,6 +161,7 @@ , cite , description , minipage + , figure -- ** Page numbering , pagenumbering , arabic @@ -173,6 +178,7 @@ , raisebox , rule -- * Cross references + , caption , label , ref , pageref @@ -181,7 +187,7 @@ , (&) , hline , cline - -- ** Others + -- ** Others , footnote , protect , hyphenation @@ -193,141 +199,169 @@ import Data.Maybe (catMaybes) import Data.Text (toLower) import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types +import Data.Version +import Data.List (intercalate) +-- +import Paths_HaTeX -- | Insert a raw piece of 'Text'. -- This functions doesn't care about @LaTeX@ reserved characters, -- it insert the text just as it is received. -raw :: Text -> LaTeX -raw = TeXRaw +raw :: LaTeXC l => Text -> l +raw = fromLaTeX . TeXRaw -- | Calling 'between' @c l1 l2@ puts @c@ between @l1@ and @l2@ and -- appends them. -between :: LaTeX -> LaTeX -> LaTeX -> LaTeX +between :: Monoid m => m -> m -> m -> m between c l1 l2 = l1 <> c <> l2 +-- | Create a comment. +comment :: LaTeXC l => Text -> l +comment = fromLaTeX . TeXComment + +-- | This operator appends a comment after a expression. +-- For example: +-- +-- > textbf "I'm just an example." % "Insert a few words here." +-- +-- Since you are writing in Haskell, you may not need to output comments +-- as you can add them in the Haskell source. I added this feature +-- for completeness. +(%) :: LaTeXC l => l -> Text -> l +(%) l = (l <>) . comment + -- | Generate the title. It normally contains the 'title' name -- of your document, the 'author'(s) and 'date'. -maketitle :: LaTeX -maketitle = TeXComm "maketitle" [] +maketitle :: LaTeXC l => l +maketitle = comm0 "maketitle" -- | Set the title of your document. -title :: LaTeX -> LaTeX -title t = TeXComm "title" [FixArg t] +title :: LaTeXC l => l -> l +title = liftL $ \t -> TeXComm "title" [FixArg t] -- | Set a date for your document. -date :: LaTeX -> LaTeX -date t = TeXComm "date" [FixArg t] +date :: LaTeXC l => l -> l +date = liftL $ \t -> TeXComm "date" [FixArg t] -- | Set the author(s) of the document. -author :: LaTeX -> LaTeX -author t = TeXComm "author" [FixArg t] +author :: LaTeXC l => l -> l +author = liftL $ \t -> TeXComm "author" [FixArg t] -- | Set either an institute or an organization -- for the document. -institute :: Maybe LaTeX -> LaTeX -> LaTeX -institute Nothing l = TeXComm "institute" [FixArg l] -institute (Just s) l = TeXComm "institute" [OptArg s,FixArg l] +institute :: LaTeXC l => Maybe l -> l -> l +institute Nothing = liftL $ \l -> TeXComm "institute" [FixArg l] +institute (Just s) = liftL2 (\l1 l2 -> TeXComm "institute" [OptArg l1,FixArg l2]) s -thanks :: LaTeX -> LaTeX -thanks x = TeXComm "thanks" [FixArg x] +thanks :: LaTeXC l => l -> l +thanks = liftL $ \l -> TeXComm "thanks" [FixArg l] -- | Import a package. First argument is a list of options for -- the package named in the second argument. -usepackage :: [LaTeX] -> PackageName -> LaTeX -usepackage lopt str = TeXComm "usepackage" [MOptArg lopt ,FixArg $ fromString str] +usepackage :: LaTeXC l => [l] -> PackageName -> l +usepackage ls pn = liftListL (\ls -> TeXComm "usepackage" [MOptArg ls ,FixArg $ fromString pn]) ls -- | The @LaTeX@ logo. -latex :: LaTeX -latex = TeXComm "LaTeX" [] +latex :: LaTeXC l => l +latex = comm0 "LaTeX" -- | Start a new paragraph -par :: LaTeX -par = TeXComm "par" [] +par :: LaTeXC l => l +par = comm0 "par" -- | Start a new line. -newline :: LaTeX -newline = TeXComm "newline" [] +newline :: LaTeXC l => l +newline = comm0 "newline" -part :: LaTeX -> LaTeX -part p = TeXComm "part" [FixArg p] +part :: LaTeXC l => l -> l +part = liftL $ \p -> TeXComm "part" [FixArg p] -chapter :: LaTeX -> LaTeX -chapter c = TeXComm "chapter" [FixArg c] +chapter :: LaTeXC l => l -> l +chapter = liftL $ \c -> TeXComm "chapter" [FixArg c] -- | Start a new section with a given title. -section :: LaTeX -> LaTeX -section s = TeXComm "section" [FixArg s] +section :: LaTeXC l => l -> l +section = liftL $ \s -> TeXComm "section" [FixArg s] -subsection :: LaTeX -> LaTeX -subsection sub = TeXComm "subsection" [FixArg sub] +subsection :: LaTeXC l => l -> l +subsection = liftL $ \sub -> TeXComm "subsection" [FixArg sub] -subsubsection :: LaTeX -> LaTeX -subsubsection sub = TeXComm "subsubsection" [FixArg sub] +subsubsection :: LaTeXC l => l -> l +subsubsection = liftL $ \sub -> TeXComm "subsubsection" [FixArg sub] -paragraph :: LaTeX -> LaTeX -paragraph p = TeXComm "paragraph" [FixArg p] +paragraph :: LaTeXC l => l -> l +paragraph = liftL $ \p -> TeXComm "paragraph" [FixArg p] -subparagraph :: LaTeX -> LaTeX -subparagraph p = TeXComm "subparagraph" [FixArg p] +subparagraph :: LaTeXC l => l -> l +subparagraph = liftL $ \p -> TeXComm "subparagraph" [FixArg p] -- | Create the table of contents, automatically generated -- from your 'section's, 'subsection's, and other related stuff. -tableofcontents :: LaTeX -tableofcontents = TeXComm "tableofcontents" [] +tableofcontents :: LaTeXC l => l +tableofcontents = comm0 "tableofcontents" -appendix :: LaTeX -appendix = TeXComm "appendix" [] +appendix :: LaTeXC l => l +appendix = comm0 "appendix" -item :: Maybe LaTeX -> LaTeX -item Nothing = TeXCommS "item " -item (Just opt) = TeXComm "item" [OptArg opt] +item :: LaTeXC l => Maybe l -> l +item Nothing = commS "item " +item (Just opt) = liftL (\opt -> TeXComm "item" [OptArg opt]) opt -equation :: LaTeX -> LaTeX -equation = TeXEnv "equation" [] +equation :: LaTeXC l => l -> l +equation = liftL $ TeXEnv "equation" [] -equation_ :: LaTeX -> LaTeX -equation_ = TeXEnv "equation*" [] +equation_ :: LaTeXC l => l -> l +equation_ = liftL $ TeXEnv "equation*" [] -enumerate :: LaTeX -> LaTeX -enumerate = TeXEnv "enumerate" [] +enumerate :: LaTeXC l => l -> l +enumerate = liftL $ TeXEnv "enumerate" [] -itemize :: LaTeX -> LaTeX -itemize = TeXEnv "itemize" [] +itemize :: LaTeXC l => l -> l +itemize = liftL $ TeXEnv "itemize" [] -description :: LaTeX -> LaTeX -description = TeXEnv "description" [] +description :: LaTeXC l => l -> l +description = liftL $ TeXEnv "description" [] -flushleft :: LaTeX -> LaTeX -flushleft = TeXEnv "flushleft" [] +flushleft :: LaTeXC l => l -> l +flushleft = liftL $ TeXEnv "flushleft" [] -flushright :: LaTeX -> LaTeX -flushright = TeXEnv "flushright" [] +flushright :: LaTeXC l => l -> l +flushright = liftL $ TeXEnv "flushright" [] -center :: LaTeX -> LaTeX -center = TeXEnv "center" [] +center :: LaTeXC l => l -> l +center = liftL $ TeXEnv "center" [] -quote :: LaTeX -> LaTeX -quote = TeXEnv "quote" [] +quote :: LaTeXC l => l -> l +quote = liftL $ TeXEnv "quote" [] -verse :: LaTeX -> LaTeX -verse = TeXEnv "verse" [] +verse :: LaTeXC l => l -> l +verse = liftL $ TeXEnv "verse" [] --- | Minipage environments. -minipage :: Maybe Pos -- ^ Optional position - -> LaTeX -- ^ Width - -> LaTeX -- ^ Minipage content - -> LaTeX -minipage Nothing ts = TeXEnv "minipage" [ FixArg ts ] -minipage (Just p) ts = TeXEnv "minipage" [ OptArg $ TeXRaw $ render p - , FixArg ts ] +-- | Minipage environment. +minipage :: LaTeXC l => + Maybe Pos -- ^ Optional position + -> l -- ^ Width + -> l -- ^ Minipage content + -> l +minipage Nothing = liftL2 $ \ts -> TeXEnv "minipage" [ FixArg ts ] +minipage (Just p) = liftL2 $ \ts -> TeXEnv "minipage" [ OptArg $ rendertex p , FixArg ts ] -abstract :: LaTeX -> LaTeX -abstract = TeXEnv "abstract" [] +-- | Figure environment. +figure :: LaTeXC l => + Maybe Pos -- ^ Optional position + -> l -- ^ Figure content + -> l +figure Nothing = liftL $ TeXEnv "figure" [] +figure (Just p) = liftL $ TeXEnv "figure" [ OptArg $ TeXRaw $ render p ] +abstract :: LaTeXC l => l -> l +abstract = liftL $ TeXEnv "abstract" [] + cite :: LaTeX -> LaTeX -cite l = TeXComm "cite" [FixArg l] +cite = liftL $ \l -> TeXComm "cite" [FixArg l] -- Document class @@ -372,10 +406,11 @@ instance Render PaperType where -- | Set the document class. Needed in all documents. -documentclass :: [ClassOption] -- ^ Class options - -> ClassName -- ^ Class name - -> LaTeX -documentclass opts cn = TeXComm "documentclass" [MOptArg $ fmap rendertex opts , FixArg $ fromString cn] +documentclass :: LaTeXC l => + [ClassOption] -- ^ Class options + -> ClassName -- ^ Class name + -> l +documentclass opts cn = fromLaTeX $ TeXComm "documentclass" [MOptArg $ fmap rendertex opts , FixArg $ fromString cn] article :: ClassName article = "article" @@ -487,324 +522,339 @@ openany :: ClassOption openany = OpenAny -document :: LaTeX -> LaTeX -document = TeXEnv "document" [] +document :: LaTeXC l => l -> l +document = liftL $ TeXEnv "document" [] -pagenumbering :: LaTeX -> LaTeX -pagenumbering l = TeXComm "pagenumbering" [FixArg l] +pagenumbering :: LaTeXC l => l -> l +pagenumbering = liftL $ \l -> TeXComm "pagenumbering" [FixArg l] -- | Arabic numerals. -arabic :: LaTeX -arabic = "arabic" +arabic :: LaTeXC l => l +arabic = fromLaTeX "arabic" -- | Lowercase roman numerals. -roman :: LaTeX -roman = "roman" +roman :: LaTeXC l => l +roman = fromLaTeX "roman" -- | Uppercase roman numerals. -roman_ :: LaTeX -roman_ = "Roman" +roman_ :: LaTeXC l => l +roman_ = fromLaTeX "Roman" -- | Lowercase letters. -alph :: LaTeX -alph = "alph" +alph :: LaTeXC l => l +alph = fromLaTeX "alph" -- | Uppercase letters. -alph_ :: LaTeX -alph_ = "Alph" +alph_ :: LaTeXC l => l +alph_ = fromLaTeX "Alph" -pagestyle :: LaTeX -> LaTeX -pagestyle l = TeXComm "pagestyle" [FixArg l] +pagestyle :: LaTeXC l => l -> l +pagestyle = liftL $ \l -> TeXComm "pagestyle" [FixArg l] thispagestyle :: LaTeX -> LaTeX -thispagestyle l = TeXComm "thispagestyle" [FixArg l] +thispagestyle = liftL $ \l -> TeXComm "thispagestyle" [FixArg l] -plain :: LaTeX -plain = "plain" +plain :: LaTeXC l => l +plain = fromLaTeX "plain" -headings :: LaTeX -headings = "headings" +headings :: LaTeXC l => l +headings = fromLaTeX "headings" -empty :: LaTeX -empty = "empty" +empty :: LaTeXC l => l +empty = fromLaTeX "empty" -myheadings :: LaTeX -myheadings = "myheadings" +myheadings :: LaTeXC l => l +myheadings = fromLaTeX "myheadings" -- | Used in conjunction with 'myheadings' for setting both the left and the right heading. -markboth :: LaTeX -> LaTeX -> LaTeX -markboth l1 l2 = TeXComm "markboth" [FixArg l1,FixArg l2] +markboth :: LaTeXC l => l -> l -> l +markboth = liftL2 $ \l1 l2 -> TeXComm "markboth" [FixArg l1 , FixArg l2] -- | Used in conjunction with 'myheadings' for setting the right heading. -markright :: LaTeX -> LaTeX -markright l = TeXComm "markright" [FixArg l] +markright :: LaTeXC l => l -> l +markright = liftL $ \l -> TeXComm "markright" [FixArg l] -- | Start a new line. In a 'tabular', it starts a new row, so use 'newline' instead. -lnbk :: LaTeX -lnbk = TeXNewLine False +lnbk :: LaTeXC l => l +lnbk = fromLaTeX $ TeXNewLine False -lnbk_ :: LaTeX -lnbk_ = TeXNewLine True +lnbk_ :: LaTeXC l => l +lnbk_ = fromLaTeX $ TeXNewLine True -hyp :: LaTeX -hyp = TeXCommS "-" +hyp :: LaTeXC l => l +hyp = fromLaTeX $ TeXCommS "-" -cleardoublepage :: LaTeX -cleardoublepage = TeXComm "cleardoublepage" [] +cleardoublepage :: LaTeXC l => l +cleardoublepage = comm0 "cleardoublepage" -clearpage :: LaTeX -clearpage = TeXComm "clearpage" [] +clearpage :: LaTeXC l => l +clearpage = comm0 "clearpage" -newpage :: LaTeX -newpage = TeXComm "newpage" [] +newpage :: LaTeXC l => l +newpage = comm0 "newpage" -linebreak :: LaTeX -> LaTeX -linebreak l = TeXComm "linebreak" [OptArg l] +linebreak :: LaTeXC l => l -> l +linebreak = liftL $ \l -> TeXComm "linebreak" [OptArg l] -nolinebreak :: LaTeX -> LaTeX -nolinebreak l = TeXComm "nolinebreak" [OptArg l] +nolinebreak :: LaTeXC l => l -> l +nolinebreak = liftL $ \l -> TeXComm "nolinebreak" [OptArg l] -nopagebreak :: LaTeX -> LaTeX -nopagebreak l = TeXComm "nopagebreak" [OptArg l] +nopagebreak :: LaTeXC l => l -> l +nopagebreak = liftL $ \l -> TeXComm "nopagebreak" [OptArg l] -pagebreak :: LaTeX -> LaTeX -pagebreak l = TeXComm "pagebreak" [OptArg l] +pagebreak :: LaTeXC l => l -> l +pagebreak = liftL $ \l -> TeXComm "pagebreak" [OptArg l] -hyphenation :: LaTeX -> LaTeX -hyphenation l = TeXComm "hyphenation" [FixArg l] +hyphenation :: LaTeXC l => l -> l +hyphenation = liftL $ \l -> TeXComm "hyphenation" [FixArg l] -mbox :: LaTeX -> LaTeX -mbox l = TeXComm "mbox" [FixArg l] +mbox :: LaTeXC l => l -> l +mbox = liftL $ \l -> TeXComm "mbox" [FixArg l] -fbox :: LaTeX -> LaTeX -fbox l = TeXComm "fbox" [FixArg l] +fbox :: LaTeXC l => l -> l +fbox = liftL $ \l -> TeXComm "fbox" [FixArg l] -today :: LaTeX -today = TeXComm "today" [] +today :: LaTeXC l => l +today = comm0 "today" -tex :: LaTeX -tex = TeXComm "TeX" [] +tex :: LaTeXC l => l +tex = comm0 "TeX" -laTeX2 :: LaTeX -laTeX2 = TeXComm "LaTeX" [] +laTeX2 :: LaTeXC l => l +laTeX2 = comm0 "LaTeX" -laTeXe :: LaTeX -laTeXe = TeXComm "LaTeXe" [] +laTeXe :: LaTeXC l => l +laTeXe = comm0 "LaTeXe" -- | Horizontal dots. -ldots :: LaTeX -ldots = TeXComm "ldots" [] +ldots :: LaTeXC l => l +ldots = comm0 "ldots" -- | Vertical dots. -vdots :: LaTeX -vdots = TeXComm "vdots" [] +vdots :: LaTeXC l => l +vdots = comm0 "vdots" -- | Diagonal dots. -ddots :: LaTeX -ddots = TeXComm "ddots" [] +ddots :: LaTeXC l => l +ddots = comm0 "ddots" -- | Quotation marks. -qts :: LaTeX -> LaTeX -qts l = raw "``" <> l <> raw "''" +qts :: LaTeXC l => l -> l +qts l = between l (raw "``") (raw "''") -footnote :: LaTeX -> LaTeX -footnote l = TeXComm "footnote" [FixArg l] +footnote :: LaTeXC l => l -> l +footnote = liftL $ \l -> TeXComm "footnote" [FixArg l] -linespread :: Float -> LaTeX -linespread f = TeXComm "linespread" [FixArg $ TeXRaw $ render f] +linespread :: LaTeXC l => Float -> l +linespread x = fromLaTeX $ TeXComm "linespread" [FixArg $ rendertex x] -indent :: LaTeX -indent = TeXComm "indent" [] +indent :: LaTeXC l => l +indent = comm0 "indent" -noindent :: LaTeX -noindent = TeXComm "noindent" [] +noindent :: LaTeXC l => l +noindent = comm0 "noindent" -hspace :: Measure -> LaTeX -hspace m = TeXComm "hspace" [FixArg $ TeXRaw $ render m] +hspace :: LaTeXC l => Measure -> l +hspace m = fromLaTeX $ TeXComm "hspace" [FixArg $ rendertex m] -hspace_ :: Measure -> LaTeX -hspace_ m = TeXComm "hspace*" [FixArg $ TeXRaw $ render m] +hspace_ :: LaTeXC l => Measure -> l +hspace_ m = fromLaTeX $ TeXComm "hspace*" [FixArg $ rendertex m] -stretch :: Int -> LaTeX -stretch n = TeXComm "stretch" [FixArg $ TeXRaw $ render n] +stretch :: LaTeXC l => Int -> l +stretch n = fromLaTeX $ TeXComm "stretch" [FixArg $ rendertex n] -vspace :: Measure -> LaTeX -vspace m = TeXComm "vspace" [FixArg $ TeXRaw $ render m] +vspace :: LaTeXC l => Measure -> l +vspace m = fromLaTeX $ TeXComm "vspace" [FixArg $ rendertex m] -protect :: LaTeX -> LaTeX -protect l = TeXCommS "protect" <> l +protect :: LaTeXC l => l -> l +protect l = commS "protect" <> l -textwidth :: LaTeX -textwidth = TeXComm "textwidth" [] +textwidth :: LaTeXC l => l +textwidth = comm0 "textwidth" -linewidth :: LaTeX -linewidth = TeXComm "linewidth" [] +linewidth :: LaTeXC l => l +linewidth = comm0 "linewidth" -verbatim :: LaTeX -> LaTeX -verbatim = TeXEnv "verbatim" [] +verbatim :: LaTeXC l => l -> l +verbatim = liftL $ TeXEnv "verbatim" [] -underline :: LaTeX -> LaTeX -underline l = TeXComm "underline" [FixArg l] +underline :: LaTeXC l => l -> l +underline = liftL $ \l -> TeXComm "underline" [FixArg l] -emph :: LaTeX -> LaTeX -emph l = TeXComm "emph" [FixArg l] +emph :: LaTeXC l => l -> l +emph = liftL $ \l -> TeXComm "emph" [FixArg l] -textrm :: LaTeX -> LaTeX -textrm l = TeXComm "textrm" [FixArg l] +textrm :: LaTeXC l => l -> l +textrm = liftL $ \l -> TeXComm "textrm" [FixArg l] -textsf :: LaTeX -> LaTeX -textsf l = TeXComm "textsf" [FixArg l] +textsf :: LaTeXC l => l -> l +textsf = liftL $ \l -> TeXComm "textsf" [FixArg l] -texttt :: LaTeX -> LaTeX -texttt l = TeXComm "texttt" [FixArg l] +-- | Set the given argument to monospaced font. +texttt :: LaTeXC l => l -> l +texttt = liftL $ \l -> TeXComm "texttt" [FixArg l] -textmd :: LaTeX -> LaTeX -textmd l = TeXComm "textmd" [FixArg l] +textmd :: LaTeXC l => l -> l +textmd = liftL $ \l -> TeXComm "textmd" [FixArg l] -textbf :: LaTeX -> LaTeX -textbf l = TeXComm "textbf" [FixArg l] +-- | Set the given argument to bold font face. +textbf :: LaTeXC l => l -> l +textbf = liftL $ \l -> TeXComm "textbf" [FixArg l] -textup :: LaTeX -> LaTeX -textup l = TeXComm "textup" [FixArg l] +textup :: LaTeXC l => l -> l +textup = liftL $ \l -> TeXComm "textup" [FixArg l] -textit :: LaTeX -> LaTeX -textit l = TeXComm "textit" [FixArg l] +-- Set the given argument to italic font face. +textit :: LaTeXC l => l -> l +textit = liftL $ \l -> TeXComm "textit" [FixArg l] -textsl :: LaTeX -> LaTeX -textsl l = TeXComm "textsl" [FixArg l] +textsl :: LaTeXC l => l -> l +textsl = liftL $ \l -> TeXComm "textsl" [FixArg l] -textsc :: LaTeX -> LaTeX -textsc l = TeXComm "textsc" [FixArg l] +-- | Set the given argument to small caps format. +textsc :: LaTeXC l => l -> l +textsc = liftL $ \l -> TeXComm "textsc" [FixArg l] -textnormal :: LaTeX -> LaTeX -textnormal l = TeXComm "textnormal" [FixArg l] +textnormal :: LaTeXC l => l -> l +textnormal = liftL $ \l -> TeXComm "textnormal" [FixArg l] -tiny :: LaTeX -> LaTeX -tiny l = TeXComm "tiny" [FixArg l] +tiny :: LaTeXC l => l -> l +tiny = liftL $ \l -> TeXComm "tiny" [FixArg l] -scriptsize :: LaTeX -> LaTeX -scriptsize l = TeXComm "scriptsize" [FixArg l] +scriptsize :: LaTeXC l => l -> l +scriptsize = liftL $ \l -> TeXComm "scriptsize" [FixArg l] -footnotesize :: LaTeX -> LaTeX -footnotesize l = TeXComm "footnotesize" [FixArg l] +footnotesize :: LaTeXC l => l -> l +footnotesize = liftL $ \l -> TeXComm "footnotesize" [FixArg l] -small :: LaTeX -> LaTeX -small l = TeXComm "small" [FixArg l] +small :: LaTeXC l => l -> l +small = liftL $ \l -> TeXComm "small" [FixArg l] -normalsize :: LaTeX -> LaTeX -normalsize l = TeXComm "normalsize" [FixArg l] +normalsize :: LaTeXC l => l -> l +normalsize = liftL $ \l -> TeXComm "normalsize" [FixArg l] -large :: LaTeX -> LaTeX -large l = TeXComm "large" [FixArg l] +large :: LaTeXC l => l -> l +large = liftL $ \l -> TeXComm "large" [FixArg l] -large2 :: LaTeX -> LaTeX -large2 l = TeXComm "Large" [FixArg l] +large2 :: LaTeXC l => l -> l +large2 = liftL $ \l -> TeXComm "Large" [FixArg l] -large3 :: LaTeX -> LaTeX -large3 l = TeXComm "LARGE" [FixArg l] +large3 :: LaTeXC l => l -> l +large3 = liftL $ \l -> TeXComm "LARGE" [FixArg l] -huge :: LaTeX -> LaTeX -huge l = TeXComm "huge" [FixArg l] +huge :: LaTeXC l => l -> l +huge = liftL $ \l -> TeXComm "huge" [FixArg l] -huge2 :: LaTeX -> LaTeX -huge2 l = TeXComm "Huge" [FixArg l] +huge2 :: LaTeXC l => l -> l +huge2 = liftL $ \l -> TeXComm "Huge" [FixArg l] -smallskip :: LaTeX -smallskip = TeXComm "smallskip" [] +smallskip :: LaTeXC l => l +smallskip = comm0 "smallskip" -bigskip :: LaTeX -bigskip = TeXComm "bigskip" [] +bigskip :: LaTeXC l => l +bigskip = comm0 "bigskip" -- | The 'tabular' environment can be used to typeset tables with optional horizontal and vertical lines. -tabular :: Maybe Pos -- ^ This optional parameter can be used to specify the vertical position of the table. - -- Defaulted to 'Center'. +tabular :: LaTeXC l => + Maybe Pos -- ^ This optional parameter can be used to specify the vertical position of the table. + -- Defaulted to 'Center'. -> [TableSpec] -- ^ Table specification of columns and vertical lines. - -> LaTeX -- ^ Table content. See '&', 'lnbk', 'hline' and 'cline'. - -> LaTeX -- ^ Resulting table syntax. -tabular Nothing ts = TeXEnv "tabular" [ FixArg $ TeXRaw $ renderAppend ts ] -tabular (Just p) ts = TeXEnv "tabular" [ OptArg $ TeXRaw $ render p , FixArg $ TeXRaw $ renderAppend ts ] + -> l -- ^ Table content. See '&', 'lnbk', 'hline' and 'cline'. + -> l -- ^ Resulting table syntax. +tabular Nothing ts = liftL $ TeXEnv "tabular" [ FixArg $ TeXRaw $ renderAppend ts ] +tabular (Just p) ts = liftL $ TeXEnv "tabular" [ OptArg $ TeXRaw $ render p , FixArg $ TeXRaw $ renderAppend ts ] -- | Column separator. -(&) :: LaTeX -> LaTeX -> LaTeX -(&) = TeXOp "&" +(&) :: LaTeXC l => l -> l -> l +(&) = liftL2 $ TeXOp "&" -- | Horizontal line. -hline :: LaTeX -hline = TeXCommS "hline " +hline :: LaTeXC l => l +hline = commS "hline " -- | @cline i j@ writes a partial horizontal line beginning in column @i@ and ending in column @j@. -cline :: Int -> Int -> LaTeX -cline i j = TeXComm "cline" [ FixArg $ TeXRaw $ render i <> "-" <> render j ] +cline :: LaTeXC l => Int -> Int -> l +cline i j = fromLaTeX $ TeXComm "cline" [ FixArg $ TeXRaw $ render i <> "-" <> render j ] -parbox :: Maybe Pos -> Measure -> LaTeX -> LaTeX -parbox Nothing w t = TeXComm "parbox" [ FixArg $ TeXRaw $ render w - , FixArg t] -parbox (Just p) w t = TeXComm "parbox" [ OptArg $ TeXRaw $ render p - , FixArg $ TeXRaw $ render w - , FixArg t] +parbox :: LaTeXC l => Maybe Pos -> Measure -> l -> l +parbox Nothing w = liftL $ \t -> TeXComm "parbox" [ FixArg $ rendertex w , FixArg t ] +parbox (Just p) w = liftL $ \t -> TeXComm "parbox" [ OptArg $ TeXRaw $ render p + , FixArg $ TeXRaw $ render w + , FixArg t ] -makebox :: Maybe Measure -> Maybe Pos -> LaTeX -> LaTeX -makebox Nothing Nothing t = TeXComm "makebox" [ FixArg t] -makebox Nothing (Just p) t = TeXComm "makebox" [ OptArg $ TeXRaw $ render p, FixArg t] -makebox (Just w) Nothing t = TeXComm "makebox" [ OptArg $ TeXRaw $ render w, FixArg t] -makebox (Just w) (Just p) t = TeXComm "makebox" [ OptArg $ TeXRaw $ render w - , OptArg $ TeXRaw $ render p - , FixArg t] +makebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> l -> l +makebox Nothing Nothing = liftL $ \t -> TeXComm "makebox" [ FixArg t ] +makebox (Just w) Nothing = liftL $ \t -> TeXComm "makebox" [ OptArg $ TeXRaw $ render w + , FixArg t ] +makebox Nothing (Just p) = liftL $ \t -> TeXComm "makebox" [ OptArg $ TeXRaw $ render p + , FixArg t ] +makebox (Just w) (Just p) = liftL $ \t -> TeXComm "makebox" [ OptArg $ TeXRaw $ render w + , OptArg $ TeXRaw $ render p + , FixArg t ] -framebox :: Maybe Measure -> Maybe Pos -> LaTeX -> LaTeX -framebox Nothing Nothing t = TeXComm "framebox" [ FixArg t] -framebox Nothing (Just p) t = TeXComm "framebox" [ OptArg $ TeXRaw $ render p, FixArg t] -framebox (Just w) Nothing t = TeXComm "framebox" [ OptArg $ TeXRaw $ render w, FixArg t] -framebox (Just w) (Just p) t = TeXComm "framebox" [ OptArg $ TeXRaw $ render w - , OptArg $ TeXRaw $ render p - , FixArg t] +framebox :: LaTeXC l => Maybe Measure -> Maybe Pos -> l -> l +framebox Nothing Nothing = liftL $ \t -> TeXComm "framebox" [ FixArg t ] +framebox (Just w) Nothing = liftL $ \t -> TeXComm "framebox" [ OptArg $ TeXRaw $ render w + , FixArg t ] +framebox Nothing (Just p) = liftL $ \t -> TeXComm "framebox" [ OptArg $ TeXRaw $ render p + , FixArg t ] +framebox (Just w) (Just p) = liftL $ \t -> TeXComm "framebox" [ OptArg $ TeXRaw $ render w + , OptArg $ TeXRaw $ render p + , FixArg t ] -raisebox :: Measure -> Maybe Measure -> Maybe Measure -> LaTeX -> LaTeX -raisebox l ma mb t = TeXComm "raisebox" $ - [ FixArg $ TeXRaw $ render l ] - ++ fmap (OptArg . TeXRaw . render) (catMaybes [ma,mb]) - ++ [ FixArg t ] +raisebox :: LaTeXC l => Measure -> Maybe Measure -> Maybe Measure -> l -> l +raisebox m ma mb = liftL $ \l -> TeXComm "raisebox" $ + [ FixArg $ rendertex m ] + ++ fmap (OptArg . rendertex) (catMaybes [ma,mb]) + ++ [ FixArg l ] -- | Produce a simple black box. -rule :: Maybe Measure -- ^ Optional lifting. +rule :: LaTeXC l => + Maybe Measure -- ^ Optional lifting. -> Measure -- ^ Width. -> Measure -- ^ Height. - -> LaTeX -rule Nothing w h = TeXComm "rule" [ FixArg $ TeXRaw $ render w - , FixArg $ TeXRaw $ render h ] -rule (Just l) w h = TeXComm "rule" [ OptArg $ TeXRaw $ render l - , FixArg $ TeXRaw $ render w - , FixArg $ TeXRaw $ render h ] + -> l +rule Nothing w h = fromLaTeX $ TeXComm "rule" [ FixArg $ TeXRaw $ render w + , FixArg $ TeXRaw $ render h ] +rule (Just l) w h = fromLaTeX $ TeXComm "rule" [ OptArg $ TeXRaw $ render l + , FixArg $ TeXRaw $ render w + , FixArg $ TeXRaw $ render h ] -- HaTeX specific symbols -- | Print the HaTeX logo. -hatex :: LaTeX -hatex = "H" +hatex :: LaTeXC l => l +hatex = mbox $ "H" <> hspace (Ex $ negate 0.3) <> textsc "a" <> hspace (Ex $ negate 0.3) <> tex -- | Print the HaTeX 3 logo. -hatex3 :: LaTeX +hatex3 :: LaTeXC l => l hatex3 = hatex <> emph (textbf "3") -- | Print the HaTeX-meta logo. -hatex_meta :: LaTeX +hatex_meta :: LaTeXC l => l hatex_meta = hatex <> emph (textsc "-meta") -- | Print the HaTeX logo, beside the complete version number. -hatex_version :: LaTeX -hatex_version = hatex3 +hatex_version :: LaTeXC l => l +hatex_version = hatex + <> emph (textbf $ rendertex x) <> hspace (Ex $ negate 0.3) - <> emph ".2.0.1" + <> emph ("." <> fromString (intercalate "." $ fmap show xs)) + where + (x:xs) = versionBranch version -label :: Label -> LaTeX -label l = TeXComm "label" [FixArg $ TeXRaw $ render l] +caption :: LaTeXC l => l -> l +caption = liftL $ \l -> TeXComm "caption" [FixArg l] -ref :: Label -> LaTeX -ref l = TeXComm "ref" [FixArg $ TeXRaw $ render l] +label :: LaTeXC l => l -> l +label = liftL $ \l -> TeXComm "label" [FixArg $ TeXRaw $ render l] -pageref :: Label -> LaTeX -pageref l = TeXComm "pageref" [FixArg $ TeXRaw $ render l] +ref :: LaTeXC l => l -> l +ref = liftL $ \l -> TeXComm "ref" [FixArg $ TeXRaw $ render l] + +pageref :: LaTeXC l => l -> l +pageref = liftL $ \l -> TeXComm "pageref" [FixArg $ TeXRaw $ render l]
− Text/LaTeX/Base/Commands/Monad.hs
@@ -1,1054 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | LaTeX standard commands and environments. --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Base.Commands" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Base.Commands.Monad - ( -- * Basic functions - raw , between - -- * Preamble commands - , title - , author - , date - , institute - , thanks - , documentclass - , usepackage - , linespread - -- ** Classes - -- *** Document classes - , article - , proc - , report - , minimal - , book - , slides - -- *** Class options - , ClassOption (..) - , customopt - , draft - , titlepage - , notitlepage - , onecolumn - , twocolumn - , oneside - , twoside - , landscape - , openright - , openany - , fleqn - , leqno - -- ** Paper sizes - , PaperType (..) - , a0paper - , a1paper - , a2paper - , a3paper - , a4paper - , a5paper - , a6paper - , b0paper - , b1paper - , b2paper - , b3paper - , b4paper - , b5paper - , b6paper - , letterpaper - , executivepaper - , legalpaper - -- ** Page styles - , pagestyle - , thispagestyle - , plain - , headings - , empty - , myheadings - , markboth - , markright - -- * Body commands - , document - , maketitle - -- ** Document structure - , tableofcontents - , abstract - , appendix - -- *** Sections - , part - , chapter - , section - , subsection - , subsubsection - , paragraph - , subparagraph - -- ** Logos & symbols - , today - , tex - , latex - , laTeX2 - , laTeXe - , ldots - , vdots - , ddots - -- *** HaTeX specific - , hatex - , hatex3 - , hatex_meta - , hatex_version - -- ** Document layout - , par - , newline - , lnbk - , lnbk_ - , newpage - , cleardoublepage - , clearpage - , linebreak - , nolinebreak - , pagebreak - , nopagebreak - , hspace - , hspace_ - , vspace - , stretch - , smallskip - , bigskip - , indent - , noindent - -- *** Document measures - , textwidth - , linewidth - -- ** Formatting text - , verbatim - -- *** Fonts - , textbf - , textit - , texttt - , textrm - , textsf - , textmd - , textup - , textsl - , textsc - , textnormal - , underline - , emph - -- *** Sizes - , tiny - , scriptsize - , footnotesize - , small - , normalsize - , large - , large2 - , large3 - , huge - , huge2 - -- ** Environments - , equation - , equation_ - , enumerate - , itemize - , item - , flushleft - , flushright - , center - , quote - , verse - , cite - , description - , minipage - -- ** Page numbering - , pagenumbering - , arabic - , roman - , roman_ - , alph - , alph_ - -- ** Boxes - , mbox - , fbox - , parbox - , framebox - , makebox - , raisebox - , rule - -- * Cross references - , label - , ref - , pageref - -- ** Tables - , tabular - , (&) - , hline - , cline - -- ** Others - , footnote - , protect - , hyphenation - , hyp - , qts - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Base.Commands as App -import Text.LaTeX.Base.Commands(ClassOption,PaperType) - -{-| -Insert a raw piece of 'Text'. - This functions doesn't care about @LaTeX@ reserved characters, - it insert the text just as it is received. --} -raw :: (Monad m) => Text -> LaTeXT_ m -raw a1 = do textell ( App.raw a1) - -{-| -Calling 'between' @c l1 l2@ puts @c@ between @l1@ and @l2@ and - appends them. --} -between :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -between a1 a2 a3 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - a3 <- extractLaTeX_ a3 - textell ( App.between a1 a2 a3) - -{-| -Generate the title. It normally contains the 'title' name - of your document, the 'author'(s) and 'date'. --} -maketitle :: (Monad m) => LaTeXT_ m -maketitle = do textell ( App.maketitle) - --- | Set the title of your document. - -title :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -title a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.title a1) - --- | Set a date for your document. - -date :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -date a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.date a1) - --- | Set the author(s) of the document. - -author :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -author a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.author a1) - -{-| -Set either an institute or an organization - for the document. --} -institute :: (Monad m) => Maybe (LaTeXT_ m) -> LaTeXT_ m -> LaTeXT_ m -institute a1 a2 - = do a1 <- maybe (return Nothing) - ((>>= return . Just) . extractLaTeX_) - a1 - a2 <- extractLaTeX_ a2 - textell ( App.institute a1 a2) - - -thanks :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -thanks a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.thanks a1) - -{-| -Import a package. First argument is a list of options for - the package named in the second argument. --} -usepackage :: (Monad m) => [LaTeXT_ m] -> PackageName -> LaTeXT_ m -usepackage a1 a2 - = do a1 <- mapM extractLaTeX_ a1 - textell ( App.usepackage a1 a2) - --- | The @LaTeX@ logo. - -latex :: (Monad m) => LaTeXT_ m -latex = do textell ( App.latex) - --- | Start a new paragraph - -par :: (Monad m) => LaTeXT_ m -par = do textell ( App.par) - --- | Start a new line. - -newline :: (Monad m) => LaTeXT_ m -newline = do textell ( App.newline) - - -part :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -part a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.part a1) - - -chapter :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -chapter a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.chapter a1) - --- | Start a new section with a given title. - -section :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -section a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.section a1) - - -subsection :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -subsection a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.subsection a1) - - -subsubsection :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -subsubsection a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.subsubsection a1) - - -paragraph :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -paragraph a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.paragraph a1) - - -subparagraph :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -subparagraph a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.subparagraph a1) - -{-| -Create the table of contents, automatically generated - from your 'section's, 'subsection's, and other related stuff. --} -tableofcontents :: (Monad m) => LaTeXT_ m -tableofcontents = do textell ( App.tableofcontents) - - -appendix :: (Monad m) => LaTeXT_ m -appendix = do textell ( App.appendix) - - -item :: (Monad m) => Maybe (LaTeXT_ m) -> LaTeXT_ m -item a1 - = do a1 <- maybe (return Nothing) - ((>>= return . Just) . extractLaTeX_) - a1 - textell ( App.item a1) - - -equation :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -equation a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.equation a1) - - -equation_ :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -equation_ a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.equation_ a1) - - -enumerate :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -enumerate a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.enumerate a1) - - -itemize :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -itemize a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.itemize a1) - - -description :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -description a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.description a1) - - -flushleft :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -flushleft a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.flushleft a1) - - -flushright :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -flushright a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.flushright a1) - - -center :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -center a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.center a1) - - -quote :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -quote a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.quote a1) - - -verse :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -verse a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.verse a1) - --- | Minipage environments. - -minipage :: (Monad m) => Maybe Pos -> LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -minipage a1 a2 a3 - = do a2 <- extractLaTeX_ a2 - a3 <- extractLaTeX_ a3 - textell ( App.minipage a1 a2 a3) - - -abstract :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -abstract a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.abstract a1) - - -cite :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -cite a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.cite a1) - - -customopt :: String -> ClassOption -customopt = App.customopt - --- | Set the document class. Needed in all documents. - -documentclass :: (Monad m) => [ClassOption] -> ClassName -> LaTeXT_ m -documentclass a1 a2 = do textell ( App.documentclass a1 a2) - - -article :: ClassName -article = App.article - - -proc :: ClassName -proc = App.proc - - -minimal :: ClassName -minimal = App.minimal - - -report :: ClassName -report = App.report - - -book :: ClassName -book = App.book - - -slides :: ClassName -slides = App.slides - - -a0paper :: ClassOption -a0paper = App.a0paper - - -a1paper :: ClassOption -a1paper = App.a1paper - - -a2paper :: ClassOption -a2paper = App.a2paper - - -a3paper :: ClassOption -a3paper = App.a3paper - - -a4paper :: ClassOption -a4paper = App.a4paper - - -a5paper :: ClassOption -a5paper = App.a5paper - - -a6paper :: ClassOption -a6paper = App.a6paper - - -b0paper :: ClassOption -b0paper = App.b0paper - - -b1paper :: ClassOption -b1paper = App.b1paper - - -b2paper :: ClassOption -b2paper = App.b2paper - - -b3paper :: ClassOption -b3paper = App.b3paper - - -b4paper :: ClassOption -b4paper = App.b4paper - - -b5paper :: ClassOption -b5paper = App.b5paper - - -b6paper :: ClassOption -b6paper = App.b6paper - - -letterpaper :: ClassOption -letterpaper = App.letterpaper - - -executivepaper :: ClassOption -executivepaper = App.executivepaper - - -legalpaper :: ClassOption -legalpaper = App.legalpaper - - -draft :: ClassOption -draft = App.draft - --- | Typesets displayed formulae left-aligned instead of centred. - -fleqn :: ClassOption -fleqn = App.fleqn - --- | Places the numbering of formulae on the left hand side instead of the right. - -leqno :: ClassOption -leqno = App.leqno - - -titlepage :: ClassOption -titlepage = App.titlepage - - -notitlepage :: ClassOption -notitlepage = App.notitlepage - - -onecolumn :: ClassOption -onecolumn = App.onecolumn - - -twocolumn :: ClassOption -twocolumn = App.twocolumn - - -oneside :: ClassOption -oneside = App.oneside - - -twoside :: ClassOption -twoside = App.twoside - --- | Changes the layout of the document to print in landscape mode - -landscape :: ClassOption -landscape = App.landscape - --- | Makes chapters begin either only on right hand pages - -openright :: ClassOption -openright = App.openright - --- | Makes chapters begin on the next page available. - -openany :: ClassOption -openany = App.openany - - -document :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -document a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.document a1) - - -pagenumbering :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -pagenumbering a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.pagenumbering a1) - --- | Arabic numerals. - -arabic :: (Monad m) => LaTeXT_ m -arabic = do textell ( App.arabic) - --- | Lowercase roman numerals. - -roman :: (Monad m) => LaTeXT_ m -roman = do textell ( App.roman) - --- | Uppercase roman numerals. - -roman_ :: (Monad m) => LaTeXT_ m -roman_ = do textell ( App.roman_) - --- | Lowercase letters. - -alph :: (Monad m) => LaTeXT_ m -alph = do textell ( App.alph) - --- | Uppercase letters. - -alph_ :: (Monad m) => LaTeXT_ m -alph_ = do textell ( App.alph_) - - -pagestyle :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -pagestyle a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.pagestyle a1) - - -thispagestyle :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -thispagestyle a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.thispagestyle a1) - - -plain :: (Monad m) => LaTeXT_ m -plain = do textell ( App.plain) - - -headings :: (Monad m) => LaTeXT_ m -headings = do textell ( App.headings) - - -empty :: (Monad m) => LaTeXT_ m -empty = do textell ( App.empty) - - -myheadings :: (Monad m) => LaTeXT_ m -myheadings = do textell ( App.myheadings) - --- | Used in conjunction with 'myheadings' for setting both the left and the right heading. - -markboth :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -markboth a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( App.markboth a1 a2) - --- | Used in conjunction with 'myheadings' for setting the right heading. - -markright :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -markright a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.markright a1) - --- | Start a new line. In a 'tabular', it starts a new row, so use 'newline' instead. - -lnbk :: (Monad m) => LaTeXT_ m -lnbk = do textell ( App.lnbk) - - -lnbk_ :: (Monad m) => LaTeXT_ m -lnbk_ = do textell ( App.lnbk_) - - -hyp :: (Monad m) => LaTeXT_ m -hyp = do textell ( App.hyp) - - -cleardoublepage :: (Monad m) => LaTeXT_ m -cleardoublepage = do textell ( App.cleardoublepage) - - -clearpage :: (Monad m) => LaTeXT_ m -clearpage = do textell ( App.clearpage) - - -newpage :: (Monad m) => LaTeXT_ m -newpage = do textell ( App.newpage) - - -linebreak :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -linebreak a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.linebreak a1) - - -nolinebreak :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -nolinebreak a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.nolinebreak a1) - - -nopagebreak :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -nopagebreak a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.nopagebreak a1) - - -pagebreak :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -pagebreak a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.pagebreak a1) - - -hyphenation :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -hyphenation a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.hyphenation a1) - - -mbox :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mbox a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mbox a1) - - -fbox :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -fbox a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.fbox a1) - - -today :: (Monad m) => LaTeXT_ m -today = do textell ( App.today) - - -tex :: (Monad m) => LaTeXT_ m -tex = do textell ( App.tex) - - -laTeX2 :: (Monad m) => LaTeXT_ m -laTeX2 = do textell ( App.laTeX2) - - -laTeXe :: (Monad m) => LaTeXT_ m -laTeXe = do textell ( App.laTeXe) - --- | Horizontal dots. - -ldots :: (Monad m) => LaTeXT_ m -ldots = do textell ( App.ldots) - --- | Vertical dots. - -vdots :: (Monad m) => LaTeXT_ m -vdots = do textell ( App.vdots) - --- | Diagonal dots. - -ddots :: (Monad m) => LaTeXT_ m -ddots = do textell ( App.ddots) - --- | Quotation marks. - -qts :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -qts a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.qts a1) - - -footnote :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -footnote a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.footnote a1) - - -linespread :: (Monad m) => Float -> LaTeXT_ m -linespread a1 = do textell ( App.linespread a1) - - -indent :: (Monad m) => LaTeXT_ m -indent = do textell ( App.indent) - - -noindent :: (Monad m) => LaTeXT_ m -noindent = do textell ( App.noindent) - - -hspace :: (Monad m) => Measure -> LaTeXT_ m -hspace a1 = do textell ( App.hspace a1) - - -hspace_ :: (Monad m) => Measure -> LaTeXT_ m -hspace_ a1 = do textell ( App.hspace_ a1) - - -stretch :: (Monad m) => Int -> LaTeXT_ m -stretch a1 = do textell ( App.stretch a1) - - -vspace :: (Monad m) => Measure -> LaTeXT_ m -vspace a1 = do textell ( App.vspace a1) - - -protect :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -protect a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.protect a1) - - -textwidth :: (Monad m) => LaTeXT_ m -textwidth = do textell ( App.textwidth) - - -linewidth :: (Monad m) => LaTeXT_ m -linewidth = do textell ( App.linewidth) - - -verbatim :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -verbatim a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.verbatim a1) - - -underline :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -underline a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.underline a1) - - -emph :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -emph a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.emph a1) - - -textrm :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textrm a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textrm a1) - - -textsf :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textsf a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textsf a1) - - -texttt :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -texttt a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.texttt a1) - - -textmd :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textmd a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textmd a1) - - -textbf :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textbf a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textbf a1) - - -textup :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textup a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textup a1) - - -textit :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textit a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textit a1) - - -textsl :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textsl a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textsl a1) - - -textsc :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textsc a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textsc a1) - - -textnormal :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -textnormal a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.textnormal a1) - - -tiny :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -tiny a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.tiny a1) - - -scriptsize :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -scriptsize a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.scriptsize a1) - - -footnotesize :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -footnotesize a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.footnotesize a1) - - -small :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -small a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.small a1) - - -normalsize :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -normalsize a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.normalsize a1) - - -large :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -large a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.large a1) - - -large2 :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -large2 a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.large2 a1) - - -large3 :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -large3 a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.large3 a1) - - -huge :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -huge a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.huge a1) - - -huge2 :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -huge2 a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.huge2 a1) - - -smallskip :: (Monad m) => LaTeXT_ m -smallskip = do textell ( App.smallskip) - - -bigskip :: (Monad m) => LaTeXT_ m -bigskip = do textell ( App.bigskip) - --- | The 'tabular' environment can be used to typeset tables with optional horizontal and vertical lines. - -tabular :: (Monad m) => Maybe Pos -> [TableSpec] -> LaTeXT_ m -> LaTeXT_ m -tabular a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.tabular a1 a2 a3) - - -(&) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(&) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.&) a1 a2) - --- | Horizontal line. - -hline :: (Monad m) => LaTeXT_ m -hline = do textell ( App.hline) - --- | @cline i j@ writes a partial horizontal line beginning in column @i@ and ending in column @j@. - -cline :: (Monad m) => Int -> Int -> LaTeXT_ m -cline a1 a2 = do textell ( App.cline a1 a2) - - -parbox :: (Monad m) => Maybe Pos -> Measure -> LaTeXT_ m -> LaTeXT_ m -parbox a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.parbox a1 a2 a3) - - -makebox :: (Monad m) => Maybe Measure -> Maybe Pos -> LaTeXT_ m -> LaTeXT_ m -makebox a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.makebox a1 a2 a3) - - -framebox :: (Monad m) => Maybe Measure -> Maybe Pos -> LaTeXT_ m -> LaTeXT_ m -framebox a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.framebox a1 a2 a3) - - -raisebox :: (Monad m) => - Measure -> Maybe Measure -> Maybe Measure -> LaTeXT_ m -> LaTeXT_ m -raisebox a1 a2 a3 a4 - = do a4 <- extractLaTeX_ a4 - textell ( App.raisebox a1 a2 a3 a4) - --- | Produce a simple black box. - -rule :: (Monad m) => Maybe Measure -> Measure -> Measure -> LaTeXT_ m -rule a1 a2 a3 = do textell ( App.rule a1 a2 a3) - --- | Print the HaTeX logo. - -hatex :: (Monad m) => LaTeXT_ m -hatex = do textell ( App.hatex) - --- | Print the HaTeX 3 logo. - -hatex3 :: (Monad m) => LaTeXT_ m -hatex3 = do textell ( App.hatex3) - --- | Print the HaTeX-meta logo. - -hatex_meta :: (Monad m) => LaTeXT_ m -hatex_meta = do textell ( App.hatex_meta) - --- | Print the HaTeX logo, beside the complete version number. - -hatex_version :: (Monad m) => LaTeXT_ m -hatex_version = do textell ( App.hatex_version) - - -label :: (Monad m) => Label -> LaTeXT_ m -label a1 = do textell ( App.label a1) - - -ref :: (Monad m) => Label -> LaTeXT_ m -ref a1 = do textell ( App.ref a1) - - -pageref :: (Monad m) => Label -> LaTeXT_ m -pageref a1 = do textell ( App.pageref a1) - -
− Text/LaTeX/Base/Monad.hs
@@ -1,67 +0,0 @@- -{- | -This module exports those minimal things you need -to work with HaTeX. Those things are: - -* The 'LaTeX' datatype. - -* The '<>' operator, to append 'LaTeX' values. - -* The "Text.LaTeX.Base.Render" module, to render a 'LaTeX' value into 'Text'. - -* The "Text.LaTeX.Base.Types" module, which contains several types used by - other modules. - -* The "Text.LaTeX.Base.Writer" module, needed to run the 'LaTeXT' monad, and - obtain a result of type 'LaTeX'. - -* The "Text.LaTeX.Base.Commands.Monad" module, which exports the LaTeX standard commands - and environments. - -Here is also defined a 'Num' instance for 'LaTeXT'. --} -module Text.LaTeX.Base.Monad - ( LaTeX , (<>) - , module Text.LaTeX.Base.Render - , module Text.LaTeX.Base.Types - , module Text.LaTeX.Base.Writer - , module Text.LaTeX.Base.Commands.Monad - ) where - -import Text.LaTeX.Base.Syntax (LaTeX,(<>)) -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Commands.Monad --- Import LaTeX Num instance -import Text.LaTeX.Base () --- Import 'lift' function -import Control.Monad.Trans.Class (lift) - --- Num instance for LaTeXT - --- Sadly, we need 'Show' and 'Eq' instances for LaTeXT in order --- to do its 'Num' instance. - --- | Don't use it! This instance only exists in order to --- define a 'Num' instance to 'LaTeXT'. -instance Show (LaTeXT m a) where - show _ = error "Cannot use \"show\" Show method with a LaTeXT value." - --- | Don't use it! This instance only exists in order to --- define a 'Num' instance to 'LaTeXT'. -instance Eq (LaTeXT m a) where - _ == _ = error "Cannot use \"(==)\" Eq method with a LaTeXT value." - --- | Be careful when using 'fromInteger' over a 'LaTeXT' value, --- the returned value of the computation is bottom (i.e. 'undefined'). --- Methods 'abs' and 'signum' are undefined. Don't use them! -instance Monad m => Num (LaTeXT m a) where - (+) = liftOp (+) - (-) = liftOp (-) - (*) = (>>) - negate = liftFun negate - fromInteger = fromString . show - -- Non-defined methods - abs _ = "Cannot use \"abs\" Num method with a LaTeXT value." - signum _ = "Cannot use \"signum\" Num method with a LaTeXT value."
Text/LaTeX/Base/Render.hs view
@@ -16,8 +16,9 @@ , readFileTex ) where -import Data.Text (Text) +import Data.Text (Text,lines,unlines) import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Data.String import Data.Monoid (Monoid (..)) import qualified Data.Text.IO as T @@ -27,7 +28,8 @@ -- | Class of values that can be transformed to 'Text'. -- You mainly will use this to obtain the 'Text' output --- of a 'LaTeX' value. +-- of a 'LaTeX' value. If you are going to write the result +-- in a file, consider to use 'renderFile'. class Show a => Render a where render :: a -> Text -- @@ -38,7 +40,7 @@ renderAppend = mconcat . fmap render -- | Render every element of a list and append results, --- separated the given 'Char'. +-- separated by the given 'Char'. renderChars :: Render a => Char -> [a] -> Text renderChars c = mconcat . intersperse (fromString [c]) . fmap render @@ -63,9 +65,10 @@ -- insert that 'Text' in your 'LaTeX' code. -- That is what this function does. -- --- /Warning: /'rendertex'/ does not escape LaTeX reserver characters./ -rendertex :: Render a => a -> LaTeX -rendertex = TeXRaw . render +-- /Warning: /'rendertex'/ does not escape LaTeX reserved characters./ +-- /Use /'protectText'/ to escape them./ +rendertex :: (Render a,LaTeXC l) => a -> l +rendertex = fromLaTeX . TeXRaw . render -- LaTeX instances @@ -90,6 +93,9 @@ render (TeXNewLine b) = " \\\\" <> ( if b then "*" else mempty ) <> " " render (TeXOp sym l1 l2) = render l1 <> fromString sym <> render l2 render (TeXBraces l) = "{" <> render l <> "}" + render (TeXComment c) = + let xs = Data.Text.lines c + in (" " <>) $ Data.Text.unlines $ fmap ("% " <>) xs render (TeXSeq l1 l2) = render l1 <> render l2 render TeXEmpty = mempty @@ -97,15 +103,13 @@ render (OptArg l) = "[" <> render l <> "]" render (FixArg l) = "{" <> render l <> "}" render (MOptArg []) = mempty - render (MOptArg ls) = - fromString "[" - <> renderCommas ls - <> fromString "]" + render (MOptArg ls) = "[" <> renderCommas ls <> "]" render (SymArg l) = "<" <> render l <> ">" render (MSymArg ls) = "<" <> renderCommas ls <> ">" -- Other instances instance Render Int where +instance Render Integer where instance Render Float where - +instance Render Double where
Text/LaTeX/Base/Syntax.hs view
@@ -9,16 +9,16 @@ LaTeX (..) , TeXArg (..) , (<>) - -- * Utils - , braces - , comm + -- * Escaping reserved characters + , protectString + , protectText ) where -import Data.Text (Text) +import Data.Text (Text,concatMap) import Data.Monoid import Data.String --- | A 'LaTeX' object represents some expression written in LaTeX. +-- | Type of @LaTeX@ blocks. data LaTeX = TeXRaw Text -- ^ Raw text. | TeXComm String [TeXArg] -- ^ Constructor for commands. @@ -32,11 +32,12 @@ | TeXMath LaTeX -- ^ Mathematical expressions. | TeXNewLine Bool -- ^ Newline character. | TeXOp String LaTeX LaTeX -- ^ Operators. - | TeXBraces LaTeX -- A expression between braces. + | TeXBraces LaTeX -- ^ A expression between braces. + | TeXComment Text -- ^ Comments. | TeXSeq LaTeX LaTeX -- ^ Sequencing of 'LaTeX' expressions. -- Use '<>' preferably. - | TeXEmpty -- ^ An empty expression. - -- Neutral element of '<>'. + | TeXEmpty -- ^ An empty block. + -- /Neutral element/ of '<>'. deriving (Eq,Show) -- | An argument for a 'LaTeX' command or environment. @@ -57,7 +58,7 @@ mappend x TeXEmpty = x mappend x y = TeXSeq x y --- Since GHC starting from 7.4 provides (<>) as synonym to 'mappend', +-- Since GHC starting from 7.4 provides (<>) as synonym to 'mappend' (see "Data.Monoid"), -- we avoid an overlapping definition with a CPP conditional. #if __GLASGOW_HASKELL__ < 704 -- | Alias for 'mappend'. @@ -65,7 +66,7 @@ (<>) = mappend #endif --- | Method 'fromString' escapes LaTeX reserved characters. +-- | Method 'fromString' escapes LaTeX reserved characters using 'protectString'. instance IsString LaTeX where fromString = TeXRaw . fromString . protectString @@ -73,6 +74,10 @@ protectString :: String -> String protectString = mconcat . fmap protectChar +-- | Escape LaTeX reserved characters in a 'Text'. +protectText :: Text -> Text +protectText = Data.Text.concatMap (fromString . protectChar) + protectChar :: Char -> String protectChar '#' = "\\#" protectChar '$' = "\\$" @@ -84,15 +89,4 @@ protectChar '~' = "\\~{}" protectChar '\\' = "\\textbackslash{}" protectChar '_' = "\\_{}" -protectChar x = [x] - ----- UTILS - --- | Alias for 'TeXBraces'. -braces :: LaTeX -> LaTeX -braces = TeXBraces - --- | A simple (without arguments) command generator, --- given the name of the command. -comm :: String -> LaTeX -comm str = TeXComm str []+protectChar x = [x]
Text/LaTeX/Base/Types.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} +-- | Some types shared along the library. module Text.LaTeX.Base.Types ( ClassName , PackageName @@ -17,6 +18,7 @@ -- | Class names are represented by a 'String'. type ClassName = String +-- | Package names are represented by a 'String'. type PackageName = String newtype Label = Label String deriving (Eq, Show) @@ -33,6 +35,7 @@ instance IsString Label where fromString = createLabel +-- | A vertical position. data Pos = Bottom | Center | Top deriving Show instance Render Pos where
Text/LaTeX/Base/Writer.hs view
@@ -1,6 +1,34 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} +-- | The writer monad applied to 'LaTeX' values. Useful to compose 'LaTeX' values +-- using the @do@ notation: +-- +-- > anExample :: Monad m => LaTeXT m () +-- > anExample = do +-- > documentclass [] article +-- > author "Daniel Monad" +-- > title "LaTeX and do notation" +-- > document $ do +-- > maketitle +-- > section "Some words" +-- > "Using " ; texttt "do" ; " notation " +-- > "you avoid many ocurrences of the " +-- > texttt "(<>)" ; " operator and a lot of " +-- > "parentheses. With the cost of a monad." +-- +-- Since 'LaTeXT' is a monad transformer, you can do also: +-- +-- > anotherExample :: Monad m => LaTeXT m () +-- > anotherExample = lift (readFile "foo") >>= verbatim . fromString +-- +-- This way, it is easy (without carrying arguments) to include IO outputs +-- in the LaTeX document, like files, times or random objects. +-- +-- Another approach could be to have custom counters, label management +-- or any other user-defined feature. +-- +-- Of course, you can always use the simpler interface provided by the plain 'LaTeX' type. module Text.LaTeX.Base.Writer ( -- * @LaTeXT@ writer LaTeXT @@ -11,8 +39,10 @@ , extractLaTeX , extractLaTeX_ , textell + , rendertexM , liftFun , liftOp + , merror -- * Re-export , lift ) where @@ -24,8 +54,10 @@ import Control.Applicative import Control.Arrow import Data.String +import Data.Monoid -- import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Warnings (Warning,checkAll,check) -- @@ -38,6 +70,9 @@ instance MonadTrans LaTeXT where lift = LaTeXT . lift +instance Monad m => LaTeXC (LaTeXT m a) where + liftListL f xs = mapM extractLaTeX_ xs >>= merror "liftListL" . textell . f + type LaTeXT_ m = LaTeXT m () runLaTeXT :: LaTeXT m a -> m (a,LaTeX) @@ -96,9 +131,25 @@ textell l' return a +-- | Just like 'rendertex', but with 'LaTeXT' output. +-- +-- > rendertexM = textell . rendertex +rendertexM :: (Render a, Monad m) => a -> LaTeXT_ m +rendertexM = textell . rendertex + +-- Error throwing + +merror :: Monad m => String -> LaTeXT m a -> LaTeXT m b +merror = flip (>>) . return . error + -- Overloaded Strings -- | Be careful when using 'fromString' over a 'LaTeXT' value, -- the returned value of the computation is bottom (i.e. 'undefined'). instance Monad m => IsString (LaTeXT m a) where fromString = (>> return undefined) . textell . fromString + +-- | 'mappend' @=@ '>>'. +instance Monad m => Monoid (LaTeXT m a) where + mempty = return undefined + mappend = (>>)
− Text/LaTeX/Monad.hs
@@ -1,13 +0,0 @@- --- | This module is a re-export of the main modules. --- Importing this will you give access to almost all --- functionality of the library. It is recommended --- to import the @Base@ module and, then, import only --- packages you will need. -module Text.LaTeX.Monad - ( module Text.LaTeX.Base.Monad - , module Text.LaTeX.Packages.Monad - ) where - -import Text.LaTeX.Base.Monad -import Text.LaTeX.Packages.Monad
Text/LaTeX/Packages.hs view
@@ -1,4 +1,5 @@ +-- | Re-export of all packages. module Text.LaTeX.Packages ( -- * Encoding packages module Text.LaTeX.Packages.Inputenc
Text/LaTeX/Packages/AMSFonts.hs view
@@ -1,6 +1,4 @@ -{-# OPTIONS_HATEX MakeMonadic #-} - module Text.LaTeX.Packages.AMSFonts ( -- * AMSFonts package amsfonts @@ -9,6 +7,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Types -- | AMSFonts package. @@ -25,6 +24,10 @@ -- -- > "The set of real numbers are represented by " <> mathbb "R" <> "." -- +-- Or in monadic form: +-- +-- > "The set of real numbers are represented by " >> mathbb "R" >> "." +-- -- /Note the use of overloaded strings./ -mathbb :: LaTeX -> LaTeX -mathbb l = TeXComm "mathbb" [FixArg l] +mathbb :: LaTeXC l => l -> l +mathbb = liftL $ \l -> TeXComm "mathbb" [FixArg l]
− Text/LaTeX/Packages/AMSFonts/Monad.hs
@@ -1,46 +0,0 @@- --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.AMSFonts" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.AMSFonts.Monad - ( -- * AMSFonts package - amsfonts - -- * Fonts - , mathbb - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.AMSFonts as App -import Text.LaTeX.Packages.AMSFonts() - -{-| -AMSFonts package. - Example: - -> usepackage [] amsfonts - --} -amsfonts :: ClassName -amsfonts = App.amsfonts - -{-| -This font is useful for representing sets like - R (real numbers) or Z (integers). For instance: - -> "The set of real numbers are represented by " <> mathbb "R" <> "." - -/Note the use of overloaded strings./ --} -mathbb :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathbb a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathbb a1) - -
Text/LaTeX/Packages/AMSMath.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} module Text.LaTeX.Packages.AMSMath ( -- * AMSMath package @@ -56,6 +55,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Commands (raw,between) import Text.LaTeX.Base.Types @@ -67,251 +67,253 @@ amsmath = "amsmath" -- | Inline mathematical expressions. -math :: LaTeX -> LaTeX -math = TeXMath +math :: LaTeXC l => l -> l +math = liftL TeXMath ------------------------------------- ------- Symbols and utilities ------- -- | Superscript. -(^:) :: LaTeX -> LaTeX -> LaTeX +(^:) :: LaTeXC l => l -> l -> l x ^: y = x <> raw "^" <> braces y -- | Subscript. -(!:) :: LaTeX -> LaTeX -> LaTeX +(!:) :: LaTeXC l => l -> l -> l x !: y = x <> raw "_" <> braces y ---- Function symbols -- | Sine function symbol. -tsin :: LaTeX -tsin = TeXComm "sin" [] +tsin :: LaTeXC l => l +tsin = comm0 "sin" -- | Arcsine function symbol. -arcsin :: LaTeX -arcsin = TeXComm "arcsin" [] +arcsin :: LaTeXC l => l +arcsin = comm0 "arcsin" -- | Cosine function symbol. -tcos :: LaTeX -tcos = TeXComm "cos" [] +tcos :: LaTeXC l => l +tcos = comm0 "cos" -- | Arccosine function symbol. -arccos :: LaTeX -arccos = TeXComm "arccos" [] +arccos :: LaTeXC l => l +arccos = comm0 "arccos" -- | Tangent function symbol. -ttan :: LaTeX -ttan = TeXComm "tan" [] +ttan :: LaTeXC l => l +ttan = comm0 "tan" -arctan :: LaTeX -arctan = TeXComm "arctan" [] +-- | Arctangent function symbol. +arctan :: LaTeXC l => l +arctan = comm0 "arctan" -- | Exponential function symbol. -texp :: LaTeX -texp = TeXComm "exp" [] +texp :: LaTeXC l => l +texp = comm0 "exp" -- | Logarithm function symbol. -tlog :: LaTeX -tlog = TeXComm "log" [] +tlog :: LaTeXC l => l +tlog = comm0 "log" -- | Natural logarithm symbol. -ln :: LaTeX -ln = TeXComm "ln" [] +ln :: LaTeXC l => l +ln = comm0 "ln" ---- Operator symbols -- | Negative form of an operator. -notop :: (LaTeX -> LaTeX -> LaTeX) - -> (LaTeX -> LaTeX -> LaTeX) +notop :: LaTeXC l => + (l -> l -> l) + -> (l -> l -> l) notop op = \l1 l2 -> - (l1 <> TeXCommS "not") `op` l2 + (l1 <> commS "not") `op` l2 infix 4 =: , /=: -(=:),(/=:) :: LaTeX -> LaTeX -> LaTeX -(=:) = TeXOp "=" +(=:),(/=:) :: LaTeXC l => l -> l -> l +(=:) = liftL2 $ TeXOp "=" (/=:) = notop (=:) -- | Greater. -(>:) :: LaTeX -> LaTeX -> LaTeX -(>:) = TeXOp ">" +(>:) :: LaTeXC l => l -> l -> l +(>:) = liftL2 $ TeXOp ">" -- | Greater or equal. -(>=:) :: LaTeX -> LaTeX -> LaTeX -(>=:) = between $ TeXComm "geq" [] +(>=:) :: LaTeXC l => l -> l -> l +(>=:) = between $ comm0 "geq" -- | Lesser. -(<:) :: LaTeX -> LaTeX -> LaTeX -(<:) = TeXOp "<" +(<:) :: LaTeXC l => l -> l -> l +(<:) = liftL2 $ TeXOp "<" -- | Lesser or equal. -(<=:) :: LaTeX -> LaTeX -> LaTeX -(<=:) = between $ TeXComm "leq" [] +(<=:) :: LaTeXC l => l -> l -> l +(<=:) = between $ comm0 "leq" -in_ :: LaTeX -> LaTeX -> LaTeX -in_ = between $ TeXComm "in" [] +in_ :: LaTeXC l => l -> l -> l +in_ = between $ comm0 "in" -ni :: LaTeX -> LaTeX -> LaTeX -ni = between $ TeXComm "ni" [] +ni :: LaTeXC l => l -> l -> l +ni = between $ comm0 "ni" -notin :: LaTeX -> LaTeX -> LaTeX -notin = between $ TeXComm "notin" [] +notin :: LaTeXC l => l -> l -> l +notin = between $ comm0 "notin" ---- Greek alphabet -alpha :: LaTeX -alpha = TeXComm "alpha" [] +alpha :: LaTeXC l => l +alpha = comm0 "alpha" -beta :: LaTeX -beta = TeXComm "beta" [] +beta :: LaTeXC l => l +beta = comm0 "beta" -gamma :: LaTeX -gamma = TeXComm "gamma" [] +gamma :: LaTeXC l => l +gamma = comm0 "gamma" -gammau :: LaTeX -gammau = TeXComm "Gamma" [] +gammau :: LaTeXC l => l +gammau = comm0 "Gamma" -delta :: LaTeX -delta = TeXComm "delta" [] +delta :: LaTeXC l => l +delta = comm0 "delta" -deltau :: LaTeX -deltau = TeXComm "Delta" [] +deltau :: LaTeXC l => l +deltau = comm0 "Delta" -epsilon :: LaTeX -epsilon = TeXComm "epsilon" [] +epsilon :: LaTeXC l => l +epsilon = comm0 "epsilon" -varepsilon :: LaTeX -varepsilon = TeXComm "epsilon" [] +varepsilon :: LaTeXC l => l +varepsilon = comm0 "epsilon" -zeta :: LaTeX -zeta = TeXComm "zeta" [] +zeta :: LaTeXC l => l +zeta = comm0 "zeta" -eta :: LaTeX -eta = TeXComm "eta" [] +eta :: LaTeXC l => l +eta = comm0 "eta" -theta :: LaTeX -theta = TeXComm "theta" [] +theta :: LaTeXC l => l +theta = comm0 "theta" -thetau :: LaTeX -thetau = TeXComm "thetau" [] +thetau :: LaTeXC l => l +thetau = comm0 "thetau" -iota :: LaTeX -iota = TeXComm "iota" [] +iota :: LaTeXC l => l +iota = comm0 "iota" -kappa :: LaTeX -kappa = TeXComm "kappa" [] +kappa :: LaTeXC l => l +kappa = comm0 "kappa" -lambda :: LaTeX -lambda = TeXComm "lambda" [] +lambda :: LaTeXC l => l +lambda = comm0 "lambda" -lambdau :: LaTeX -lambdau = TeXComm "Lambda" [] +lambdau :: LaTeXC l => l +lambdau = comm0 "Lambda" -mu :: LaTeX -mu = TeXComm "mu" [] +mu :: LaTeXC l => l +mu = comm0 "mu" -nu :: LaTeX -nu = TeXComm "nu" [] +nu :: LaTeXC l => l +nu = comm0 "nu" -xi :: LaTeX -xi = TeXComm "xi" [] +xi :: LaTeXC l => l +xi = comm0 "xi" -xiu :: LaTeX -xiu = TeXComm "Xi" [] +xiu :: LaTeXC l => l +xiu = comm0 "Xi" -pi_ :: LaTeX -pi_ = TeXComm "pi" [] +pi_ :: LaTeXC l => l +pi_ = comm0 "pi" -varpi :: LaTeX -varpi = TeXComm "varpi" [] +varpi :: LaTeXC l => l +varpi = comm0 "varpi" -piu :: LaTeX -piu = TeXComm "Pi" [] +piu :: LaTeXC l => l +piu = comm0 "Pi" -rho :: LaTeX -rho = TeXComm "rho" [] +rho :: LaTeXC l => l +rho = comm0 "rho" -varrho :: LaTeX -varrho = TeXComm "varrho" [] +varrho :: LaTeXC l => l +varrho = comm0 "varrho" -sigma :: LaTeX -sigma = TeXComm "sigma" [] +sigma :: LaTeXC l => l +sigma = comm0 "sigma" -varsigma :: LaTeX -varsigma = TeXComm "varsigma" [] +varsigma :: LaTeXC l => l +varsigma = comm0 "varsigma" -sigmau :: LaTeX -sigmau = TeXComm "Sigma" [] +sigmau :: LaTeXC l => l +sigmau = comm0 "Sigma" -tau :: LaTeX -tau = TeXComm "tau" [] +tau :: LaTeXC l => l +tau = comm0 "tau" -upsilon :: LaTeX -upsilon = TeXComm "upsilon" [] +upsilon :: LaTeXC l => l +upsilon = comm0 "upsilon" -upsilonu :: LaTeX -upsilonu = TeXComm "Upsilon" [] +upsilonu :: LaTeXC l => l +upsilonu = comm0 "Upsilon" -phi :: LaTeX -phi = TeXComm "phi" [] +phi :: LaTeXC l => l +phi = comm0 "phi" -varphi :: LaTeX -varphi = TeXComm "varphi" [] +varphi :: LaTeXC l => l +varphi = comm0 "varphi" -phiu :: LaTeX -phiu = TeXComm "Phi" [] +phiu :: LaTeXC l => l +phiu = comm0 "Phi" -chi :: LaTeX -chi = TeXComm "chi" [] +chi :: LaTeXC l => l +chi = comm0 "chi" -psi :: LaTeX -psi = TeXComm "psi" [] +psi :: LaTeXC l => l +psi = comm0 "psi" -psiu :: LaTeX -psiu = TeXComm "Psi" [] +psiu :: LaTeXC l => l +psiu = comm0 "Psi" -omega :: LaTeX -omega = TeXComm "omega" [] +omega :: LaTeXC l => l +omega = comm0 "omega" -omegau :: LaTeX -omegau = TeXComm "Omega" [] +omegau :: LaTeXC l => l +omegau = comm0 "Omega" ---- Other symbols -- | A right-arrow. -to :: LaTeX -to = TeXComm "to" [] +to :: LaTeXC l => l +to = comm0 "to" -- | /For all/ symbol. -forall :: LaTeX -forall = TeXComm "forall" [] +forall :: LaTeXC l => l +forall = comm0 "forall" -- | Dagger symbol. -dagger :: LaTeX -dagger = TeXComm "dagger" [] +dagger :: LaTeXC l => l +dagger = comm0 "dagger" -- | Double dagger symbol. -ddagger :: LaTeX -ddagger = TeXComm "ddagger" [] +ddagger :: LaTeXC l => l +ddagger = comm0 "ddagger" ------------------------------------- ------------ Math Fonts ------------- -mathbf :: LaTeX -> LaTeX -mathbf l = TeXComm "mathbf" [FixArg l] +mathbf :: LaTeXC l => l -> l +mathbf = liftL $ \l -> TeXComm "mathbf" [FixArg l] -mathrm :: LaTeX -> LaTeX -mathrm l = TeXComm "mathrm" [FixArg l] +mathrm :: LaTeXC l => l -> l +mathrm =liftL $ \l -> TeXComm "mathrm" [FixArg l] -mathcal :: LaTeX -> LaTeX -mathcal l = TeXComm "mathcal" [FixArg l] +mathcal :: LaTeXC l => l -> l +mathcal = liftL $ \l -> TeXComm "mathcal" [FixArg l] -mathsf :: LaTeX -> LaTeX -mathsf l = TeXComm "mathsf" [FixArg l] +mathsf :: LaTeXC l => l -> l +mathsf = liftL $ \l -> TeXComm "mathsf" [FixArg l] -mathtt :: LaTeX -> LaTeX -mathtt l = TeXComm "mathtt" [FixArg l] +mathtt :: LaTeXC l => l -> l +mathtt = liftL $ \l -> TeXComm "mathtt" [FixArg l] -mathit :: LaTeX -> LaTeX -mathit l = TeXComm "mathit" [FixArg l] +mathit :: LaTeXC l => l -> l +mathit = liftL $ \l -> TeXComm "mathit" [FixArg l]
− Text/LaTeX/Packages/AMSMath/Monad.hs
@@ -1,421 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.AMSMath" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.AMSMath.Monad - ( -- * AMSMath package - amsmath - -- * AMSMath functions - , math - -- * Symbols and utilities - -- ** Superscript and subscript - , (^:) , (!:) - -- ** Function symbols - -- | Some symbols are preceded with /t/ to be distinguished from - -- predefined Haskell entities (like 'sin' and 'cos'). - , tsin , arcsin - , tcos , arccos - , ttan , arctan - , texp - , tlog , ln - -- ** Operator symbols - , (=:) , (/=:) - , (>:) , (>=:) - , (<:) , (<=:) - , in_ , ni , notin - -- ** Greek alphabet - -- | Functions of greek alphabet symbols. - -- - -- Uppercase versions are suffixed with @u@. - -- Variants are prefixed with @var@. - -- The function 'pi_' is ended by an underscore symbol to - -- distinguish it from the 'pi' Prelude function. - , alpha , beta , gamma - , gammau , delta , deltau - , epsilon , varepsilon , zeta - , eta , theta , thetau - , iota , kappa , lambda - , lambdau , mu , nu - , xi , xiu , pi_ - , varpi , piu , rho - , varrho , sigma , varsigma - , sigmau , tau , upsilon - , upsilonu , phi , varphi - , phiu , chi , psi - , psiu , omega , omegau - -- ** Other symbols - , to - , forall - , dagger, ddagger - -- * Fonts - , mathbf - , mathrm - , mathcal - , mathsf - , mathtt - , mathit - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.AMSMath as App -import Text.LaTeX.Packages.AMSMath() - -{-| -AMSMath package. - Example: - -> usepackage [] amsmath - --} -amsmath :: PackageName -amsmath = App.amsmath - --- | Inline mathematical expressions. - -math :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -math a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.math a1) - - -(^:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(^:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.^:) a1 a2) - - -(!:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(!:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.!:) a1 a2) - --- | Sine function symbol. - -tsin :: (Monad m) => LaTeXT_ m -tsin = do textell ( App.tsin) - --- | Arcsine function symbol. - -arcsin :: (Monad m) => LaTeXT_ m -arcsin = do textell ( App.arcsin) - --- | Cosine function symbol. - -tcos :: (Monad m) => LaTeXT_ m -tcos = do textell ( App.tcos) - --- | Arccosine function symbol. - -arccos :: (Monad m) => LaTeXT_ m -arccos = do textell ( App.arccos) - --- | Tangent function symbol. - -ttan :: (Monad m) => LaTeXT_ m -ttan = do textell ( App.ttan) - - -arctan :: (Monad m) => LaTeXT_ m -arctan = do textell ( App.arctan) - --- | Exponential function symbol. - -texp :: (Monad m) => LaTeXT_ m -texp = do textell ( App.texp) - --- | Logarithm function symbol. - -tlog :: (Monad m) => LaTeXT_ m -tlog = do textell ( App.tlog) - --- | Natural logarithm symbol. - -ln :: (Monad m) => LaTeXT_ m -ln = do textell ( App.ln) - - -(=:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(=:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.=:) a1 a2) - - -(/=:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(/=:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App./=:) a1 a2) - - -(>:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(>:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.>:) a1 a2) - - -(>=:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(>=:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.>=:) a1 a2) - - -(<:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(<:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.<:) a1 a2) - - -(<=:) :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -(<=:) a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( (App.<=:) a1 a2) - - -in_ :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -in_ a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( App.in_ a1 a2) - - -ni :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -ni a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( App.ni a1 a2) - - -notin :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -notin a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( App.notin a1 a2) - - -alpha :: (Monad m) => LaTeXT_ m -alpha = do textell ( App.alpha) - - -beta :: (Monad m) => LaTeXT_ m -beta = do textell ( App.beta) - - -gamma :: (Monad m) => LaTeXT_ m -gamma = do textell ( App.gamma) - - -gammau :: (Monad m) => LaTeXT_ m -gammau = do textell ( App.gammau) - - -delta :: (Monad m) => LaTeXT_ m -delta = do textell ( App.delta) - - -deltau :: (Monad m) => LaTeXT_ m -deltau = do textell ( App.deltau) - - -epsilon :: (Monad m) => LaTeXT_ m -epsilon = do textell ( App.epsilon) - - -varepsilon :: (Monad m) => LaTeXT_ m -varepsilon = do textell ( App.varepsilon) - - -zeta :: (Monad m) => LaTeXT_ m -zeta = do textell ( App.zeta) - - -eta :: (Monad m) => LaTeXT_ m -eta = do textell ( App.eta) - - -theta :: (Monad m) => LaTeXT_ m -theta = do textell ( App.theta) - - -thetau :: (Monad m) => LaTeXT_ m -thetau = do textell ( App.thetau) - - -iota :: (Monad m) => LaTeXT_ m -iota = do textell ( App.iota) - - -kappa :: (Monad m) => LaTeXT_ m -kappa = do textell ( App.kappa) - - -lambda :: (Monad m) => LaTeXT_ m -lambda = do textell ( App.lambda) - - -lambdau :: (Monad m) => LaTeXT_ m -lambdau = do textell ( App.lambdau) - - -mu :: (Monad m) => LaTeXT_ m -mu = do textell ( App.mu) - - -nu :: (Monad m) => LaTeXT_ m -nu = do textell ( App.nu) - - -xi :: (Monad m) => LaTeXT_ m -xi = do textell ( App.xi) - - -xiu :: (Monad m) => LaTeXT_ m -xiu = do textell ( App.xiu) - - -pi_ :: (Monad m) => LaTeXT_ m -pi_ = do textell ( App.pi_) - - -varpi :: (Monad m) => LaTeXT_ m -varpi = do textell ( App.varpi) - - -piu :: (Monad m) => LaTeXT_ m -piu = do textell ( App.piu) - - -rho :: (Monad m) => LaTeXT_ m -rho = do textell ( App.rho) - - -varrho :: (Monad m) => LaTeXT_ m -varrho = do textell ( App.varrho) - - -sigma :: (Monad m) => LaTeXT_ m -sigma = do textell ( App.sigma) - - -varsigma :: (Monad m) => LaTeXT_ m -varsigma = do textell ( App.varsigma) - - -sigmau :: (Monad m) => LaTeXT_ m -sigmau = do textell ( App.sigmau) - - -tau :: (Monad m) => LaTeXT_ m -tau = do textell ( App.tau) - - -upsilon :: (Monad m) => LaTeXT_ m -upsilon = do textell ( App.upsilon) - - -upsilonu :: (Monad m) => LaTeXT_ m -upsilonu = do textell ( App.upsilonu) - - -phi :: (Monad m) => LaTeXT_ m -phi = do textell ( App.phi) - - -varphi :: (Monad m) => LaTeXT_ m -varphi = do textell ( App.varphi) - - -phiu :: (Monad m) => LaTeXT_ m -phiu = do textell ( App.phiu) - - -chi :: (Monad m) => LaTeXT_ m -chi = do textell ( App.chi) - - -psi :: (Monad m) => LaTeXT_ m -psi = do textell ( App.psi) - - -psiu :: (Monad m) => LaTeXT_ m -psiu = do textell ( App.psiu) - - -omega :: (Monad m) => LaTeXT_ m -omega = do textell ( App.omega) - - -omegau :: (Monad m) => LaTeXT_ m -omegau = do textell ( App.omegau) - --- | A right-arrow. - -to :: (Monad m) => LaTeXT_ m -to = do textell ( App.to) - --- | /For all/ symbol. - -forall :: (Monad m) => LaTeXT_ m -forall = do textell ( App.forall) - --- | Dagger symbol. - -dagger :: (Monad m) => LaTeXT_ m -dagger = do textell ( App.dagger) - --- | Double dagger symbol. - -ddagger :: (Monad m) => LaTeXT_ m -ddagger = do textell ( App.ddagger) - - -mathbf :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathbf a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathbf a1) - - -mathrm :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathrm a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathrm a1) - - -mathcal :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathcal a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathcal a1) - - -mathsf :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathsf a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathsf a1) - - -mathtt :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathtt a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathtt a1) - - -mathit :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -mathit a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.mathit a1) - -
Text/LaTeX/Packages/AMSThm.hs view
@@ -1,5 +1,4 @@ -{-# OPTIONS_HATEX MakeMonadic #-} {-# LANGUAGE OverloadedStrings #-} -- | Package for theorem environments. @@ -16,6 +15,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types @@ -35,21 +35,21 @@ -- > newtheorem "prop" "Proposition" -- -- > theorem "prop" "This is it." -newtheorem :: String -> LaTeX -> LaTeX -newtheorem str l = TeXComm "newtheorem" [ FixArg $ fromString str , FixArg l ] +newtheorem :: LaTeXC l => String -> l -> l +newtheorem str = liftL $ \l -> TeXComm "newtheorem" [ FixArg $ fromString str , FixArg l ] -theorem :: String -> LaTeX -> LaTeX -theorem str l = TeXEnv str [] l +theorem :: LaTeXC l => String -> l -> l +theorem str = liftL $ TeXEnv str [] -- | The 'proof' environment. The first optional argument -- is used to put a custom title to the proof. -proof :: Maybe LaTeX -> LaTeX -> LaTeX -proof Nothing l = TeXEnv "proof" [ ] l -proof (Just n) l = TeXEnv "proof" [ OptArg n ] l +proof :: LaTeXC l => Maybe l -> l -> l +proof Nothing = liftL $ TeXEnv "proof" [] +proof (Just n) = liftL2 (\n -> TeXEnv "proof" [ OptArg n ]) n -- | Insert the /QED/ symbol. -qedhere :: LaTeX -qedhere = TeXComm "qedhere" [] +qedhere :: LaTeXC l => l +qedhere = comm0 "qedhere" data TheoremStyle = Plain @@ -65,6 +65,5 @@ render (CustomThmStyle str) = fromString str -- | Set the theorem style. Call this function in the preamble. -theoremstyle :: TheoremStyle -> LaTeX -theoremstyle thmsty = TeXComm "theoremstyle" [ FixArg $ TeXRaw $ render thmsty ] - +theoremstyle :: LaTeXC l => TheoremStyle -> l +theoremstyle thmsty = fromLaTeX $ TeXComm "theoremstyle" [ FixArg $ TeXRaw $ render thmsty ]
− Text/LaTeX/Packages/AMSThm/Monad.hs
@@ -1,84 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | Package for theorem environments. --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.AMSThm" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.AMSThm.Monad - ( -- * AMSThm package - amsthm - -- * AMSThm functions - , newtheorem - , theorem - , proof - , qedhere - , TheoremStyle (..) - , theoremstyle - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.AMSThm as App -import Text.LaTeX.Packages.AMSThm(TheoremStyle) - -{-| -AMSThm package. - Example: - -> usepackage [] amsthm - --} -amsthm :: PackageName -amsthm = App.amsthm - -{-| -Create a new 'theorem' environment type. - Arguments are environment name (this will be the argument - when using the 'theorem' function) and the displayed title. -For example: - -> newtheorem "prop" "Proposition" - - -> theorem "prop" "This is it." - --} -newtheorem :: (Monad m) => String -> LaTeXT_ m -> LaTeXT_ m -newtheorem a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.newtheorem a1 a2) - - -theorem :: (Monad m) => String -> LaTeXT_ m -> LaTeXT_ m -theorem a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.theorem a1 a2) - -{-| -The 'proof' environment. The first optional argument - is used to put a custom title to the proof. --} -proof :: (Monad m) => Maybe (LaTeXT_ m) -> LaTeXT_ m -> LaTeXT_ m -proof a1 a2 - = do a1 <- maybe (return Nothing) - ((>>= return . Just) . extractLaTeX_) - a1 - a2 <- extractLaTeX_ a2 - textell ( App.proof a1 a2) - --- | Insert the /QED/ symbol. - -qedhere :: (Monad m) => LaTeXT_ m -qedhere = do textell ( App.qedhere) - --- | Set the theorem style. Call this function in the preamble. - -theoremstyle :: (Monad m) => TheoremStyle -> LaTeXT_ m -theoremstyle a1 = do textell ( App.theoremstyle a1) - -
Text/LaTeX/Packages/Beamer.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} module Text.LaTeX.Packages.Beamer ( -- * Beamer package @@ -22,6 +21,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types import Data.String @@ -33,38 +33,38 @@ beamer = "beamer" -- | A presentation is composed of a sequence of frames. Each frame is created with this function. -frame :: LaTeX -> LaTeX -frame = TeXEnv "frame" [] +frame :: LaTeXC l => l -> l +frame = liftL $ TeXEnv "frame" [] -- | Set the title of the current frame. Use it within a 'frame'. -frametitle :: LaTeX -> LaTeX -frametitle l = TeXComm "frametitle" [FixArg l] +frametitle :: LaTeXC l => l -> l +frametitle = liftL $ \l -> TeXComm "frametitle" [FixArg l] -- | Set the subtitle of the current frame. Use it within a 'frame'. -framesubtitle :: LaTeX -> LaTeX -framesubtitle l = TeXComm "framesubtitle" [FixArg l] +framesubtitle :: LaTeXC l => l -> l +framesubtitle = liftL $ \l -> TeXComm "framesubtitle" [FixArg l] -- | Highlight in red a piece text. With the 'OverlaySpec's, you can specify the slides where -- the text will be highlighted. -alert :: [OverlaySpec] -> LaTeX -> LaTeX -alert os l = TeXComm "alert" [ MSymArg $ fmap (TeXRaw . render) os, FixArg l] +alert :: LaTeXC l => [OverlaySpec] -> l -> l +alert os = liftL $ \l -> TeXComm "alert" [ MSymArg $ fmap (TeXRaw . render) os, FixArg l] -- | Introduces a pause in a slide. -pause :: LaTeX -pause = TeXComm "pause" [] +pause :: LaTeXC l => l +pause = comm0 "pause" -- | 'beameritem' works like 'item', but allows you to specify the slides where -- the item will be displayed. -beameritem :: [OverlaySpec] -> LaTeX -beameritem os = TeXComm "item" [ MSymArg $ fmap (TeXRaw . render) os ] +beameritem :: LaTeXC l => [OverlaySpec] -> l +beameritem os = fromLaTeX $ TeXComm "item" [ MSymArg $ fmap (TeXRaw . render) os ] -- | With 'uncover', show a piece of text only in the slides you want. -uncover :: [OverlaySpec] -> LaTeX -> LaTeX -uncover os l = TeXComm "uncover" [ MSymArg $ fmap (TeXRaw . render) os , FixArg l ] +uncover :: LaTeXC l => [OverlaySpec] -> l -> l +uncover os = liftL $ \l -> TeXComm "uncover" [ MSymArg $ fmap (TeXRaw . render) os , FixArg l ] -- | Similar to 'uncover'. -only :: [OverlaySpec] -> LaTeX -> LaTeX -only os l = TeXComm "only" [ MSymArg $ fmap (TeXRaw . render) os , FixArg l ] +only :: LaTeXC l => [OverlaySpec] -> l -> l +only os = liftL $ \l -> TeXComm "only" [ MSymArg $ fmap (TeXRaw . render) os , FixArg l ] data OverlaySpec = OneSlide Int @@ -80,10 +80,11 @@ render (FromToSlide n m) = render n <> "-" <> render m -- | A 'block' will be displayed surrounding a text. -block :: LaTeX -- ^ Title for the block - -> LaTeX -- ^ Content of the block - -> LaTeX -- ^ Result -block tit = TeXEnv "block" [ FixArg tit ] +block :: LaTeXC l => + l -- ^ Title for the block + -> l -- ^ Content of the block + -> l -- ^ Result +block = liftL2 $ \tit -> TeXEnv "block" [ FixArg tit ] -- THEMES -- @@ -128,6 +129,6 @@ render x = fromString $ show x -- | Set the 'Theme' employed in your presentation (in the preamble). -usetheme :: Theme -> LaTeX -usetheme th = TeXComm "usetheme" [ FixArg $ TeXRaw $ render th ] +usetheme :: LaTeXC l => Theme -> l +usetheme th = fromLaTeX $ TeXComm "usetheme" [ FixArg $ TeXRaw $ render th ]
− Text/LaTeX/Packages/Beamer/Monad.hs
@@ -1,115 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.Beamer" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.Beamer.Monad - ( -- * Beamer package - beamer - -- * Beamer commands - , frame - , frametitle - , framesubtitle - , alert - , pause - , block - -- ** Overlay Specifications - , OverlaySpec (..) - , beameritem - , uncover - , only - -- ** Themes - , Theme (..) - , usetheme - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.Beamer as App -import Text.LaTeX.Packages.Beamer(OverlaySpec,Theme) - -{-| -The 'beamer' document class. Importing a package is not required. Example: - -> documentclass [] beamer - --} -beamer :: ClassName -beamer = App.beamer - --- | A presentation is composed of a sequence of frames. Each frame is created with this function. - -frame :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -frame a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.frame a1) - --- | Set the title of the current frame. Use it within a 'frame'. - -frametitle :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -frametitle a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.frametitle a1) - --- | Set the subtitle of the current frame. Use it within a 'frame'. - -framesubtitle :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -framesubtitle a1 - = do a1 <- extractLaTeX_ a1 - textell ( App.framesubtitle a1) - -{-| -Highlight in red a piece text. With the 'OverlaySpec's, you can specify the slides where - the text will be highlighted. --} -alert :: (Monad m) => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m -alert a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.alert a1 a2) - --- | Introduces a pause in a slide. - -pause :: (Monad m) => LaTeXT_ m -pause = do textell ( App.pause) - -{-| -'beameritem' works like @item@, but allows you to specify the slides where - the item will be displayed. --} -beameritem :: (Monad m) => [OverlaySpec] -> LaTeXT_ m -beameritem a1 = do textell ( App.beameritem a1) - --- | With 'uncover', show a piece of text only in the slides you want. - -uncover :: (Monad m) => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m -uncover a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.uncover a1 a2) - --- | Similar to 'uncover'. - -only :: (Monad m) => [OverlaySpec] -> LaTeXT_ m -> LaTeXT_ m -only a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.only a1 a2) - --- | A 'block' will be displayed surrounding a text. - -block :: (Monad m) => LaTeXT_ m -> LaTeXT_ m -> LaTeXT_ m -block a1 a2 - = do a1 <- extractLaTeX_ a1 - a2 <- extractLaTeX_ a2 - textell ( App.block a1 a2) - --- | Set the 'Theme' employed in your presentation (in the preamble). - -usetheme :: (Monad m) => Theme -> LaTeXT_ m -usetheme a1 = do textell ( App.usetheme a1) - -
Text/LaTeX/Packages/Color.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} module Text.LaTeX.Packages.Color ( -- * Color package @@ -24,6 +23,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types -- @@ -37,16 +37,16 @@ -- | To convert all colour commands to black and white, -- for previewers that cannot handle colour. -monochrome :: LaTeX +monochrome :: LaTeXC l => l monochrome = "monochrome" -dvipsnames :: LaTeX +dvipsnames :: LaTeXC l => l dvipsnames = "dvipsnames" -nodvipsnames :: LaTeX +nodvipsnames :: LaTeXC l => l nodvipsnames = "nodvipsnames" -usenames :: LaTeX +usenames :: LaTeXC l => l usenames = "usenames" -- @@ -119,34 +119,34 @@ -- Commands --- | Set the background color fot the current and following pages. -pagecolor :: ColSpec -> LaTeX -pagecolor = (TeXCommS "pagecolor" <>) . rendertex +-- | Set the background color for the current and following pages. +pagecolor :: LaTeXC l => ColSpec -> l +pagecolor = (commS "pagecolor" <>) . rendertex -- | Switch to a new text color. -color :: ColSpec -> LaTeX -color = (TeXCommS "color" <>) . rendertex +color :: LaTeXC l => ColSpec -> l +color = (commS "color" <>) . rendertex -- | Set the text of its argument in the given colour. -textcolor :: ColSpec -> LaTeX -> LaTeX -textcolor cs l = TeXCommS "textcolor" <> rendertex cs +textcolor :: LaTeXC l => ColSpec -> l -> l +textcolor cs l = commS "textcolor" <> rendertex cs <> braces l -- | Put its argument in a box with the given colour as background. -colorbox :: ColSpec -> LaTeX -> LaTeX -colorbox cs l = TeXCommS "colorbox" <> rendertex cs +colorbox :: LaTeXC l => ColSpec -> l -> l +colorbox cs l = commS "colorbox" <> rendertex cs <> braces l -- | Application of @fcolorbox cs1 cs2 l@ put @l@ in a framed box with -- @cs1@ as frame color and @cs2@ as background color. -fcolorbox :: ColSpec -> ColSpec -> LaTeX -> LaTeX +fcolorbox :: LaTeXC l => ColSpec -> ColSpec -> l -> l fcolorbox cs1 cs2 l = - TeXCommS "fcolorbox" <> rendertex cs1 - <> rendertex cs2 + commS "fcolorbox" <> rendertex cs1 + <> rendertex cs2 <> braces l -- | Switch to the colour that was active at the end of the preamble. -- Thus, placing a 'color' command in the preamble can change the -- standard colour of the whole document. -normalcolor :: LaTeX -normalcolor = TeXComm "normalcolor" [] +normalcolor :: LaTeXC l => l +normalcolor = comm0 "normalcolor"
− Text/LaTeX/Packages/Color/Monad.hs
@@ -1,107 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.Color" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.Color.Monad - ( -- * Color package - pcolor - -- * Package options - , monochrome - , dvipsnames - , nodvipsnames - , usenames - -- * Types - , Color (..) - , ColorName (..) - , ColorModel (..) - , ColSpec (..) - -- * Commands - , pagecolor - , color - , textcolor - , colorbox , fcolorbox - , normalcolor - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.Color as App -import Text.LaTeX.Packages.Color(ColSpec,Color,ColorModel,ColorName) - -{-| -The 'pcolor' package. - -> usepackage [] pcolor - --} -pcolor :: PackageName -pcolor = App.pcolor - -{-| -To convert all colour commands to black and white, - for previewers that cannot handle colour. --} -monochrome :: (Monad m) => LaTeXT_ m -monochrome = do textell ( App.monochrome) - - -dvipsnames :: (Monad m) => LaTeXT_ m -dvipsnames = do textell ( App.dvipsnames) - - -nodvipsnames :: (Monad m) => LaTeXT_ m -nodvipsnames = do textell ( App.nodvipsnames) - - -usenames :: (Monad m) => LaTeXT_ m -usenames = do textell ( App.usenames) - --- | Set the background color fot the current and following pages. - -pagecolor :: (Monad m) => ColSpec -> LaTeXT_ m -pagecolor a1 = do textell ( App.pagecolor a1) - --- | Switch to a new text color. - -color :: (Monad m) => ColSpec -> LaTeXT_ m -color a1 = do textell ( App.color a1) - --- | Set the text of its argument in the given colour. - -textcolor :: (Monad m) => ColSpec -> LaTeXT_ m -> LaTeXT_ m -textcolor a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.textcolor a1 a2) - --- | Put its argument in a box with the given colour as background. - -colorbox :: (Monad m) => ColSpec -> LaTeXT_ m -> LaTeXT_ m -colorbox a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.colorbox a1 a2) - -{-| -Application of @fcolorbox cs1 cs2 l@ put @l@ in a framed box with - @cs1@ as frame color and @cs2@ as background color. --} -fcolorbox :: (Monad m) => ColSpec -> ColSpec -> LaTeXT_ m -> LaTeXT_ m -fcolorbox a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.fcolorbox a1 a2 a3) - -{-| -Switch to the colour that was active at the end of the preamble. - Thus, placing a 'color' command in the preamble can change the - standard colour of the whole document. --} -normalcolor :: (Monad m) => LaTeXT_ m -normalcolor = do textell ( App.normalcolor) - -
Text/LaTeX/Packages/Graphicx.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} -- | This module allows you to use the LaTeX graphicx library in order to -- insert graphics in a document. @@ -14,9 +13,15 @@ -- * Including graphics , IGOption (..) , includegraphics + -- * Transformations + , rotatebox + , scalebox + , reflectbox + , resizebox ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types -- @@ -30,14 +35,14 @@ -- Package options -dvips, dvipdfm, pdftex :: LaTeX +dvips, dvipdfm, pdftex :: LaTeXC l => l dvips = "dvips" dvipdfm = "dvipdfm" pdftex = "pdftex" -- Including graphics --- | Include Graphics Option. This options can be passed as arguments to the 'includegraphics' function. +-- | Include Graphics Option. These options can be passed as arguments to the 'includegraphics' function. data IGOption = IGWidth Measure -- ^ Specify the preferred width of the imported image. | IGHeight Measure -- ^ Specify the preferred height of the imported image. @@ -48,7 +53,8 @@ | IGTrim Measure Measure Measure Measure -- ^ This option will crop the imported image. Arguments are from-left -- , from-bottom, from-right and from-top respectively. | IGClip Bool -- ^ For the 'IGTrim' option to work, you must set 'IGClip' to 'True'. - | IGPage Int -- ^ If the image file is a pdf file with multiple pages, this parameter allows you to use a different page than the first. + | IGPage Int -- ^ If the image file is a pdf file with multiple pages, + -- this parameter allows you to use a different page than the first. deriving Show instance Render IGOption where @@ -62,5 +68,33 @@ render (IGPage p) = "page=" <> render p -- | Include an image in the document. -includegraphics :: [IGOption] -> FilePath -> LaTeX -includegraphics opts fp = TeXComm "includegraphics" [ MOptArg $ fmap rendertex opts , FixArg $ TeXRaw $ fromString fp ]+includegraphics :: LaTeXC l => + [IGOption] -- ^ Options + -> FilePath -- ^ Image file + -> l +includegraphics opts fp = fromLaTeX $ TeXComm "includegraphics" + [ MOptArg $ fmap rendertex opts , FixArg $ TeXRaw $ fromString fp ] + +rotatebox :: LaTeXC l => Float -> l -> l +rotatebox a = liftL $ \l -> TeXComm "rotatebox" [FixArg $ rendertex a , FixArg l] + +scalebox :: LaTeXC l => + Float -- ^ Horizontal scale. + -> Maybe Float -- ^ Vertical scale. + -> l + -> l +scalebox h mv = liftL $ \l -> + TeXComm "rotatebox" $ [FixArg $ rendertex h] + ++ maybe [] ((:[]) . OptArg . rendertex) mv + ++ [FixArg l] + +reflectbox :: LaTeXC l => l -> l +reflectbox = liftL $ \l -> TeXComm "reflectbox" [FixArg l] + +resizebox :: LaTeXC l => + Measure -- ^ Horizontal size. + -> Measure -- ^ Vertical size. + -> l + -> l +resizebox h v = liftL $ \l -> + TeXComm "resizebox" [FixArg $ rendertex h,FixArg $ rendertex v,FixArg l]
− Text/LaTeX/Packages/Graphicx/Monad.hs
@@ -1,57 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - -{-| -This module allows you to use the LaTeX graphicx library in order to - insert graphics in a document. --}-- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.Graphicx" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.Graphicx.Monad - ( -- * Graphicx package - graphicx - -- * Package options - , dvips - , dvipdfm - , pdftex - -- * Including graphics - , IGOption (..) - , includegraphics - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.Graphicx as App -import Text.LaTeX.Packages.Graphicx(IGOption) - -{-| -The 'graphicx' package. - -> usepackage [] graphicx - --} -graphicx :: PackageName -graphicx = App.graphicx - - -dvips :: (Monad m) => LaTeXT_ m -dvips = do textell ( App.dvips) - - -dvipdfm :: (Monad m) => LaTeXT_ m -dvipdfm = do textell ( App.dvipdfm) - - -pdftex :: (Monad m) => LaTeXT_ m -pdftex = do textell ( App.pdftex) - --- | Include an image in the document. - -includegraphics :: (Monad m) => [IGOption] -> FilePath -> LaTeXT_ m -includegraphics a1 a2 = do textell ( App.includegraphics a1 a2) - -
Text/LaTeX/Packages/Hyperref.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} module Text.LaTeX.Packages.Hyperref ( -- * Hyperref package @@ -18,6 +17,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Render import Text.LaTeX.Base.Types @@ -47,29 +47,28 @@ createURL = URL -- | Reference to an 'URL'. -href :: [HRefOption] -> URL -> LaTeX -> LaTeX -href options u t = TeXComm "href" [ MOptArg $ fmap (TeXRaw . render) options - , FixArg $ TeXRaw $ render u - , FixArg t ] +href :: LaTeXC l => [HRefOption] -> URL -> l -> l +href options u = liftL $ \t -> TeXComm "href" [ MOptArg $ fmap rendertex options + , FixArg $ rendertex u + , FixArg t ] -- | Write an 'URL' hyperlinked. -url :: URL -> LaTeX -url u = TeXComm "url" [ FixArg $ TeXRaw $ render u ] +url :: LaTeXC l => URL -> l +url u = fromLaTeX $ TeXComm "url" [ FixArg $ rendertex u ] -- | Write an 'URL' without creating a hyperlink. -nolinkurl :: URL -> LaTeX -nolinkurl u = TeXComm "nolinkurl" [ FixArg $ TeXRaw $ render u ] +nolinkurl :: LaTeXC l => URL -> l +nolinkurl u = fromLaTeX $ TeXComm "nolinkurl" [ FixArg $ rendertex u ] -- | Establish a base 'URL'. -hyperbaseurl :: URL -> LaTeX -hyperbaseurl u = TeXComm "hyperbaseurl" [ FixArg $ TeXRaw $ render u ] +hyperbaseurl :: LaTeXC l => URL -> l +hyperbaseurl u = fromLaTeX $ TeXComm "hyperbaseurl" [ FixArg $ rendertex u ] -- | @hyperimage imgURL t@: -- The link to the image referenced by the @imgURL@ is inserted, using @t@ as the anchor. -hyperimage :: URL -> LaTeX -> LaTeX -hyperimage u t = TeXComm "hyperimage" [ FixArg $ TeXRaw $ render u - , FixArg t ] +hyperimage :: LaTeXC l => URL -> l -> l +hyperimage u = liftL $ \t -> TeXComm "hyperimage" [ FixArg $ rendertex u , FixArg t ] -- | This is a replacement for the usual 'ref' command that places a contextual label in front of the reference. -autoref :: Label -> LaTeX -autoref l = TeXComm "autoref" [ FixArg $ TeXRaw $ render l ] +autoref :: LaTeXC l => Label -> l +autoref l = fromLaTeX $ TeXComm "autoref" [ FixArg $ rendertex l ]
− Text/LaTeX/Packages/Hyperref/Monad.hs
@@ -1,81 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.Hyperref" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.Hyperref.Monad - ( -- * Hyperref package - hyperref - -- * Hyperref commands - , HRefOption (..) - , URL - , createURL - , href - , url - , nolinkurl - , hyperbaseurl - , hyperimage - , autoref - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.Hyperref as App -import Text.LaTeX.Packages.Hyperref(HRefOption,URL) - -{-| -The 'hyperref' package. - -> usepackage [] hyperref - --} -hyperref :: PackageName -hyperref = App.hyperref - - -createURL :: String -> URL -createURL = App.createURL - --- | Reference to an 'URL'. - -href :: (Monad m) => [HRefOption] -> URL -> LaTeXT_ m -> LaTeXT_ m -href a1 a2 a3 - = do a3 <- extractLaTeX_ a3 - textell ( App.href a1 a2 a3) - --- | Write an 'URL' hyperlinked. - -url :: (Monad m) => URL -> LaTeXT_ m -url a1 = do textell ( App.url a1) - --- | Write an 'URL' without creating a hyperlink. - -nolinkurl :: (Monad m) => URL -> LaTeXT_ m -nolinkurl a1 = do textell ( App.nolinkurl a1) - --- | Establish a base 'URL'. - -hyperbaseurl :: (Monad m) => URL -> LaTeXT_ m -hyperbaseurl a1 = do textell ( App.hyperbaseurl a1) - -{-| -@hyperimage imgURL t@: - The link to the image referenced by the @imgURL@ is inserted, using @t@ as the anchor. --} -hyperimage :: (Monad m) => URL -> LaTeXT_ m -> LaTeXT_ m -hyperimage a1 a2 - = do a2 <- extractLaTeX_ a2 - textell ( App.hyperimage a1 a2) - --- | This is a replacement for the usual @ref@ command that places a contextual label in front of the reference. - -autoref :: (Monad m) => Label -> LaTeXT_ m -autoref a1 = do textell ( App.autoref a1) - -
Text/LaTeX/Packages/Inputenc.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_HATEX MakeMonadic #-} module Text.LaTeX.Packages.Inputenc ( -- * Inputenc package @@ -11,6 +10,7 @@ ) where import Text.LaTeX.Base.Syntax +import Text.LaTeX.Base.Class import Text.LaTeX.Base.Types -- | Inputenc package. @@ -21,9 +21,9 @@ inputenc = "inputenc" -- | UTF-8 encoding. -utf8 :: LaTeX +utf8 :: LaTeXC l => l utf8 = "utf8" -- | Latin-1 encoding. -latin1 :: LaTeX +latin1 :: LaTeXC l => l latin1 = "latin1"
− Text/LaTeX/Packages/Inputenc/Monad.hs
@@ -1,45 +0,0 @@-{-# LANGUAGE OverloadedStrings #-} - --- | --- --- /For contributors: This module was automatically generated by HaTeX-meta./ --- /So, please, don't make any change here directly, because/ --- /this is intended to be generated automatically from/ --- "Text.LaTeX.Packages.Inputenc" /module via HaTeX-meta,/ --- /and therefore, changes must to be done in these places./ - -module Text.LaTeX.Packages.Inputenc.Monad - ( -- * Inputenc package - inputenc - -- * Encodings - , utf8 - , latin1 - ) where - -import Text.LaTeX.Base.Writer -import Text.LaTeX.Base.Render -import Text.LaTeX.Base.Types -import qualified Text.LaTeX.Packages.Inputenc as App -import Text.LaTeX.Packages.Inputenc() - -{-| -Inputenc package. - Example: - -> usepackage [utf8] inputenc - --} -inputenc :: PackageName -inputenc = App.inputenc - --- | UTF-8 encoding. - -utf8 :: (Monad m) => LaTeXT_ m -utf8 = do textell ( App.utf8) - --- | Latin-1 encoding. - -latin1 :: (Monad m) => LaTeXT_ m -latin1 = do textell ( App.latin1) - -
− Text/LaTeX/Packages/Monad.hs
@@ -1,23 +0,0 @@- -module Text.LaTeX.Packages.Monad - ( -- * Encoding packages - module Text.LaTeX.Packages.Inputenc.Monad - -- * Cross-reference packages - , module Text.LaTeX.Packages.Hyperref.Monad - -- * Presentation packages - , module Text.LaTeX.Packages.Beamer.Monad - -- * Mathematics packages - , module Text.LaTeX.Packages.AMSMath.Monad - , module Text.LaTeX.Packages.AMSFonts.Monad - , module Text.LaTeX.Packages.AMSThm.Monad - -- * Graphics packages - , module Text.LaTeX.Packages.Color.Monad - ) where - -import Text.LaTeX.Packages.Inputenc.Monad -import Text.LaTeX.Packages.Hyperref.Monad -import Text.LaTeX.Packages.Beamer.Monad -import Text.LaTeX.Packages.AMSMath.Monad -import Text.LaTeX.Packages.AMSFonts.Monad -import Text.LaTeX.Packages.AMSThm.Monad -import Text.LaTeX.Packages.Color.Monad
+ Text/LaTeX/Packages/Trees.hs view
@@ -0,0 +1,29 @@+ +-- | Tree definition with some class instances. +module Text.LaTeX.Packages.Trees ( + -- * Tree + Tree (..) + ) where + +import Data.Monoid +import Data.Foldable +import Data.Traversable +import Control.Applicative +import Data.String + +-- | Tree datatype. +data Tree a = + Leaf a -- ^ Leafs are non-empty. + | Node (Maybe a) [Tree a] -- ^ Node values are optional. + +instance Functor Tree where + fmap f (Leaf a) = Leaf $ f a + fmap f (Node ma ts) = Node (fmap f ma) $ fmap (fmap f) ts + +instance Foldable Tree where + foldMap f (Leaf a) = f a + foldMap f (Node ma ts) = foldMap f ma `mappend` mconcat (fmap (foldMap f) ts) + +instance Traversable Tree where + sequenceA (Leaf fa) = Leaf <$> fa + sequenceA (Node mfa ts) = liftA2 Node (sequenceA mfa) $ sequenceA $ fmap sequenceA ts
+ Text/LaTeX/Packages/Trees/Qtree.hs view
@@ -0,0 +1,38 @@+ +{-# LANGUAGE OverloadedStrings #-} + +module Text.LaTeX.Packages.Trees.Qtree ( + -- * Tree re-export + module Text.LaTeX.Packages.Trees + -- * Qtree package + , qtree + -- * Tree to LaTeX rendering + , tree + , rendertree + ) where + +import Text.LaTeX.Base +import Text.LaTeX.Base.Class +import Text.LaTeX.Packages.Trees +-- +import Data.Monoid +import Data.List (intersperse) + +qtree :: PackageName +qtree = "qtree" + +tree_ :: LaTeXC l => (a -> l) -> Tree a -> l +tree_ f (Leaf x) = braces $ f x +tree_ f (Node mx ts) = + mconcat [ "[" + , maybe mempty (("." <>) . braces . f) mx + , " " + , mconcat $ intersperse " " $ fmap (tree_ f) ts + , " ]" + ] + +tree :: LaTeXC l => (a -> l) -> Tree a -> l +tree f t = commS "Tree" <> " " <> tree_ f t + +rendertree :: (Render a, LaTeXC l) => Tree a -> l +rendertree = tree (raw . render)