HaTeX-3.4: The Haskell LaTeX library.

Safe HaskellNone

Text.LaTeX.Base

Contents

Description

This module exports those minimal things you need to work with HaTeX. Those things are:

Here are also defined Num and Fractional instances for both LaTeX and LaTeXT.

Synopsis

LaTeX datatype

data LaTeX Source

Type of LaTeX blocks.

Instances

Eq LaTeX 
Fractional LaTeX

Division uses the LaTeX frac command.

Num LaTeX

Careful! Method signum is undefined. Don't use it!

Show LaTeX 
IsString LaTeX

Method fromString escapes LaTeX reserved characters using protectString.

Monoid LaTeX

Method mappend is strict in both arguments (except in the case when the first argument is TeXEmpty).

LaTeXC LaTeX

This instance just sets liftListL = id.

Render LaTeX 

Escaping reserved characters

protectString :: String -> StringSource

Escape LaTeX reserved characters in a String.

protectText :: Text -> TextSource

Escape LaTeX reserved characters in a Text.

Internal re-exports

External re-exports

Since the Monoid instance is the only way to append LaTeX values, a re-export of Data.Monoid is given here.