Use registerHeader in RST and LaTeX readers.
This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
This commit is contained in:
parent
6ed41fdfcc
commit
9282f63278
10 changed files with 76 additions and 74 deletions
|
@ -318,9 +318,9 @@ section (ident, classes, kvs) lvl = do
|
|||
let lvl' = if hasChapters then lvl + 1 else lvl
|
||||
skipopts
|
||||
contents <- grouped inline
|
||||
lab <- option ident $ try $ spaces >> controlSeq "label" >>
|
||||
spaces >> braced
|
||||
return $ headerWith (lab, classes, kvs) lvl' contents
|
||||
lab <- option ident $ try (spaces >> controlSeq "label" >> spaces >> braced)
|
||||
attr' <- registerHeader (lab, classes, kvs) contents
|
||||
return $ headerWith attr' lvl' contents
|
||||
|
||||
inlineCommand :: LP Inlines
|
||||
inlineCommand = try $ do
|
||||
|
|
|
@ -275,7 +275,8 @@ doubleHeader = try $ do
|
|||
Just ind -> (headerTable, ind + 1)
|
||||
Nothing -> (headerTable ++ [DoubleHeader c], (length headerTable) + 1)
|
||||
setState (state { stateHeaderTable = headerTable' })
|
||||
return $ B.header level txt
|
||||
attr <- registerHeader nullAttr txt
|
||||
return $ B.headerWith attr level txt
|
||||
|
||||
-- a header with line on the bottom only
|
||||
singleHeader :: RSTParser Blocks
|
||||
|
@ -295,7 +296,8 @@ singleHeader = try $ do
|
|||
Just ind -> (headerTable, ind + 1)
|
||||
Nothing -> (headerTable ++ [SingleHeader c], (length headerTable) + 1)
|
||||
setState (state { stateHeaderTable = headerTable' })
|
||||
return $ B.header level txt
|
||||
attr <- registerHeader nullAttr txt
|
||||
return $ B.headerWith attr level txt
|
||||
|
||||
--
|
||||
-- hrule block
|
||||
|
|
|
@ -28,17 +28,17 @@ tests = [ testGroup "basic"
|
|||
|
||||
, testGroup "headers"
|
||||
[ "level 1" =:
|
||||
"\\section{header}" =?> header 1 "header"
|
||||
"\\section{header}" =?> headerWith ("header",[],[]) 1 "header"
|
||||
, "level 2" =:
|
||||
"\\subsection{header}" =?> header 2 "header"
|
||||
"\\subsection{header}" =?> headerWith ("header",[],[]) 2 "header"
|
||||
, "level 3" =:
|
||||
"\\subsubsection{header}" =?> header 3 "header"
|
||||
"\\subsubsection{header}" =?> headerWith ("header",[],[]) 3 "header"
|
||||
, "emph" =:
|
||||
"\\section{text \\emph{emph}}" =?>
|
||||
header 1 ("text" <> space <> emph "emph")
|
||||
headerWith ("text-emph",[],[]) 1 ("text" <> space <> emph "emph")
|
||||
, "link" =:
|
||||
"\\section{text \\href{/url}{link}}" =?>
|
||||
header 1 ("text" <> space <> link "/url" "" "link")
|
||||
headerWith ("text-link",[],[]) 1 ("text" <> space <> link "/url" "" "link")
|
||||
]
|
||||
|
||||
, testGroup "math"
|
||||
|
|
|
@ -2,25 +2,25 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[RawBlock (Format "latex") "\\maketitle"
|
||||
,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Headers"]
|
||||
,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
|
||||
,Header 3 ("",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Header 1 ("headers",[],[]) [Str "Headers"]
|
||||
,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
|
||||
,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Para [Str "Level",Space,Str "4"]
|
||||
,Para [Str "Level",Space,Str "5"]
|
||||
,Header 1 ("",[],[]) [Str "Level",Space,Str "1"]
|
||||
,Header 2 ("",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Header 3 ("",[],[]) [Str "Level",Space,Str "3"]
|
||||
,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
|
||||
,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
|
||||
,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
|
||||
,Header 2 ("",[],[]) [Str "Level",Space,Str "2"]
|
||||
,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
|
||||
,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Paragraphs"]
|
||||
,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
|
||||
,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
|
||||
,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
|
||||
,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
|
||||
,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
|
||||
,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
|
||||
,Para [Str "E-mail",Space,Str "style:"]
|
||||
,BlockQuote
|
||||
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
|
||||
|
@ -52,15 +52,15 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[Para [Str "Don\8217t",Space,Str "quote",Space,Str "me."]]]
|
||||
,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
|
||||
,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
|
||||
,Para [Str "Code:"]
|
||||
,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
|
||||
,Para [Str "And:"]
|
||||
,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
|
||||
,Para [Str "this",Space,Str "has",Space,Emph [Str "two",LineBreak,Str "lines"]]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Lists"]
|
||||
,Header 2 ("",[],[]) [Str "Unordered"]
|
||||
,Header 1 ("lists",[],[]) [Str "Lists"]
|
||||
,Header 2 ("unordered",[],[]) [Str "Unordered"]
|
||||
,Para [Str "Asterisks",Space,Str "tight:"]
|
||||
,BulletList
|
||||
[[Para [Str "asterisk",Space,Str "1"]]
|
||||
|
@ -91,7 +91,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[[Para [Str "Minus",Space,Str "1"]]
|
||||
,[Para [Str "Minus",Space,Str "2"]]
|
||||
,[Para [Str "Minus",Space,Str "3"]]]
|
||||
,Header 2 ("",[],[]) [Str "Ordered"]
|
||||
,Header 2 ("ordered",[],[]) [Str "Ordered"]
|
||||
,Para [Str "Tight:"]
|
||||
,OrderedList (1,Decimal,Period)
|
||||
[[Para [Str "First"]]
|
||||
|
@ -118,7 +118,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",Space,Str "back."]]
|
||||
,[Para [Str "Item",Space,Str "2."]]
|
||||
,[Para [Str "Item",Space,Str "3."]]]
|
||||
,Header 2 ("",[],[]) [Str "Nested"]
|
||||
,Header 2 ("nested",[],[]) [Str "Nested"]
|
||||
,BulletList
|
||||
[[Para [Str "Tab"]
|
||||
,BulletList
|
||||
|
@ -143,14 +143,14 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,[Para [Str "Fie"]]
|
||||
,[Para [Str "Foe"]]]]
|
||||
,[Para [Str "Third"]]]
|
||||
,Header 2 ("",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
|
||||
,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
|
||||
,BulletList
|
||||
[[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
|
||||
,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
|
||||
,BulletList
|
||||
[[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
|
||||
,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
|
||||
,Header 2 ("",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
|
||||
,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
|
||||
,OrderedList (2,Decimal,TwoParens)
|
||||
[[Para [Str "begins",Space,Str "with",Space,Str "2"]]
|
||||
,[Para [Str "and",Space,Str "now",Space,Str "3"]
|
||||
|
@ -180,7 +180,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "M.A.",Space,Str "2007"]
|
||||
,Para [Str "B.",Space,Str "Williams"]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Definition",Space,Str "Lists"]
|
||||
,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"]
|
||||
,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
|
||||
,DefinitionList
|
||||
[([Str "apple"],
|
||||
|
@ -215,7 +215,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,CodeBlock ("",[],[]) "{ orange code block }"
|
||||
,BlockQuote
|
||||
[Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])]
|
||||
,Header 1 ("",[],[]) [Str "HTML",Space,Str "Blocks"]
|
||||
,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
|
||||
,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
|
||||
,Para [Str "foo",Space,Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
|
||||
,Para [Str "foo",Space,Str "bar",Space,Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
|
||||
|
@ -234,7 +234,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,CodeBlock ("",[],[]) "<hr />"
|
||||
,Para [Str "Hr\8217s:"]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Inline",Space,Str "Markup"]
|
||||
,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
|
||||
,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
|
||||
,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
|
||||
,Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
|
||||
|
@ -248,7 +248,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
|
||||
,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a",Math InlineMath "\\sim",Str "b",Space,Str "c",Math InlineMath "\\sim",Str "d."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
|
||||
,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
|
||||
,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
|
||||
,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
|
||||
,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
|
||||
|
@ -258,7 +258,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."]
|
||||
,Para [Str "Ellipses\8230and\8230and\8230."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "LaTeX"]
|
||||
,Header 1 ("latex",[],[]) [Str "LaTeX"]
|
||||
,BulletList
|
||||
[[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str "22-23"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[22-23]{smith.1899}"]]]
|
||||
,[Para [RawInline (Format "latex") "\\doublespacing"]]
|
||||
|
@ -288,7 +288,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[[[Plain [Str "Animal"]]]
|
||||
,[[Plain [Str "Vegetable"]]]]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
|
||||
,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
|
||||
,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
|
||||
,BulletList
|
||||
[[Para [Str "I",Space,Str "hat:",Space,Str "\206"]]
|
||||
|
@ -318,8 +318,8 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Plus:",Space,Str "+"]
|
||||
,Para [Str "Minus:",Space,Str "-"]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Links"]
|
||||
,Header 2 ("",[],[]) [Str "Explicit"]
|
||||
,Header 1 ("links",[],[]) [Str "Links"]
|
||||
,Header 2 ("explicit",[],[]) [Str "Explicit"]
|
||||
,Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."]
|
||||
,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
|
||||
,Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
|
||||
|
@ -329,7 +329,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Link [Str "with_underscore"] ("/url/with_underscore","")]
|
||||
,Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
|
||||
,Para [Link [Str "Empty"] ("",""),Str "."]
|
||||
,Header 2 ("",[],[]) [Str "Reference"]
|
||||
,Header 2 ("reference",[],[]) [Str "Reference"]
|
||||
,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
|
||||
,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
|
||||
,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
|
||||
|
@ -342,12 +342,12 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,CodeBlock ("",[],[]) "[not]: /url"
|
||||
,Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
|
||||
,Para [Str "Foo",Space,Link [Str "biz"] ("/url/",""),Str "."]
|
||||
,Header 2 ("",[],[]) [Str "With",Space,Str "ampersands"]
|
||||
,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
|
||||
,Para [Str "Here\8217s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
|
||||
,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT&T"] ("http://att.com/",""),Str "."]
|
||||
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
|
||||
,Para [Str "Here\8217s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
|
||||
,Header 2 ("",[],[]) [Str "Autolinks"]
|
||||
,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
|
||||
,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
|
||||
,BulletList
|
||||
[[Para [Str "In",Space,Str "a",Space,Str "list?"]]
|
||||
|
@ -359,17 +359,17 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
|
||||
,CodeBlock ("",[],[]) "or here: <http://example.com/>"
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Images"]
|
||||
,Header 1 ("images",[],[]) [Str "Images"]
|
||||
,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
|
||||
,Para [Image [Str "image"] ("lalune.jpg","")]
|
||||
,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "image"] ("movie.jpg",""),Space,Str "icon."]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Footnotes"]
|
||||
,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
|
||||
,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
|
||||
,BlockQuote
|
||||
[Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
|
||||
,OrderedList (1,Decimal,Period)
|
||||
[[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]]
|
||||
,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]
|
||||
,Header 1 ("",[],[]) [Str "Escaped",Space,Str "characters"]
|
||||
,Header 1 ("escaped-characters",[],[]) [Str "Escaped",Space,Str "characters"]
|
||||
,Para [Str "$",Space,Str "%",Space,Str "&",Space,Str "#",Space,Str "_",Space,Str "{",Space,Str "}"]]
|
||||
|
|
|
@ -27,7 +27,7 @@ code > span.er { color: #ff0000; font-weight: bold; }
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>lhs test</h1>
|
||||
<h1 id="lhs-test">lhs test</h1>
|
||||
<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
|
||||
<pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=></span> (b <span class="ot">-></span> c <span class="ot">-></span> d) <span class="ot">-></span> a (b, c) d
|
||||
unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry
|
||||
|
|
|
@ -27,7 +27,7 @@ code > span.er { color: #ff0000; font-weight: bold; }
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>lhs test</h1>
|
||||
<h1 id="lhs-test">lhs test</h1>
|
||||
<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
|
||||
<pre class="sourceCode literate literatehaskell"><code class="sourceCode literatehaskell"><span class="ot">> unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=></span> (b <span class="ot">-></span> c <span class="ot">-></span> d) <span class="ot">-></span> a (b, c) d
|
||||
<span class="ot">></span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
\begin{document}
|
||||
|
||||
\section{lhs test}
|
||||
\section{lhs test}\label{lhs-test}
|
||||
|
||||
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
||||
return a single value:
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
\begin{document}
|
||||
|
||||
\section{lhs test}
|
||||
\section{lhs test}\label{lhs-test}
|
||||
|
||||
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
||||
return a single value:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[Header 1 ("",[],[]) [Str "lhs",Space,Str "test"]
|
||||
[Header 1 ("lhs-test",[],[]) [Str "lhs",Space,Str "test"]
|
||||
,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",Space,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"]
|
||||
,CodeBlock ("",["sourceCode","literate","haskell"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)"
|
||||
,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)."]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("revision",MetaBlocks [Para [Str "3"]]),("subtitle",MetaInlines [Str "Subtitle"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
|
||||
[Header 1 ("",[],[]) [Str "Level",Space,Str "one",Space,Str "header"]
|
||||
[Header 1 ("level-one-header",[],[]) [Str "Level",Space,Str "one",Space,Str "header"]
|
||||
,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
|
||||
,Header 2 ("",[],[]) [Str "Level",Space,Str "two",Space,Str "header"]
|
||||
,Header 3 ("",[],[]) [Str "Level",Space,Str "three"]
|
||||
,Header 4 ("",[],[]) [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Header 5 ("",[],[]) [Str "Level",Space,Str "five"]
|
||||
,Header 1 ("",[],[]) [Str "Paragraphs"]
|
||||
,Header 2 ("level-two-header",[],[]) [Str "Level",Space,Str "two",Space,Str "header"]
|
||||
,Header 3 ("level-three",[],[]) [Str "Level",Space,Str "three"]
|
||||
,Header 4 ("level-four-with-emphasis",[],[]) [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]]
|
||||
,Header 5 ("level-five",[],[]) [Str "Level",Space,Str "five"]
|
||||
,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
|
||||
,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
|
||||
,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
|
||||
,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
|
||||
|
@ -13,7 +13,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,HorizontalRule
|
||||
,Para [Str "Another:"]
|
||||
,HorizontalRule
|
||||
,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
|
||||
,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
|
||||
,Para [Str "Here\8217s",Space,Str "a",Space,Str "block",Space,Str "quote:"]
|
||||
,BlockQuote
|
||||
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
|
||||
|
@ -31,7 +31,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[Para [Str "nested"]
|
||||
,BlockQuote
|
||||
[Para [Str "nested"]]]]
|
||||
,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
|
||||
,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
|
||||
,Para [Str "Code:"]
|
||||
,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}"
|
||||
,CodeBlock ("",[],[]) "this code block is indented by one tab"
|
||||
|
@ -39,8 +39,8 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,CodeBlock ("",[],[]) "this block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
|
||||
,Para [Str "And:"]
|
||||
,CodeBlock ("",["sourceCode","python"],[]) "def my_function(x):\n return x + 1"
|
||||
,Header 1 ("",[],[]) [Str "Lists"]
|
||||
,Header 2 ("",[],[]) [Str "Unordered"]
|
||||
,Header 1 ("lists",[],[]) [Str "Lists"]
|
||||
,Header 2 ("unordered",[],[]) [Str "Unordered"]
|
||||
,Para [Str "Asterisks",Space,Str "tight:"]
|
||||
,BulletList
|
||||
[[Plain [Str "asterisk",Space,Str "1"]]
|
||||
|
@ -71,7 +71,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[[Plain [Str "Minus",Space,Str "1"]]
|
||||
,[Plain [Str "Minus",Space,Str "2"]]
|
||||
,[Plain [Str "Minus",Space,Str "3"]]]
|
||||
,Header 2 ("",[],[]) [Str "Ordered"]
|
||||
,Header 2 ("ordered",[],[]) [Str "Ordered"]
|
||||
,Para [Str "Tight:"]
|
||||
,OrderedList (1,Decimal,Period)
|
||||
[[Plain [Str "First"]]
|
||||
|
@ -115,7 +115,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,[Plain [Str "Fie"]]
|
||||
,[Plain [Str "Foe"]]]]]
|
||||
,[Plain [Str "Third"]]]
|
||||
,Header 2 ("",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
|
||||
,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
|
||||
,OrderedList (2,Decimal,TwoParens)
|
||||
[[Plain [Str "begins",Space,Str "with",Space,Str "2"]]
|
||||
,[Para [Str "and",Space,Str "now",Space,Str "3"]
|
||||
|
@ -145,7 +145,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,OrderedList (4,LowerAlpha,TwoParens)
|
||||
[[Plain [Str "item",Space,Str "1"]]
|
||||
,[Plain [Str "item",Space,Str "2"]]]
|
||||
,Header 2 ("",[],[]) [Str "Definition"]
|
||||
,Header 2 ("definition",[],[]) [Str "Definition"]
|
||||
,DefinitionList
|
||||
[([Str "term",Space,Str "1"],
|
||||
[[Para [Str "Definition",Space,Str "1."]]])
|
||||
|
@ -154,7 +154,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "2."]]])
|
||||
,([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]],
|
||||
[[Para [Str "Definition",Space,Str "3."]]])]
|
||||
,Header 1 ("",[],[]) [Str "Field",Space,Str "Lists"]
|
||||
,Header 1 ("field-lists",[],[]) [Str "Field",Space,Str "Lists"]
|
||||
,BlockQuote
|
||||
[DefinitionList
|
||||
[([Str "address"],
|
||||
|
@ -170,18 +170,18 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
[[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",Space,Str "USA"]]])
|
||||
,([Str "phone"],
|
||||
[[Para [Str "123-4567"]]])]
|
||||
,Header 1 ("",[],[]) [Str "HTML",Space,Str "Blocks"]
|
||||
,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
|
||||
,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
|
||||
,RawBlock (Format "html") "<div>foo</div>"
|
||||
,Para [Str "Now,",Space,Str "nested:"]
|
||||
,RawBlock (Format "html") "<div>\n <div>\n <div>\n foo\n </div>\n </div>\n</div>"
|
||||
,Header 1 ("",[],[]) [Str "LaTeX",Space,Str "Block"]
|
||||
,Header 1 ("latex-block",[],[]) [Str "LaTeX",Space,Str "Block"]
|
||||
,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
|
||||
,Header 1 ("",[],[]) [Str "Inline",Space,Str "Markup"]
|
||||
,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
|
||||
,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."]
|
||||
,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
|
||||
,Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."]
|
||||
,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
|
||||
,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
|
||||
,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
|
||||
,BulletList
|
||||
[[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
|
||||
|
@ -209,7 +209,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Bang:",Space,Str "!"]
|
||||
,Para [Str "Plus:",Space,Str "+"]
|
||||
,Para [Str "Minus:",Space,Str "-"]
|
||||
,Header 1 ("",[],[]) [Str "Links"]
|
||||
,Header 1 ("links",[],[]) [Str "Links"]
|
||||
,Para [Str "Explicit:",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."]
|
||||
,Para [Str "Two",Space,Str "anonymous",Space,Str "links:",Space,Link [Str "the",Space,Str "first"] ("/url1/",""),Space,Str "and",Space,Link [Str "the",Space,Str "second"] ("/url2/","")]
|
||||
,Para [Str "Reference",Space,Str "links:",Space,Link [Str "link1"] ("/url1/",""),Space,Str "and",Space,Link [Str "link2"] ("/url2/",""),Space,Str "and",Space,Link [Str "link1"] ("/url1/",""),Space,Str "again."]
|
||||
|
@ -218,20 +218,20 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,Para [Str "Autolinks:",Space,Link [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2",""),Space,Str "and",Space,Link [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net",""),Str "."]
|
||||
,Para [Str "But",Space,Str "not",Space,Str "here:"]
|
||||
,CodeBlock ("",[],[]) "http://example.com/"
|
||||
,Header 1 ("",[],[]) [Str "Images"]
|
||||
,Header 1 ("images",[],[]) [Str "Images"]
|
||||
,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
|
||||
,Para [Image [Str "image"] ("lalune.jpg","")]
|
||||
,Para [Image [Str "Voyage dans la Lune"] ("lalune.jpg","")]
|
||||
,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
|
||||
,Para [Str "And",Space,Str "an",Space,Link [Image [Str "A movie"] ("movie.jpg","")] ("/url",""),Str "."]
|
||||
,Header 1 ("",[],[]) [Str "Comments"]
|
||||
,Header 1 ("comments",[],[]) [Str "Comments"]
|
||||
,Para [Str "First",Space,Str "paragraph"]
|
||||
,Para [Str "Another",Space,Str "paragraph"]
|
||||
,Para [Str "A",Space,Str "third",Space,Str "paragraph"]
|
||||
,Header 1 ("",[],[]) [Str "Line",Space,Str "blocks"]
|
||||
,Header 1 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"]
|
||||
,Para [Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be",LineBreak,Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,",LineBreak,Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,",LineBreak,Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"]
|
||||
,Para [Str "Continuation",Space,Str "line",LineBreak,Str "\160\160and",Space,Str "another"]
|
||||
,Header 1 ("",[],[]) [Str "Simple",Space,Str "Tables"]
|
||||
,Header 1 ("simple-tables",[],[]) [Str "Simple",Space,Str "Tables"]
|
||||
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
|
||||
[[Plain [Str "col",Space,Str "1"]]
|
||||
,[Plain [Str "col",Space,Str "2"]]
|
||||
|
@ -253,7 +253,7 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,[[Plain [Str "r2",Space,Str "d"]]
|
||||
,[Plain [Str "e"]]
|
||||
,[Plain [Str "f"]]]]
|
||||
,Header 1 ("",[],[]) [Str "Grid",Space,Str "Tables"]
|
||||
,Header 1 ("grid-tables",[],[]) [Str "Grid",Space,Str "Tables"]
|
||||
,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.2375,0.15,0.1625]
|
||||
[[Plain [Str "col",Space,Str "1"]]
|
||||
,[Plain [Str "col",Space,Str "2"]]
|
||||
|
@ -298,26 +298,26 @@ Pandoc (Meta {unMeta = fromList [("authors",MetaList [MetaInlines [Str "John",Sp
|
|||
,[Plain [Str "b",Space,Str "2"]]
|
||||
,[Plain [Str "b",Space,Str "2"]]]]
|
||||
,[Plain [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"]]]]
|
||||
,Header 1 ("",[],[]) [Str "Footnotes"]
|
||||
,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
|
||||
,Para [Note [Para [Str "Note",Space,Str "with",Space,Str "one",Space,Str "line."]]]
|
||||
,Para [Note [Para [Str "Note",Space,Str "with",Space,Str "continuation",Space,Str "line."]]]
|
||||
,Para [Note [Para [Str "Note",Space,Str "with"],Para [Str "continuation",Space,Str "block."]]]
|
||||
,Para [Note [Para [Str "Note",Space,Str "with",Space,Str "continuation",Space,Str "line"],Para [Str "and",Space,Str "a",Space,Str "second",Space,Str "para."]]]
|
||||
,Para [Str "Not",Space,Str "in",Space,Str "note."]
|
||||
,Header 1 ("",[],[]) [Str "Math"]
|
||||
,Header 1 ("math",[],[]) [Str "Math"]
|
||||
,Para [Str "Some",Space,Str "inline",Space,Str "math",Space,Math InlineMath "E=mc^2",Str ".",Space,Str "Now",Space,Str "some",Space,Str "display",Space,Str "math:"]
|
||||
,Para [Math DisplayMath "E=mc^2"]
|
||||
,Para [Math DisplayMath "E = mc^2"]
|
||||
,Para [Math DisplayMath "E = mc^2",Math DisplayMath "\\alpha = \\beta"]
|
||||
,Para [Math DisplayMath "E &= mc^2\\\\\nF &= \\pi E",Math DisplayMath "F &= \\gamma \\alpha^2"]
|
||||
,Para [Str "All",Space,Str "done."]
|
||||
,Header 1 ("",[],[]) [Str "Default-Role"]
|
||||
,Header 1 ("default-role",[],[]) [Str "Default-Role"]
|
||||
,Para [Str "Try",Space,Str "changing",Space,Str "the",Space,Str "default",Space,Str "role",Space,Str "to",Space,Str "a",Space,Str "few",Space,Str "different",Space,Str "things."]
|
||||
,Header 2 ("",[],[]) [Str "Doesn\8217t",Space,Str "Break",Space,Str "Title",Space,Str "Parsing"]
|
||||
,Header 2 ("doesnt-break-title-parsing",[],[]) [Str "Doesn\8217t",Space,Str "Break",Space,Str "Title",Space,Str "Parsing"]
|
||||
,Para [Str "Inline",Space,Str "math:",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Str ".",Space,Str "Other",Space,Str "roles:",Space,Superscript [Str "super"],Str ",",Space,Subscript [Str "sub"],Str "."]
|
||||
,Para [Math DisplayMath "\\alpha = beta",Math DisplayMath "E = mc^2"]
|
||||
,Para [Str "Some",Space,Superscript [Str "of"],Space,Str "these",Space,Superscript [Str "words"],Space,Str "are",Space,Str "in",Space,Superscript [Str "superscript"],Str "."]
|
||||
,Para [Str "Reset",Space,Str "default-role",Space,Str "to",Space,Str "the",Space,Str "default",Space,Str "default."]
|
||||
,Para [Str "And",Space,Str "now",Space,Str "some-invalid-string-3231231",Space,Str "is",Space,Str "nonsense."]
|
||||
,Header 2 ("",[],[]) [Str "Literal",Space,Str "symbols"]
|
||||
,Header 2 ("literal-symbols",[],[]) [Str "Literal",Space,Str "symbols"]
|
||||
,Para [Str "2*2",Space,Str "=",Space,Str "4*1"]]
|
||||
|
|
Loading…
Add table
Reference in a new issue