Copyright | Copyright (C) 2006-2010 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Text.Pandoc.Definition
Description
Definition of Pandoc
data structure for format-neutral representation
of documents.
- data Pandoc = Pandoc Meta [Block]
- newtype Meta = Meta {}
- data MetaValue
- = MetaMap (Map String MetaValue)
- | MetaList [MetaValue]
- | MetaBool Bool
- | MetaString String
- | MetaInlines [Inline]
- | MetaBlocks [Block]
- nullMeta :: Meta
- isNullMeta :: Meta -> Bool
- lookupMeta :: String -> Meta -> Maybe MetaValue
- docTitle :: Meta -> [Inline]
- docAuthors :: Meta -> [[Inline]]
- docDate :: Meta -> [Inline]
- data Block
- = Plain [Inline]
- | Para [Inline]
- | CodeBlock Attr String
- | RawBlock Format String
- | BlockQuote [Block]
- | OrderedList ListAttributes [[Block]]
- | BulletList [[Block]]
- | DefinitionList [([Inline], [[Block]])]
- | Header Int Attr [Inline]
- | HorizontalRule
- | Table [Inline] [Alignment] [Double] [TableCell] [[TableCell]]
- | Figure FigureType Attr [Block] PreparedContent [Inline]
- | ImageGrid [[Inline]]
- | Statement StatementAttr [Block]
- | Proof [Inline] [Block]
- | Div Attr [Block]
- | Null
- data Inline
- = Str String
- | Emph [Inline]
- | Strong [Inline]
- | Strikeout [Inline]
- | Superscript [Inline]
- | Subscript [Inline]
- | SmallCaps [Inline]
- | Quoted QuoteType [Inline]
- | Cite [Citation] [Inline]
- | NumRef NumberedReference String
- | Code Attr String
- | Space
- | LineBreak
- | Math MathType String
- | RawInline Format String
- | Link [Inline] Target
- | Image Attr [Inline] Target
- | Note [Block]
- | Span Attr [Inline]
- data Alignment
- type ListAttributes = (Int, ListNumberStyle, ListNumberDelim)
- data ListNumberStyle
- data ListNumberDelim
- newtype Format = Format String
- type Attr = (String, [String], [(String, String)])
- nullAttr :: Attr
- type TableCell = [Block]
- data QuoteType
- type Target = (String, String)
- data MathType
- data FigureType
- data PreparedContent = PreparedContent {}
- noPrepContent :: PreparedContent
- data StatementAttr = StatementAttr {}
- data StatementStyle
- data Citation = Citation {}
- data CitationMode
- data NumberedReference = NumberedReference {}
- data NumberedReferenceStyle
Documentation
Metadata for the document: title, authors, date.
Constructors
MetaMap (Map String MetaValue) | |
MetaList [MetaValue] | |
MetaBool Bool | |
MetaString String | |
MetaInlines [Inline] | |
MetaBlocks [Block] |
isNullMeta :: Meta -> Bool Source
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
.
Block element.
Constructors
Plain [Inline] | Plain text, not a paragraph |
Para [Inline] | Paragraph |
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) |
HorizontalRule | 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) |
Figure FigureType Attr [Block] PreparedContent [Inline] | A floating figure, containing for example images, tables, highlighted code, pseudocode, etc. Differentiated by FigureType. Has attribures, list of float content (typically just 1), a FloatFallback for "pre-compiled" float content,and a caption (inlines) for the whole figure. |
ImageGrid [[Inline]] | ImageGrid, containing rows of images, intended to be used primarily in Floats. In this context, alt texts will be treated as captions for each individual image. |
Statement StatementAttr [Block] | Standalone statements, can be sequentially numbered and cross-referenced, and optinally may have a Proof block inside its body. |
Proof [Inline] [Block] | Proofs (AMS-style), with an optional alternate title, and proof text |
Div Attr [Block] | Generic block container with attributes |
Null | Nothing |
Instances
Inline elements.
Constructors
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) |
NumRef NumberedReference String | Reference (literal) |
Code Attr String | Inline code (literal) |
Space | Inter-word space |
LineBreak | Hard line break |
Math MathType String | TeX math (literal) |
RawInline Format String | Raw inline |
Link [Inline] Target | Hyperlink: 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 |
Instances
Alignment of a table column.
Constructors
AlignLeft | |
AlignRight | |
AlignCenter | |
AlignDefault |
type ListAttributes = (Int, ListNumberStyle, ListNumberDelim) Source
List attributes.
data ListNumberStyle Source
Style of list numbers.
Constructors
DefaultStyle | |
Example | |
Decimal | |
LowerRoman | |
UpperRoman | |
LowerAlpha | |
UpperAlpha |
data ListNumberDelim Source
Delimiter of list numbers.
Constructors
DefaultDelim | |
Period | |
OneParen | |
TwoParens |
Formats for raw blocks
type Attr = (String, [String], [(String, String)]) Source
Attributes: identifier, classes, key-value pairs
Type of quotation marks to use in Quoted inline.
Constructors
SingleQuote | |
DoubleQuote |
Type of math element (display or inline).
Constructors
DisplayMath Attr | |
InlineMath |
data FigureType Source
Type of figure, mainly used to differentiate content (i.e., images vs tables). ImageFigure contains a ImageGrid. TableFigure contains one or more Tables. LineBlockFigure contains one or more Paras (intended for algorithms and poetry). ListingFigure contains one or more CodeBlocks.
Constructors
ImageFigure | |
TableFigure | |
LineBlockFigure | |
ListingFigure |
data PreparedContent Source
Pre-rendered figure content intended to archive final, professionally typeset or drawn figures from content already described in markdown format (an image and/or latex code)
Constructors
PreparedContent | |
Fields |
data StatementAttr Source
Statement Attributes: identifier, label (inlines with raw), name of counter, hiearchy level, pre-computed numerical label, caption,
Constructors
StatementAttr | |
Fields
|
data StatementStyle Source
Type of statement, rought equivalent to amsthm
plain, defninition, and remark
Constructors
Citation | |
Fields
|
data CitationMode Source
Constructors
AuthorInText | |
SuppressAuthor | |
NormalCitation |
data NumberedReference Source
Constructors
NumberedReference | |
Fields
|
data NumberedReferenceStyle Source
Constructors
PlainNumRef | |
ParenthesesNumRef |
Instances