pandoc-1.5.1.1: Conversion between markup formatsSource codeContentsIndex
Text.Pandoc.Definition
Portabilityportable
Stabilityalpha
MaintainerJohn MacFarlane <jgm@berkeley.edu>
Description
Definition of Pandoc data structure for format-neutral representation of documents.
Synopsis
data Pandoc = Pandoc Meta [Block]
data Meta = Meta {
docTitle :: [Inline]
docAuthors :: [[Inline]]
docDate :: [Inline]
}
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
= SingleQuote
| DoubleQuote
type Target = (String, String)
data MathType
= DisplayMath
| InlineMath
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]
processWith :: (Data a, Data b) => (a -> a) -> b -> b
processWithM :: (Monad m, Data a, Data b) => (a -> m a) -> b -> m b
queryWith :: (Data a, Data c) => (a -> [b]) -> c -> [b]
processPandoc :: Data a => (a -> a) -> Pandoc -> Pandoc
queryPandoc :: Data a => (a -> [b]) -> Pandoc -> [b]
Documentation
data Pandoc Source
Constructors
Pandoc Meta [Block]
data Meta Source
Bibliographic information for the document: title, authors, date.
Constructors
Meta
docTitle :: [Inline]
docAuthors :: [[Inline]]
docDate :: [Inline]
data Alignment Source
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
Decimal
LowerRoman
UpperRoman
LowerAlpha
UpperAlpha
data ListNumberDelim Source
Delimiter of list numbers.
Constructors
DefaultDelim
Period
OneParen
TwoParens
type Attr = (String, [String], [(String, String)])Source
Attributes: identifier, classes, key-value pairs
data Block Source
Block element.
Constructors
Plain [Inline]Plain text, not a paragraph
Para [Inline]Paragraph
CodeBlock Attr StringCode block (literal) with attributes
RawHtml StringRaw 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 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 [Inline]Header - level (integer) and text (inlines)
HorizontalRuleHorizontal rule
Table [Inline] [Alignment] [Double] [[Block]] [[[Block]]]Table, with caption, column alignments, relative column widths (0 = default), column headers (each a list of blocks), and rows (each a list of lists of blocks)
NullNothing
data QuoteType Source
Type of quotation marks to use in Quoted inline.
Constructors
SingleQuote
DoubleQuote
type Target = (String, String)Source
Link target (URL, title).
data MathType Source
Type of math element (display or inline).
Constructors
DisplayMath
InlineMath
data Inline Source
Inline elements.
Constructors
Str StringText (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 StringInline code (literal)
SpaceInter-word space
EmDashEm dash
EnDashEn dash
ApostropheApostrophe
EllipsesEllipses
LineBreakHard line break
Math MathType StringTeX math (literal)
TeX StringLaTeX code (literal)
HtmlInline StringHTML code (literal)
Link [Inline] TargetHyperlink: text (list of inlines), target
Image [Inline] TargetImage: alt text (list of inlines), target and target
Note [Block]Footnote or endnote
processWith :: (Data a, Data b) => (a -> a) -> b -> bSource
Applies a transformation on as to matching elements in a b.
processWithM :: (Monad m, Data a, Data b) => (a -> m a) -> b -> m bSource
Like processWith, but with monadic transformations.
queryWith :: (Data a, Data c) => (a -> [b]) -> c -> [b]Source
Runs a query on matching a elements in a c.
processPandoc :: Data a => (a -> a) -> Pandoc -> PandocSource
queryPandoc :: Data a => (a -> [b]) -> Pandoc -> [b]Source
Produced by Haddock version 2.6.0