From e814a3f6d23f640b1aed5b7cb949459d514a3e33 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 8 Aug 2007 02:43:15 +0000 Subject: Major change in the way ordered lists are handled: + The changes are documented in README, under Lists. + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information, when possible. + The writers use this information to style ordered lists. + Test suites have been changed accordingly. Motivation: It's often useful to start lists with numbers other than 1, and to have control over the style of the list. Added to Text.Pandoc.Shared: + camelCaseToHyphenated + toRomanNumeral + anyOrderedListMarker + orderedListMarker + orderedListMarkers Added to Text.Pandoc.ParserCombinators: + charsInBalanced' + withHorizDisplacement + romanNumeral RST writer: + Force blank line before lists, so that sublists will be handled correctly. LaTeX reader: + Fixed bug in parsing of footnotes containing multiple paragraphs, introduced by use of charsInBalanced. Fix: use charsInBalanced' instead. LaTeX header: + use mathletters option in ucs package, so that basic unicode Greek letters will work properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b --- tests/html-reader.html | 56 ++++++++++++++++++++ tests/html-reader.native | 47 +++++++++++++---- tests/rst-reader.native | 42 ++++++++++++--- tests/rst-reader.rst | 31 +++++++++++ tests/s5.basic.html | 2 +- tests/s5.fancy.html | 2 +- tests/s5.inserts.html | 2 +- tests/tables.rst | 1 - tests/testsuite.native | 48 +++++++++++++---- tests/testsuite.txt | 26 ++++++++++ tests/writer.context | 132 ++++++++++++++++++++++++++++++----------------- tests/writer.docbook | 115 +++++++++++++++++++++++++++++++++++++---- tests/writer.html | 85 +++++++++++++++++++++++++----- tests/writer.latex | 67 ++++++++++++++++++++---- tests/writer.man | 97 ++++++++++++++++++++++++---------- tests/writer.markdown | 31 +++++++++++ tests/writer.native | 48 +++++++++++++---- tests/writer.rst | 114 +++++++++++++++++++++++++++++++--------- tests/writer.rtf | 17 ++++++ 19 files changed, 795 insertions(+), 168 deletions(-) (limited to 'tests') diff --git a/tests/html-reader.html b/tests/html-reader.html index 2c00f48b4..da6c075b3 100644 --- a/tests/html-reader.html +++ b/tests/html-reader.html @@ -232,6 +232,62 @@ These should not be escaped: \$ \\ \> \[ \{ +

Fancy list markers

  1. begins with 2
  2. and now 3

    with a continuation

    1. sublist with roman numerals, starting with 4
    2. more items
      1. a subsublist
      2. a subsublist

Nesting:

  1. Upper Alpha
    1. Upper Roman.
      1. Decimal start with 6
        1. Lower alpha with paren

Autonumbering:

  1. Autonumber.
  2. More.
    1. Nested.

Definition

Violin
diff --git a/tests/html-reader.native b/tests/html-reader.native index 242055f3d..59bf02e47 100644 --- a/tests/html-reader.native +++ b/tests/html-reader.native @@ -28,7 +28,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") [ Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] , CodeBlock "sub status {\n print \"working\";\n}" , Para [Str "A",Space,Str "list:"] - , OrderedList + , OrderedList (1,DefaultStyle,DefaultDelim) [ [ Plain [Str "item",Space,Str "one"] ] , [ Plain [Str "item",Space,Str "two"] ] ] , Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] @@ -44,7 +44,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") [ Para [Str "Example:"] , CodeBlock "sub status {\n print \"working\";\n}" ] , BlockQuote - [ OrderedList + [ OrderedList (1,DefaultStyle,DefaultDelim) [ [ Plain [Str "do",Space,Str "laundry"] ] , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ] , Para [Str "Here's",Space,Str "a",Space,Str "nested",Space,Str "one:"] @@ -95,27 +95,27 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , [ Para [Str "Minus",Space,Str "3"] ] ] , Header 2 [Str "Ordered"] , Para [Str "Tight:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Plain [Str "First"] ] , [ Plain [Str "Second"] ] , [ Plain [Str "Third"] ] ] , Para [Str "and:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Plain [Str "One"] ] , [ Plain [Str "Two"] ] , [ Plain [Str "Three"] ] ] , Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Para [Str "First"] ] , [ Para [Str "Second"] ] , [ Para [Str "Third"] ] ] , Para [Str "and",Space,Str "using",Space,Str "spaces:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Para [Str "One"] ] , [ Para [Str "Two"] ] , [ Para [Str "Three"] ] ] , Para [Str "Multiple",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] , 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's",Space,Str "back."] ], [ Para [Str "Item",Space,Str "2."] ] , [ Para [Str "Item",Space,Str "3."] ] ] @@ -128,7 +128,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") [ [ Plain [Str "Tab"] ] ] ] ] ] ] , Para [Str "Here's",Space,Str "another:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Plain [Str "First"] ] , [ Plain [Str "Second:"] , BulletList @@ -136,7 +136,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , [ Plain [Str "Fie"] ] , [ Plain [Str "Foe"] ] ] ], [ Plain [Str "Third"] ] ] , Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,DefaultStyle,DefaultDelim) [ [ Para [Str "First"] ] , [ Para [Str "Second:"] , BulletList @@ -150,6 +150,35 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] [] "") , 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"] +, OrderedList (2,Decimal,DefaultDelim) + [ [ Plain [Str "begins",Space,Str "with",Space,Str "2"] ] + , [ Para [Str "and",Space,Str "now",Space,Str "3"] + , Para [Str "with",Space,Str "a",Space,Str "continuation"] + , OrderedList (4,LowerRoman,DefaultDelim) + [ [ Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ] + , [ Plain [Str "more",Space,Str "items"] + , OrderedList (1,UpperAlpha,DefaultDelim) + [ [ Plain [Str "a",Space,Str "subsublist"] ] + , [ Plain [Str "a",Space,Str "subsublist"] ] ] ] ] ] ] +, Para [Str "Nesting:"] +, OrderedList (1,UpperAlpha,DefaultDelim) + [ [ Plain [Str "Upper",Space,Str "Alpha"] + , OrderedList (1,UpperRoman,DefaultDelim) + [ [ Plain [Str "Upper",Space,Str "Roman."] + , OrderedList (6,Decimal,DefaultDelim) + [ [ Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + , OrderedList (3,LowerAlpha,DefaultDelim) + [ [ Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ] + ] ] ] ] ] ] ] +, Para [Str "Autonumbering:"] +, OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Autonumber."] ] + , [ Plain [Str "More."] + , OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Nested."] ] + ] ] ] +, HorizontalRule , Header 2 [Str "Definition"] , DefinitionList [ ([Str "Violin"], diff --git a/tests/rst-reader.native b/tests/rst-reader.native index c5f1f87d2..948c04be5 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -27,7 +27,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str , Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"] , CodeBlock "sub status {\n print \"working\";\n}" , Para [Str "List",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote",Str ":"] - , OrderedList + , OrderedList (1,Decimal,Period) [ [ Plain [Str "item",Space,Str "one"] ] , [ Plain [Str "item",Space,Str "two"] ] ] , Para [Str "Nested",Space,Str "block",Space,Str "quotes",Str ":"] @@ -76,27 +76,27 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str , [ Para [Str "Minus",Space,Str "3"] ] ] , Header 2 [Str "Ordered"] , Para [Str "Tight",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "First"] ] , [ Plain [Str "Second"] ] , [ Plain [Str "Third"] ] ] , Para [Str "and",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "One"] ] , [ Plain [Str "Two"] ] , [ Plain [Str "Three"] ] ] , Para [Str "Loose",Space,Str "using",Space,Str "tabs",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second"] ] , [ Para [Str "Third"] ] ] , Para [Str "and",Space,Str "using",Space,Str "spaces",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "One"] ] , [ Para [Str "Two"] ] , [ Para [Str "Three"] ] ] , Para [Str "Multiple",Space,Str "paragraphs",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] , 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's",Space,Str "back."] ], [ Para [Str "Item",Space,Str "2."] ] , [ Para [Str "Item",Space,Str "3."] ] ] @@ -109,7 +109,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str [ [ Plain [Str "Tab"] ] ] ] ] ] ] , Para [Str "Here's",Space,Str "another",Str ":"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second",Str ":"] , BlockQuote @@ -117,6 +117,34 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ":",Space,Str [ [ Plain [Str "Fee"] ] , [ Plain [Str "Fie"] ] , [ Plain [Str "Foe"] ] ] ] ], [ Para [Str "Third"] ] ] +, Header 2 [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"] + , Para [Str "with",Space,Str "a",Space,Str "continuation"] + , OrderedList (4,LowerRoman,Period) + [ [ Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ] + , [ Para [Str "more",Space,Str "items"] + , OrderedList (1,UpperAlpha,TwoParens) + [ [ Plain [Str "a",Space,Str "subsublist"] ] + , [ Plain [Str "a",Space,Str "subsublist"] ] ] ] ] ] ] +, Para [Str "Nesting",Str ":"] +, OrderedList (1,UpperAlpha,Period) + [ [ Para [Str "Upper",Space,Str "Alpha"] + , OrderedList (1,UpperRoman,Period) + [ [ Para [Str "Upper",Space,Str "Roman."] + , OrderedList (6,Decimal,TwoParens) + [ [ Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + , OrderedList (3,LowerAlpha,OneParen) + [ [ Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ] + ] ] ] ] ] ] ] +, Para [Str "Autonumbering",Str ":"] +, OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Autonumber."] ] + , [ Para [Str "More."] + , OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Nested."] ] + ] ] ] , Header 2 [Str "Definition"] , DefinitionList [ ([Str "term",Space,Str "1"], diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index a31c14b3a..36fd4ff9d 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -211,6 +211,37 @@ Here's another: 3. Third +Fancy list markers +------------------ + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + + I. Upper Roman. + + (6) Decimal start with 6 + + c) Lower alpha with paren + +Autonumbering: + +#. Autonumber. +#. More. + + #. Nested. + Definition ---------- diff --git a/tests/s5.basic.html b/tests/s5.basic.html index eb4b4e106..bcee42175 100644 --- a/tests/s5.basic.html +++ b/tests/s5.basic.html @@ -1,4 +1,4 @@ - + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html ><head ><title diff --git a/tests/s5.inserts.html b/tests/s5.inserts.html index 9d9be77bc..27b1ab7a9 100644 --- a/tests/s5.inserts.html +++ b/tests/s5.inserts.html @@ -1,4 +1,4 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html ><head ><title diff --git a/tests/tables.rst b/tests/tables.rst index 715031b26..db5c1c3d8 100644 --- a/tests/tables.rst +++ b/tests/tables.rst @@ -69,4 +69,3 @@ Multiline table without caption: +-------------+------------+--------------+----------------------------+ - diff --git a/tests/testsuite.native b/tests/testsuite.native index ad9737a16..11719eb16 100644 --- a/tests/testsuite.native +++ b/tests/testsuite.native @@ -28,7 +28,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] , CodeBlock "sub status {\n print \"working\";\n}" , Para [Str "A",Space,Str "list:"] - , OrderedList + , OrderedList (1,Decimal,Period) [ [ Plain [Str "item",Space,Str "one"] ] , [ Plain [Str "item",Space,Str "two"] ] ] , Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] @@ -44,7 +44,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "Example:"] , CodeBlock "sub status {\n print \"working\";\n}" ] , BlockQuote - [ OrderedList + [ OrderedList (1,Decimal,Period) [ [ Plain [Str "do",Space,Str "laundry"] ] , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ] , Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"] @@ -95,27 +95,27 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , [ Para [Str "Minus",Space,Str "3"] ] ] , Header 2 [Str "Ordered"] , Para [Str "Tight:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "First"] ] , [ Plain [Str "Second"] ] , [ Plain [Str "Third"] ] ] , Para [Str "and:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "One"] ] , [ Plain [Str "Two"] ] , [ Plain [Str "Three"] ] ] , Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second"] ] , [ Para [Str "Third"] ] ] , Para [Str "and",Space,Str "using",Space,Str "spaces:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "One"] ] , [ Para [Str "Two"] ] , [ Para [Str "Three"] ] ] , Para [Str "Multiple",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one",Str "."] , Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",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",Apostrophe,Str "s",Space,Str "back",Str "."] ], [ Para [Str "Item",Space,Str "2",Str "."] ] , [ Para [Str "Item",Space,Str "3",Str "."] ] ] @@ -128,7 +128,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ [ Plain [Str "Tab"] ] ] ] ] ] ] , Para [Str "Here",Apostrophe,Str "s",Space,Str "another:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "First"] ] , [ Plain [Str "Second:"] , BulletList @@ -136,7 +136,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , [ Plain [Str "Fie"] ] , [ Plain [Str "Foe"] ] ] ], [ Plain [Str "Third"] ] ] , Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second:"] , BulletList @@ -150,6 +150,34 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , 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"] +, OrderedList (2,Decimal,TwoParens) + [ [ Plain [Str "begins",Space,Str "with",Space,Str "2"] ] + , [ Para [Str "and",Space,Str "now",Space,Str "3"] + , Para [Str "with",Space,Str "a",Space,Str "continuation"] + , OrderedList (4,LowerRoman,Period) + [ [ Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ] + , [ Plain [Str "more",Space,Str "items"] + , OrderedList (1,UpperAlpha,TwoParens) + [ [ Plain [Str "a",Space,Str "subsublist"] ] + , [ Plain [Str "a",Space,Str "subsublist"] ] ] ] ] ] ] +, Para [Str "Nesting:"] +, OrderedList (1,UpperAlpha,Period) + [ [ Plain [Str "Upper",Space,Str "Alpha"] + , OrderedList (1,UpperRoman,Period) + [ [ Plain [Str "Upper",Space,Str "Roman",Str "."] + , OrderedList (6,Decimal,TwoParens) + [ [ Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + , OrderedList (3,LowerAlpha,OneParen) + [ [ Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ] + ] ] ] ] ] ] ] +, Para [Str "Autonumbering:"] +, OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Autonumber",Str "."] ] + , [ Plain [Str "More",Str "."] + , OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Nested",Str "."] ] + ] ] ] , HorizontalRule , Header 1 [Str "Definition",Space,Str "Lists"] , Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] @@ -363,7 +391,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , BlockQuote [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]] ] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] , 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",Str "."] ] diff --git a/tests/testsuite.txt b/tests/testsuite.txt index af823ff57..31b5c3bed 100644 --- a/tests/testsuite.txt +++ b/tests/testsuite.txt @@ -255,6 +255,32 @@ Same thing but with paragraphs: + this is an example list item indented with spaces +## Fancy list markers + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, + starting with 4 + v. more items + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + I. Upper Roman. + (6) Decimal start with 6 + c) Lower alpha with paren + +Autonumbering: + + #. Autonumber. + #. More. + #. Nested. + * * * * * # Definition Lists diff --git a/tests/writer.context b/tests/writer.context index afbd6e075..fe7c58851 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -127,10 +127,10 @@ sub status { \stoptyping A list: -\startltxenum -\item item one -\item item two -\stopltxenum +\startitemize +\sym{1.} item one +\sym{2.} item two +\stopitemize Nested block quotes: \startblockquote @@ -160,10 +160,10 @@ sub status { \stopblockquote \startblockquote -\startltxenum -\item do laundry -\item take out the trash -\stopltxenum +\startitemize +\sym{1.} do laundry +\sym{2.} take out the trash +\stopitemize \stopblockquote Here's a nested one: @@ -263,50 +263,50 @@ Minuses loose: Tight: -\startltxenum -\item First -\item Second -\item Third -\stopltxenum +\startitemize +\sym{1.} First +\sym{2.} Second +\sym{3.} Third +\stopitemize and: -\startltxenum -\item One -\item Two -\item Three -\stopltxenum +\startitemize +\sym{1.} One +\sym{2.} Two +\sym{3.} Three +\stopitemize Loose using tabs: -\startltxenum -\item First +\startitemize +\sym{1.} First -\item Second +\sym{2.} Second -\item Third +\sym{3.} Third -\stopltxenum +\stopitemize and using spaces: -\startltxenum -\item One +\startitemize +\sym{1.} One -\item Two +\sym{2.} Two -\item Three +\sym{3.} Three -\stopltxenum +\stopitemize Multiple paragraphs: -\startltxenum -\item Item 1, graf one. +\startitemize +\sym{1.} Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. -\item Item 2. +\sym{2.} Item 2. -\item Item 3. +\sym{3.} Item 3. -\stopltxenum +\stopitemize \subsection{Nested} \startltxitem @@ -320,31 +320,31 @@ Item 1. graf two. The quick brown fox jumped over the lazy dog's back. \stopltxitem Here's another: -\startltxenum -\item First -\item Second: +\startitemize +\sym{1.} First +\sym{2.} Second: \startltxitem \item Fee \item Fie \item Foe \stopltxitem -\item Third -\stopltxenum +\sym{3.} Third +\stopitemize Same thing but with paragraphs: -\startltxenum -\item First +\startitemize +\sym{1.} First -\item Second: +\sym{2.} Second: \startltxitem \item Fee \item Fie \item Foe \stopltxitem -\item Third +\sym{3.} Third -\stopltxenum +\stopitemize \subsection{Tabs and spaces} \startltxitem @@ -359,6 +359,46 @@ Same thing but with paragraphs: \stopltxitem \stopltxitem +\subsection{Fancy list markers} + +\startitemize[width=2em] +\sym{(2)} begins with 2 +\sym{(3)} and now 3 + +with a continuation + +\startitemize[width=2em] +\sym{iv.} sublist with roman numerals, starting with 4 +\sym{v.} more items +\startitemize[width=2em] +\sym{(A)} a subsublist +\sym{(B)} a subsublist +\stopitemize +\stopitemize +\stopitemize +Nesting: + +\startitemize +\sym{A.} Upper Alpha +\startitemize +\sym{I.} Upper Roman. +\startitemize[width=2em] +\sym{(6)} Decimal start with 6 +\startitemize +\sym{c)} Lower alpha with paren +\stopitemize +\stopitemize +\stopitemize +\stopitemize +Autonumbering: + +\startltxenum +\item Autonumber. +\item More. +\startltxenum +\item Nested. +\stopltxenum +\stopltxenum \thinrule \section{Definition Lists} @@ -712,11 +752,11 @@ Notes can go in quotes.\footnote{In quote. \stopblockquote -\startltxenum -\item And in list items.\footnote{In list. +\startitemize +\sym{1.} And in list items.\footnote{In list. } -\stopltxenum +\stopitemize This paragraph should not be part of the note, as it is not indented. diff --git a/tests/writer.docbook b/tests/writer.docbook index 596380f3f..390c9f4fe 100644 --- a/tests/writer.docbook +++ b/tests/writer.docbook @@ -95,7 +95,7 @@ sub status { <para> A list: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> item one @@ -138,7 +138,7 @@ sub status { </screen> </blockquote> <blockquote> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> do laundry @@ -321,7 +321,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> Tight: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> First @@ -341,7 +341,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> and: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> One @@ -361,7 +361,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> Loose using tabs: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> First @@ -381,7 +381,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> and using spaces: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> One @@ -401,7 +401,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> Multiple paragraphs: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> Item 1, graf one. @@ -449,7 +449,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> Here's another: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> First @@ -486,7 +486,7 @@ These should not be escaped: \$ \\ \> \[ \{ <para> Same thing but with paragraphs: </para> - <orderedlist> + <orderedlist numeration="arabic"> <listitem> <para> First @@ -548,6 +548,101 @@ These should not be escaped: \$ \\ \> \[ \{ </listitem> </itemizedlist> </section> + <section> + <title>Fancy list markers + + + + begins with 2 + + + + + and now 3 + + + with a continuation + + + + + sublist with roman numerals, starting with 4 + + + + + more items + + + + + a subsublist + + + + + a subsublist + + + + + + + + + Nesting: + + + + + Upper Alpha + + + + + Upper Roman. + + + + + Decimal start with 6 + + + + + Lower alpha with paren + + + + + + + + + + + Autonumbering: + + + + + Autonumber. + + + + + More. + + + + + Nested. + + + + + +
Definition Lists @@ -1158,7 +1253,7 @@ or here: <http://example.com/> - + And in list diff --git a/tests/writer.html b/tests/writer.html index 6f24e511a..6c3637315 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -1,4 +1,4 @@ - + <meta name="author" content="Anonymous" /><meta name="date" content="July 17, 2006" /><style type="text/css" - >.strikeout { text-decoration: line-through; }</style + > +.strikeout { text-decoration: line-through; } +ol.decimal { list-style-type: decimal; } +ol.lower-alpha { list-style-type: lower-alpha; } +ol.lower-roman { list-style-type: lower-roman; } +ol.upper-alpha { list-style-type: upper-alpha; } +ol.upper-roman { list-style-type: upper-roman; } +</style ></head ><body ><h1 class="title" @@ -78,7 +85,7 @@ ></pre ><p >A list:</p - ><ol + ><ol class="decimal" ><li >item one</li ><li @@ -111,7 +118,7 @@ ></pre ></blockquote ><blockquote - ><ol + ><ol class="decimal" ><li >do laundry</li ><li @@ -242,7 +249,7 @@ These should not be escaped: \$ \\ \> \[ \{ >Ordered</h2 ><p >Tight:</p - ><ol + ><ol class="decimal" ><li >First</li ><li @@ -252,7 +259,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ol ><p >and:</p - ><ol + ><ol class="decimal" ><li >One</li ><li @@ -262,7 +269,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ol ><p >Loose using tabs:</p - ><ol + ><ol class="decimal" ><li ><p >First</p @@ -278,7 +285,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ol ><p >and using spaces:</p - ><ol + ><ol class="decimal" ><li ><p >One</p @@ -294,7 +301,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ol ><p >Multiple paragraphs:</p - ><ol + ><ol class="decimal" ><li ><p >Item 1, graf one.</p @@ -326,7 +333,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ul ><p >Here’s another:</p - ><ol + ><ol class="decimal" ><li >First</li ><li @@ -344,7 +351,7 @@ These should not be escaped: \$ \\ \> \[ \{ ></ol ><p >Same thing but with paragraphs:</p - ><ol + ><ol class="decimal" ><li ><p >First</p @@ -388,6 +395,60 @@ These should not be escaped: \$ \\ \> \[ \{ ></ul ></li ></ul + ><h2 id="fancy-list-markers" + >Fancy list markers</h2 + ><ol start="2" class="decimal" + ><li + >begins with 2</li + ><li + ><p + >and now 3</p + ><p + >with a continuation</p + ><ol start="4" class="lower-roman" + ><li + >sublist with roman numerals, starting with 4</li + ><li + >more items<ol class="upper-alpha" + ><li + >a subsublist</li + ><li + >a subsublist</li + ></ol + ></li + ></ol + ></li + ></ol + ><p + >Nesting:</p + ><ol class="upper-alpha" + ><li + >Upper Alpha<ol class="upper-roman" + ><li + >Upper Roman.<ol start="6" class="decimal" + ><li + >Decimal start with 6<ol start="3" class="lower-alpha" + ><li + >Lower alpha with paren</li + ></ol + ></li + ></ol + ></li + ></ol + ></li + ></ol + ><p + >Autonumbering:</p + ><ol + ><li + >Autonumber.</li + ><li + >More.<ol + ><li + >Nested.</li + ></ol + ></li + ></ol ><hr /><h1 id="definition-lists" >Definition Lists</h1 @@ -995,7 +1056,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+ ></a ></p ></blockquote - ><ol + ><ol class="decimal" ><li >And in list items.<a href="#fn5" class="footnoteRef" id="fnref5" ><sup diff --git a/tests/writer.latex b/tests/writer.latex index 15c4e558a..fb771182f 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -1,11 +1,12 @@ \documentclass{article} -\usepackage{ucs} +\usepackage[mathletters]{ucs} \usepackage[utf8x]{inputenc} \setlength{\parindent}{0pt} \setlength{\parskip}{6pt plus 2pt minus 1pt} \newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}} \usepackage[breaklinks=true]{hyperref} \usepackage[normalem]{ulem} +\usepackage{enumerate} \usepackage{fancyvrb} \usepackage{graphicx} \setcounter{secnumdepth}{0} @@ -75,7 +76,7 @@ sub status { \end{verbatim} A list: -\begin{enumerate} +\begin{enumerate}[1.] \item item one \item item two \end{enumerate} @@ -104,7 +105,7 @@ sub status { \end{verbatim} \end{quote} \begin{quote} -\begin{enumerate} +\begin{enumerate}[1.] \item do laundry \item take out the trash \end{enumerate} @@ -204,21 +205,21 @@ Minuses loose: Tight: -\begin{enumerate} +\begin{enumerate}[1.] \item First \item Second \item Third \end{enumerate} and: -\begin{enumerate} +\begin{enumerate}[1.] \item One \item Two \item Three \end{enumerate} Loose using tabs: -\begin{enumerate} +\begin{enumerate}[1.] \item First \item Second @@ -228,7 +229,7 @@ Loose using tabs: \end{enumerate} and using spaces: -\begin{enumerate} +\begin{enumerate}[1.] \item One \item Two @@ -238,7 +239,7 @@ and using spaces: \end{enumerate} Multiple paragraphs: -\begin{enumerate} +\begin{enumerate}[1.] \item Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. @@ -261,7 +262,7 @@ Item 1. graf two. The quick brown fox jumped over the lazy dog's back. \end{itemize} Here's another: -\begin{enumerate} +\begin{enumerate}[1.] \item First \item Second: \begin{itemize} @@ -273,7 +274,7 @@ Here's another: \end{enumerate} Same thing but with paragraphs: -\begin{enumerate} +\begin{enumerate}[1.] \item First \item Second: @@ -300,6 +301,50 @@ Same thing but with paragraphs: \end{itemize} \end{itemize} +\subsection{Fancy list markers} + +\begin{enumerate}[(1)] +\setcounter{enumi}{1} +\item begins with 2 +\item and now 3 + +with a continuation + +\begin{enumerate}[i.] +\setcounter{enumii}{3} +\item sublist with roman numerals, starting with 4 +\item more items +\begin{enumerate}[(A)] +\item a subsublist +\item a subsublist +\end{enumerate} +\end{enumerate} +\end{enumerate} +Nesting: + +\begin{enumerate}[A.] +\item Upper Alpha +\begin{enumerate}[I.] +\item Upper Roman. +\begin{enumerate}[(1)] +\setcounter{enumiii}{5} +\item Decimal start with 6 +\begin{enumerate}[a)] +\setcounter{enumiv}{2} +\item Lower alpha with paren +\end{enumerate} +\end{enumerate} +\end{enumerate} +\end{enumerate} +Autonumbering: + +\begin{enumerate} +\item Autonumber. +\item More. +\begin{enumerate} +\item Nested. +\end{enumerate} +\end{enumerate} \begin{center}\rule{3in}{0.4pt}\end{center} \section{Definition Lists} @@ -635,7 +680,7 @@ If you want, you can indent every line, but you can also be lazy and just indent Notes can go in quotes.\footnote{In quote.} \end{quote} -\begin{enumerate} +\begin{enumerate}[1.] \item And in list items.\footnote{In list.} \end{enumerate} This paragraph should not be part of the note, as it is not indented. diff --git a/tests/writer.man b/tests/writer.man index 08782effa..05d766108 100644 --- a/tests/writer.man +++ b/tests/writer.man @@ -54,9 +54,9 @@ Code in a block quote: \f[] .PP A list: -.IP 1. 4 +.IP "1." 3 item one -.IP 2. 4 +.IP "2." 3 item two .PP Nested block quotes: @@ -84,9 +84,9 @@ Example: \f[] .RE .RS -.IP 1. 4 +.IP "1." 3 do laundry -.IP 2. 4 +.IP "2." 3 take out the trash .RE .PP @@ -179,48 +179,48 @@ Minus 3 .SS Ordered .PP Tight: -.IP 1. 4 +.IP "1." 3 First -.IP 2. 4 +.IP "2." 3 Second -.IP 3. 4 +.IP "3." 3 Third .PP and: -.IP 1. 4 +.IP "1." 3 One -.IP 2. 4 +.IP "2." 3 Two -.IP 3. 4 +.IP "3." 3 Three .PP Loose using tabs: -.IP 1. 4 +.IP "1." 3 First -.IP 2. 4 +.IP "2." 3 Second -.IP 3. 4 +.IP "3." 3 Third .PP and using spaces: -.IP 1. 4 +.IP "1." 3 One -.IP 2. 4 +.IP "2." 3 Two -.IP 3. 4 +.IP "3." 3 Three .PP Multiple paragraphs: -.IP 1. 4 +.IP "1." 3 Item 1, graf one\. .RS 4 .PP Item 1\. graf two\. The quick brown fox jumped over the lazy dog's back\. .RE -.IP 2. 4 +.IP "2." 3 Item 2\. -.IP 3. 4 +.IP "3." 3 Item 3\. .SS Nested .IP \[bu] 2 @@ -235,9 +235,9 @@ Tab .RE .PP Here's another: -.IP 1. 4 +.IP "1." 3 First -.IP 2. 4 +.IP "2." 3 Second: .RS 4 .IP \[bu] 2 @@ -247,13 +247,13 @@ Fie .IP \[bu] 2 Foe .RE -.IP 3. 4 +.IP "3." 3 Third .PP Same thing but with paragraphs: -.IP 1. 4 +.IP "1." 3 First -.IP 2. 4 +.IP "2." 3 Second: .RS 4 .IP \[bu] 2 @@ -263,7 +263,7 @@ Fie .IP \[bu] 2 Foe .RE -.IP 3. 4 +.IP "3." 3 Third .SS Tabs and spaces .IP \[bu] 2 @@ -276,6 +276,51 @@ this is an example list item indented with tabs .IP \[bu] 2 this is an example list item indented with spaces .RE +.SS Fancy list markers +.IP "(2)" 4 +begins with 2 +.IP "(3)" 4 +and now 3 +.RS 4 +.PP +with a continuation +.IP "iv." 4 +sublist with roman numerals, starting with 4 +.IP " v." 4 +more items +.RS 4 +.IP "(A)" 4 +a subsublist +.IP "(B)" 4 +a subsublist +.RE +.RE +.PP +Nesting: +.IP "A." 3 +Upper Alpha +.RS 4 +.IP "I." 3 +Upper Roman\. +.RS 4 +.IP "(6)" 4 +Decimal start with 6 +.RS 4 +.IP "c)" 3 +Lower alpha with paren +.RE +.RE +.RE +.PP +Autonumbering: +.IP "1." 3 +Autonumber\. +.IP "2." 3 +More\. +.RS 4 +.IP "1." 3 +Nested\. +.RE .PP * * * * * .SH Definition Lists @@ -716,7 +761,7 @@ space\.[^my note] Here is an inline note\.[3] .PP Notes can go in quotes\.[4] .RE -.IP 1. 4 +.IP "1." 3 And in list items\.[5] .PP This paragraph should not be part of the note, as it is not diff --git a/tests/writer.markdown b/tests/writer.markdown index 477f3baf3..298e8e825 100644 --- a/tests/writer.markdown +++ b/tests/writer.markdown @@ -253,6 +253,37 @@ Same thing but with paragraphs: +## Fancy list markers + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + (A) a subsublist + (B) a subsublist + + + +Nesting: + +A. Upper Alpha + I. Upper Roman. + (6) Decimal start with 6 + c) Lower alpha with paren + + + + +Autonumbering: + +1. Autonumber. +2. More. + 1. Nested. + + * * * * * diff --git a/tests/writer.native b/tests/writer.native index ad9737a16..11719eb16 100644 --- a/tests/writer.native +++ b/tests/writer.native @@ -28,7 +28,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] , CodeBlock "sub status {\n print \"working\";\n}" , Para [Str "A",Space,Str "list:"] - , OrderedList + , OrderedList (1,Decimal,Period) [ [ Plain [Str "item",Space,Str "one"] ] , [ Plain [Str "item",Space,Str "two"] ] ] , Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] @@ -44,7 +44,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ Para [Str "Example:"] , CodeBlock "sub status {\n print \"working\";\n}" ] , BlockQuote - [ OrderedList + [ OrderedList (1,Decimal,Period) [ [ Plain [Str "do",Space,Str "laundry"] ] , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ] , Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"] @@ -95,27 +95,27 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , [ Para [Str "Minus",Space,Str "3"] ] ] , Header 2 [Str "Ordered"] , Para [Str "Tight:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "First"] ] , [ Plain [Str "Second"] ] , [ Plain [Str "Third"] ] ] , Para [Str "and:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "One"] ] , [ Plain [Str "Two"] ] , [ Plain [Str "Three"] ] ] , Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second"] ] , [ Para [Str "Third"] ] ] , Para [Str "and",Space,Str "using",Space,Str "spaces:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "One"] ] , [ Para [Str "Two"] ] , [ Para [Str "Three"] ] ] , Para [Str "Multiple",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one",Str "."] , Para [Str "Item",Space,Str "1",Str ".",Space,Str "graf",Space,Str "two",Str ".",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",Apostrophe,Str "s",Space,Str "back",Str "."] ], [ Para [Str "Item",Space,Str "2",Str "."] ] , [ Para [Str "Item",Space,Str "3",Str "."] ] ] @@ -128,7 +128,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane [ [ Plain [Str "Tab"] ] ] ] ] ] ] , Para [Str "Here",Apostrophe,Str "s",Space,Str "another:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "First"] ] , [ Plain [Str "Second:"] , BulletList @@ -136,7 +136,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , [ Plain [Str "Fie"] ] , [ Plain [Str "Foe"] ] ] ], [ Plain [Str "Third"] ] ] , Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Para [Str "First"] ] , [ Para [Str "Second:"] , BulletList @@ -150,6 +150,34 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , 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"] +, OrderedList (2,Decimal,TwoParens) + [ [ Plain [Str "begins",Space,Str "with",Space,Str "2"] ] + , [ Para [Str "and",Space,Str "now",Space,Str "3"] + , Para [Str "with",Space,Str "a",Space,Str "continuation"] + , OrderedList (4,LowerRoman,Period) + [ [ Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ] + , [ Plain [Str "more",Space,Str "items"] + , OrderedList (1,UpperAlpha,TwoParens) + [ [ Plain [Str "a",Space,Str "subsublist"] ] + , [ Plain [Str "a",Space,Str "subsublist"] ] ] ] ] ] ] +, Para [Str "Nesting:"] +, OrderedList (1,UpperAlpha,Period) + [ [ Plain [Str "Upper",Space,Str "Alpha"] + , OrderedList (1,UpperRoman,Period) + [ [ Plain [Str "Upper",Space,Str "Roman",Str "."] + , OrderedList (6,Decimal,TwoParens) + [ [ Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + , OrderedList (3,LowerAlpha,OneParen) + [ [ Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ] + ] ] ] ] ] ] ] +, Para [Str "Autonumbering:"] +, OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Autonumber",Str "."] ] + , [ Plain [Str "More",Str "."] + , OrderedList (1,DefaultStyle,DefaultDelim) + [ [ Plain [Str "Nested",Str "."] ] + ] ] ] , HorizontalRule , Header 1 [Str "Definition",Space,Str "Lists"] , Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] @@ -363,7 +391,7 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane , BlockQuote [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes",Str ".",Note [Para [Str "In",Space,Str "quote",Str "."]]] ] -, OrderedList +, OrderedList (1,Decimal,Period) [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] , 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",Str "."] ] diff --git a/tests/writer.rst b/tests/writer.rst index 98d498e93..0f059761c 100644 --- a/tests/writer.rst +++ b/tests/writer.rst @@ -78,8 +78,9 @@ E-mail style: A list: - 1. item one - 2. item two + + 1. item one + 2. item two Nested block quotes: @@ -103,8 +104,9 @@ Box-style: } - 1. do laundry - 2. take out the trash + + 1. do laundry + 2. take out the trash Here's a nested one: @@ -152,12 +154,14 @@ Unordered Asterisks tight: + - asterisk 1 - asterisk 2 - asterisk 3 Asterisks loose: + - asterisk 1 - asterisk 2 @@ -167,12 +171,14 @@ Asterisks loose: Pluses tight: + - Plus 1 - Plus 2 - Plus 3 Pluses loose: + - Plus 1 - Plus 2 @@ -182,12 +188,14 @@ Pluses loose: Minuses tight: + - Minus 1 - Minus 2 - Minus 3 Minuses loose: + - Minus 1 - Minus 2 @@ -200,91 +208,146 @@ Ordered Tight: -1. First -2. Second -3. Third + +1. First +2. Second +3. Third and: -1. One -2. Two -3. Three + +1. One +2. Two +3. Three Loose using tabs: -1. First -2. Second +1. First + +2. Second -3. Third +3. Third and using spaces: -1. One -2. Two +1. One + +2. Two -3. Three +3. Three Multiple paragraphs: + 1. Item 1, graf one. Item 1. graf two. The quick brown fox jumped over the lazy dog's back. -2. Item 2. +2. Item 2. -3. Item 3. +3. Item 3. Nested ------ + - Tab + - Tab + - Tab Here's another: -1. First + +1. First 2. Second: + - Fee - Fie - Foe -3. Third +3. Third Same thing but with paragraphs: -1. First + +1. First 2. Second: + - Fee - Fie - Foe -3. Third +3. Third Tabs and spaces --------------- + - this is a list item indented with tabs - this is a list item indented with spaces + - this is an example list item indented with tabs - this is an example list item indented with spaces +Fancy list markers +------------------ + + +(2) begins with 2 +(3) and now 3 + + with a continuation + + + iv. sublist with roman numerals, starting with 4 + v. more items + + (A) a subsublist + (B) a subsublist + + + +Nesting: + + +A. Upper Alpha + + I. Upper Roman. + + (6) Decimal start with 6 + + c) Lower alpha with paren + + + + +Autonumbering: + + +#. Autonumber. +#. More. + + #. Nested. + + -------------- Definition Lists @@ -572,6 +635,7 @@ Ellipses...and...and.... LaTeX ===== + - \cite[22-23]{smith.1899} - \doublespacing - $2+2=4$ @@ -585,6 +649,7 @@ LaTeX These shouldn't be math: + - To get the famous equation, write ``$e = mc^2$``. - $22,000 is a *lot* of money. So is $34,000. (It worked if "lot" is emphasized.) @@ -608,6 +673,7 @@ Special Characters Here is some unicode: + - I hat: Î - o umlaut: ö - section: § @@ -729,6 +795,7 @@ Autolinks With an ampersand: http://example.com/?foo=1&bar=2 + - In a list? - http://example.com/ - It should. @@ -767,7 +834,8 @@ note] Here is an inline note. [3]_ Notes can go in quotes. [4]_ -1. And in list items. [5]_ + +1. And in list items. [5]_ This paragraph should not be part of the note, as it is not indented. diff --git a/tests/writer.rtf b/tests/writer.rtf index f94e93243..6ff422603 100644 --- a/tests/writer.rtf +++ b/tests/writer.rtf @@ -140,6 +140,23 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par} {\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with spaces\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par} {\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Fancy list markers\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 (2)\tx360\tab begins with 2\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 (3)\tx360\tab and now 3\par} +{\pard \ql \f0 \sa180 \li360 \fi0 with a continuation\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 iv.\tx360\tab sublist with roman numerals, starting with 4\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 v.\tx360\tab more items\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (A)\tx360\tab a subsublist\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (B)\tx360\tab a subsublist\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Nesting:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 A.\tx360\tab Upper Alpha\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 I.\tx360\tab Upper Roman.\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (6)\tx360\tab Decimal start with 6\par} +{\pard \ql \f0 \sa0 \li1440 \fi-360 c)\tx360\tab Lower alpha with paren\sa180\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Autonumbering:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab Autonumber.\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab More.\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 a.\tx360\tab Nested.\sa180\sa180\par} {\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} {\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Definition Lists\par} {\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par} -- cgit v1.2.3