open-pandoc-1.5.1.1: Conversion between markup formats

Portabilityportable
Stabilityalpha
MaintainerJohn MacFarlane <jgm@berkeley.edu>

Text.Pandoc.Blocks

Description

Functions for the manipulation of fixed-width blocks of text. These are used in the construction of plain-text tables.

Synopsis

Documentation

data TextBlock Source

A fixed-width block of text. Parameters are width of block, height of block, and list of lines.

Constructors

TextBlock Int Int [String] 

Instances

docToBlockSource

Arguments

:: Int

Width of text block.

-> Doc

Doc to convert.

-> TextBlock 

Convert a Doc element into a TextBlock with a specified width.

blockToDoc :: TextBlock -> DocSource

Convert a TextBlock to a Doc element.

widthOfBlock :: TextBlock -> IntSource

Returns width of a TextBlock (number of columns).

heightOfBlock :: TextBlock -> IntSource

Returns height of a TextBlock (number of rows).

hcatBlocks :: [TextBlock] -> TextBlockSource

Concatenates a list of TextBlocks into a new TextBlock in which they appear side by side.

hsepBlocks :: [TextBlock] -> TextBlockSource

Like hcatBlocks, but inserts space between the TextBlocks.

centerAlignBlock :: TextBlock -> TextBlockSource

Centers the contents of a TextBlock within the block.

leftAlignBlock :: TextBlock -> TextBlockSource

Left-aligns the contents of a TextBlock within the block.

rightAlignBlock :: TextBlock -> TextBlockSource

Right-aligns the contents of a TextBlock within the block.