Safe Haskell | None |
---|
- data Measure
- data MathType
- = Parentheses
- | Square
- | Dollar
- data LaTeX
- data TeXArg
- (<>) :: Monoid m => m -> m -> m
- protectString :: String -> String
- protectText :: Text -> Text
LaTeX
datatype
Measure units defined in LaTeX. Use CustomMeasure
to use commands like textwidth
.
For instance:
rule Nothing (CustomMeasure linewidth) (Pt 2)
This will create a black box (see rule
) as wide as the text and two points tall.
Pt Int | A point is 1/72.27 inch, that means about 0.0138 inch or 0.3515 mm. |
Mm Double | Millimeter. |
Cm Double | Centimeter. |
In Double | Inch. |
Ex Double | The height of an "x" in the current font. |
Em Double | The width of an "M" in the current font. |
CustomMeasure LaTeX | You can introduce a |
Different types of syntax for mathematical expressions.
Type of LaTeX
blocks.
TeXRaw Text | Raw text. |
TeXComm String [TeXArg] | Constructor for commands. First argument is the name of the command. Second, its arguments. |
TeXCommS String | Constructor for commands with no arguments. |
TeXEnv String [TeXArg] LaTeX | Constructor for environments. First argument is the name of the environment. Second, its arguments. Third, its content. |
TeXMath MathType LaTeX | Mathematical expressions. |
TeXLineBreak (Maybe Measure) Bool | Line break command. |
TeXOp String LaTeX LaTeX | Operators. |
TeXBraces LaTeX | A expression between braces. |
TeXComment Text | Comments. |
TeXSeq LaTeX LaTeX | |
TeXEmpty | An empty block.
Neutral element of |
Eq LaTeX | |
Floating LaTeX | |
Fractional LaTeX | Division uses the LaTeX |
Num LaTeX | Careful! Method |
Show LaTeX | |
IsString LaTeX | Method |
Monoid LaTeX | Method |
LaTeXC LaTeX | This instance just sets |
Render LaTeX |
An argument for a LaTeX
command or environment.
Escaping reserved characters
protectString :: String -> StringSource
Escape LaTeX reserved characters in a String
.
protectText :: Text -> TextSource
Escape LaTeX reserved characters in a Text
.