HaTeX-3.0.0: LaTeX code writer.

Text.LaTeX.Base.Syntax

Contents

Description

LaTeX syntax description in the definition of the LaTeX datatype. If you want to add new commands or environments not defined in the library, import this module and use LaTeX data constructors.

Synopsis

LaTeX datatype

data LaTeX Source

A LaTeX object represents some expression written in LaTeX.

Constructors

TeXRaw Text

Raw text.

TeXComm String [TeXArg]

Constructor for commands. First argument is the name of the command. Second, its arguments.

TeXCommS String 
TeXEnv String [TeXArg] LaTeX

Constructor for environments. First argument is the name of the environment. Second, its arguments. Third, its content.

TeXMath LaTeX

Mathematical expressions.

TeXNewLine Bool

Newline character.

TeXOp String LaTeX LaTeX

Operators.

TeXBraces LaTeX 
TeXSeq LaTeX LaTeX

Sequencing of LaTeX expressions. Use <> preferably.

TeXEmpty

An empty expression. Neutral element of <>.

Instances

Show LaTeX 
IsString LaTeX

fromString escapes LaTeX reserved characters.

Monoid LaTeX

mappend is strict in its first argument.

Render LaTeX 

data TeXArg Source

An argument for a LaTeX command or environment.

Constructors

OptArg LaTeX

Optional argument.

FixArg LaTeX

Fixed argument.

MOptArg [LaTeX]

Multiple optional argument.

SymArg LaTeX

An argument enclosed between < and >.

MSymArg [LaTeX]

Version of SymArg with multiple options.

Instances

(<>) :: Monoid a => a -> a -> aSource

Alias for mappend.