scholdoc-texmath-0.1: Scholdoc fork of texmath

Safe HaskellNone
LanguageHaskell2010

Text.TeXMath.Types

Description

Types for representing a structured formula.

Synopsis

Documentation

data Exp Source

Constructors

ENumber String

A number (<mn> in MathML).

EGrouped [Exp]

A group of expressions that function as a unit (e.g. {...}) in TeX, <mrow>...</mrow> in MathML.

EDelimited String String [InEDelimited]

A group of expressions inside paired open and close delimiters (which may in some cases be null).

EIdentifier String

An identifier, e.g. a variable (<mi>...</mi> in MathML. Note that MathML tends to use <mi> tags for "sin" and other mathematical operators; these are represented as EMathOperator in TeXMath.

EMathOperator String

A spelled-out operator like lim or sin.

ESymbol TeXSymbolType String

A symbol.

ESpace Rational

A space, with the width specified in em.

ESub Exp Exp

An expression with a subscript. First argument is base, second subscript.

ESuper Exp Exp

An expresion with a superscript. First argument is base, second subscript.

ESubsup Exp Exp Exp

An expression with both a sub and a superscript. First argument is base, second subscript, third superscript.

EOver Bool Exp Exp

An expression with something over it. The first argument is True if the formula is "convertible:" that is, if the material over the formula should appear as a regular superscript in inline math. The second argument is the base, the third the expression that goes over it.

EUnder Bool Exp Exp

An expression with something under it. The arguments work as in EOver.

EUnderover Bool Exp Exp Exp

An expression with something over and something under it.

EPhantom Exp

A "phantom" operator that takes space but doesn't display.

EBoxed Exp

A boxed expression.

EFraction FractionType Exp Exp

A fraction. First argument is numerator, second denominator.

ERoot Exp Exp

An nth root. First argument is index, second is base.

ESqrt Exp

A square root.

EScaled Rational Exp

An expression that is scaled to some factor of its normal size.

EArray [Alignment] [ArrayLine]

An array or matrix. The first argument specifies the alignments of the columns; the second gives the contents of the lines. All of these lists should be the same length.

EText TextType String

Some normal text, possibly styled.

EStyled TextType [Exp]

A group of styled expressions.

Instances

type ArrayLine = [[Exp]] Source

data FractionType Source

Constructors

NormalFrac

Displayed or textual, acc to DisplayType

DisplayFrac

Force display mode

InlineFrac

Force inline mode (textual)

NoLineFrac

No line between top and bottom

data DisplayType Source

Constructors

DisplayBlock

A displayed formula.

DisplayInline

A formula rendered inline in text.

data Operator Source

A record of the MathML dictionary as defined in the specification

Constructors

Operator 

Fields

oper :: String

Operator

description :: String

Plain English Description

form :: FormType

Whether Prefix, Postfix or Infix

priority :: Int

Default priority for implicit nesting

lspace :: Int

Default Left Spacing

rspace :: Int

Default Right Spacing

properties :: [Property]

List of MathML properties

Instances

data Record Source

A record of the Unicode to LaTeX lookup table a full descripton can be seen <http://milde.users.sourceforge.net/LUCR/Math/data/unimathsymbols.txt here>

Constructors

Record 

Fields

uchar :: Char

Unicode Character

commands :: [(String, String)]

LaTeX commands (package, command)

category :: TeXSymbolType

TeX math category

comments :: String

Plain english description

Instances

data Position Source

Constructors

Under 
Over 

type Env = [String] Source

List of available packages

defaultEnv :: [String] Source

Contains amsmath and amssymbol

type InEDelimited = Either Middle Exp Source

An EDelimited element contains a string of ordinary expressions (represented here as Right values) or fences (represented here as Left, and in LaTeX using mid).