Portability | portable |
---|---|
Stability | alpha |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Definition of Pandoc
data structure for format-neutral representation
of documents.
- data Pandoc = Pandoc Meta [Block]
- data Meta = Meta [Inline] [String] String
- data Alignment
- = AlignLeft
- | AlignRight
- | AlignCenter
- | AlignDefault
- type ListAttributes = (Int, ListNumberStyle, ListNumberDelim)
- data ListNumberStyle
- = DefaultStyle
- | Decimal
- | LowerRoman
- | UpperRoman
- | LowerAlpha
- | UpperAlpha
- data ListNumberDelim
- = DefaultDelim
- | Period
- | OneParen
- | TwoParens
- type Attr = (String, [String], [(String, String)])
- data Block
- = Plain [Inline]
- | Para [Inline]
- | CodeBlock Attr String
- | RawHtml String
- | BlockQuote [Block]
- | OrderedList ListAttributes [[Block]]
- | BulletList [[Block]]
- | DefinitionList [([Inline], [Block])]
- | Header Int [Inline]
- | HorizontalRule
- | Table [Inline] [Alignment] [Double] [[Block]] [[[Block]]]
- | Null
- data QuoteType
- type Target = (String, String)
- data MathType
- data Inline
- = Str String
- | Emph [Inline]
- | Strong [Inline]
- | Strikeout [Inline]
- | Superscript [Inline]
- | Subscript [Inline]
- | SmallCaps [Inline]
- | Quoted QuoteType [Inline]
- | Cite [Target] [Inline]
- | Code String
- | Space
- | EmDash
- | EnDash
- | Apostrophe
- | Ellipses
- | LineBreak
- | Math MathType String
- | TeX String
- | HtmlInline String
- | Link [Inline] Target
- | Image [Inline] Target
- | Note [Block]
- processPandoc :: Typeable a => (a -> a) -> Pandoc -> Pandoc
- queryPandoc :: Typeable a => (a -> [b]) -> Pandoc -> [b]
Documentation
Bibliographic information for the document: title (list of Inline
),
authors (list of strings), date (string).
Alignment of a table column.
type ListAttributes = (Int, ListNumberStyle, ListNumberDelim)Source
List attributes.
data ListNumberStyle Source
Style of list numbers.
data ListNumberDelim Source
Delimiter of list numbers.
type Attr = (String, [String], [(String, String)])Source
Attributes: identifier, classes, key-value pairs
Block element.
Plain [Inline] | Plain text, not a paragraph |
Para [Inline] | Paragraph |
CodeBlock Attr String | Code block (literal) with attributes |
RawHtml String | Raw HTML block (literal) |
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 (list of items, each a pair of an inline list, the term, and a block list) |
Header Int [Inline] | Header - level (integer) and text (inlines) |
HorizontalRule | Horizontal rule |
Table [Inline] [Alignment] [Double] [[Block]] [[[Block]]] | Table, with caption, column alignments, relative column widths, column headers (each a list of blocks), and rows (each a list of lists of blocks) |
Null | Nothing |
Type of quotation marks to use in Quoted inline.
Type of math element (display or inline).
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 [Target] [Inline] | Citation (list of inlines) |
Code String | Inline code (literal) |
Space | Inter-word space |
EmDash | Em dash |
EnDash | En dash |
Apostrophe | Apostrophe |
Ellipses | Ellipses |
LineBreak | Hard line break |
Math MathType String | TeX math (literal) |
TeX String | LaTeX code (literal) |
HtmlInline String | HTML code (literal) |
Link [Inline] Target | Hyperlink: text (list of inlines), target |
Image [Inline] Target | Image: alt text (list of inlines), target and target |
Note [Block] | Footnote or endnote |
processPandoc :: Typeable a => (a -> a) -> Pandoc -> PandocSource
Applies a transformation to matching elements in a Pandoc document.
queryPandoc :: Typeable a => (a -> [b]) -> Pandoc -> [b]Source
Runs a query on matching elements in a Pandoc document.