Name

Markup —

This module defines some helper functions for generating texts with embedded attributes.

Synopsis

data
        FontSizeDef
data
        FontStretchDef
data
        FontStyleDef
data
        FontUnderlineDef
data
        FontVariantDef
data
        FontWeightDef
type
        Markup
data
        SpanAttribute
markSpan:: [SpanAttribute] -> String -> String

Todo

Add a numeric value to FontWeightDef.

Datatypes

data FontSizeDef

Define attributes for FontSize.

data FontSizeDef =FSPoint Double
| FSgiant
| FShuge
| FSlarge
| FSlarger
| FSmedium
| FSsmall
| FSsmaller
| FStiny
| FSunreadable

data FontStretchDef

Define attributes for FontStretch.

data FontStretchDef =FTcondensed
| FTexpanded
| FTextracondensed
| FTextraexpanded
| FTnormal
| FTsemicondensed
| FTsemiexpanded
| FTultracondensed
| FTultraexpanded

data FontStyleDef

Define attributes for FontStyle.

data FontStyleDef =FYitalic
| FYnormal
| FYoblique

data FontUnderlineDef

Define attributes for FontUnderline.

data FontUnderlineDef =FUdoulbe
| FUlow
| FUnone
| FUsingle

data FontVariantDef

Define attributes for FontVariant.

data FontVariantDef =FVnormal
| FVsmallcaps

data FontWeightDef

Define attributes for FontWeight.

data FontWeightDef =FWbold
| FWheavy
| FWlight
| FWnormal
| FWultrabold
| FWultralight

type Markup

MarkupString

Define a synonym for text with embedded markup commands.

Markup strings are just simple strings. But it's easier to tell if a method expects text with or without markup.

data SpanAttribute

These are all the attributes the markSpan function can express.

data SpanAttribute =FontBackground String
| FontDescr String
| FontFamily String
| FontForeground String
| FontLang String
| FontRise Double
| FontSize FontSizeDef
| FontStretch FontStretchDef
| FontStyle FontStyleDef
| FontUnderline FontUnderlineDef
| FontVariant FontVariantDef
| FontWeight FontWeightDef

Methods

markSpan

Create the most generic span attribute.

markSpan:: [SpanAttribute]:: String:: String
attrstext