pandoc-types-1.16.1: Types for representing a structured document

CopyrightCopyright (C) 2006-2010 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <>
Safe HaskellNone



Definition of Pandoc data structure for format-neutral representation of documents.



lookupMeta :: String -> Meta -> Maybe MetaValue Source

Retrieve the metadata value for a given key.

docTitle :: Meta -> [Inline] Source

Extract document title from metadata; works just like the old docTitle.

docAuthors :: Meta -> [[Inline]] Source

Extract document authors from metadata; works just like the old docAuthors.

docDate :: Meta -> [Inline] Source

Extract date from metadata; works just like the old docDate.

data Block Source

Block element.


Plain [Inline]

Plain text, not a paragraph

Para [Inline]


CodeBlock Attr String

Code block (literal) with attributes

RawBlock Format String

Raw block

BlockQuote [Block]

Block quote (list of blocks)

OrderedList ListAttributes [[Block]]

Ordered list (attributes and a list of items, each a list of blocks)

BulletList [[Block]]

Bullet list (list of items, each a list of blocks)

DefinitionList [([Inline], [[Block]])]

Definition list Each list item is a pair consisting of a term (a list of inlines) and one or more definitions (each a list of blocks)

Header Int Attr [Inline]

Header - level (integer) and text (inlines)


Horizontal rule

Table [Inline] [Alignment] [Double] [TableCell] [[TableCell]]

Table, with caption, column alignments (required), relative column widths (0 = default), column headers (each a list of blocks), and rows (each a list of lists of blocks)

Div Attr [Block]

Generic block container with attributes



data Inline Source

Inline elements.


Str String

Text (string)

Emph [Inline]

Emphasized text (list of inlines)

Strong [Inline]

Strongly emphasized text (list of inlines)

Strikeout [Inline]

Strikeout text (list of inlines)

Superscript [Inline]

Superscripted text (list of inlines)

Subscript [Inline]

Subscripted text (list of inlines)

SmallCaps [Inline]

Small caps text (list of inlines)

Quoted QuoteType [Inline]

Quoted text (list of inlines)

Cite [Citation] [Inline]

Citation (list of inlines)

Code Attr String

Inline code (literal)


Inter-word space


Soft line break


Hard line break

Math MathType String

TeX math (literal)

RawInline Format String

Raw inline

Link Attr [Inline] Target

Hyperlink: alt text (list of inlines), target

Image Attr [Inline] Target

Image: alt text (list of inlines), target

Note [Block]

Footnote or endnote

Span Attr [Inline]

Generic inline container with attributes

type Attr = (String, [String], [(String, String)]) Source

Attributes: identifier, classes, key-value pairs

type TableCell = [Block] Source

Table cells are list of Blocks

type Target = (String, String) Source

Link target (URL, title).