Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exports those minimal things you need to work with HaTeX. Those things are:
- The
LaTeX
datatype. - The
<>
operator, to appendLaTeX
values. - The Text.LaTeX.Base.Render module, to render a
LaTeX
value intoText
. - The Text.LaTeX.Base.Types module, which contains several types used by other modules.
- The Text.LaTeX.Base.Commands module, which exports the LaTeX standard commands and environments.
- The Text.LaTeX.Base.Writer module, to work with the monad interface of the library.
- The Text.LaTeX.Base.Texy module, which exports the
Texy
class. Useful to pretty-print values in LaTeX form.
- data LaTeX
- protectString :: String -> String
- protectText :: Text -> Text
- module Text.LaTeX.Base.Render
- module Text.LaTeX.Base.Types
- module Text.LaTeX.Base.Commands
- module Text.LaTeX.Base.Writer
- module Text.LaTeX.Base.Texy
- class Monoid a where
- (<>) :: Monoid m => m -> m -> m
LaTeX
datatype
Type of LaTeX
blocks.
Eq LaTeX Source # | |
Show LaTeX Source # | |
IsString LaTeX Source # | Method |
Monoid LaTeX Source # | Method |
Arbitrary LaTeX Source # | |
LaTeXC LaTeX Source # | This instance just sets |
Render LaTeX Source # | |
Texy LaTeX Source # | |
Escaping reserved characters
Internal re-exports
module Text.LaTeX.Base.Render
module Text.LaTeX.Base.Types
module Text.LaTeX.Base.Commands
module Text.LaTeX.Base.Writer
module Text.LaTeX.Base.Texy
Monoids
Since the Monoid
instance is the only way to append LaTeX
values, a re-export of the Monoid
class is given here for convenience.
The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:
mappend mempty x = x
mappend x mempty = x
mappend x (mappend y z) = mappend (mappend x y) z
mconcat =
foldr
mappend mempty
The method names refer to the monoid of lists under concatenation, but there are many other instances.
Some types can be viewed as a monoid in more than one way,
e.g. both addition and multiplication on numbers.
In such cases we often define newtype
s and make those instances
of Monoid
, e.g. Sum
and Product
.
Monoid Ordering | |
Monoid () | |
Monoid All | |
Monoid Any | |
Monoid ByteString | |
Monoid ByteString | |
Monoid Builder | |
Monoid IntSet | |
Monoid Doc | |
Monoid LaTeX # | Method |
Monoid TeXCheck # | |
Monoid [a] | |
Monoid a => Monoid (Maybe a) | Lift a semigroup into |
Monoid a => Monoid (IO a) | |
Ord a => Monoid (Max a) | |
Ord a => Monoid (Min a) | |
Monoid a => Monoid (Identity a) | |
(Ord a, Bounded a) => Monoid (Min a) | |
(Ord a, Bounded a) => Monoid (Max a) | |
Monoid m => Monoid (WrappedMonoid m) | |
Semigroup a => Monoid (Option a) | |
Monoid a => Monoid (Dual a) | |
Monoid (Endo a) | |
Num a => Monoid (Sum a) | |
Num a => Monoid (Product a) | |
Monoid (First a) | |
Monoid (Last a) | |
Ord a => Monoid (Max a) | |
Ord a => Monoid (Min a) | |
Monoid (Seq a) | |
Monoid (IntMap a) | |
Ord a => Monoid (Set a) | |
Monoid (Vector a) | |
Monoid a => Monoid (Matrix a) | |
Monoid (Doc a) | |
Monoid (Doc e) | |
Monoid b => Monoid (a -> b) | |
(Monoid a, Monoid b) => Monoid (a, b) | |
Monoid (Proxy k s) | |
Ord k => Monoid (Map k v) | |
(Monad m, Monoid a) => Monoid (LaTeXT m a) # | |
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | |
Monoid a => Monoid (Const k a b) | |
Alternative f => Monoid (Alt * f a) | |
(Semigroup a, Monoid a) => Monoid (Tagged k s a) | |
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | |
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) | |