diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-08 02:43:15 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-08 02:43:15 +0000 |
commit | e814a3f6d23f640b1aed5b7cb949459d514a3e33 (patch) | |
tree | 4c9f89c85d5e050f27b4a732c7bad0542b5c9928 /README | |
parent | 22a65385571737b6232debac884184d6504222fc (diff) | |
download | pandoc-e814a3f6d23f640b1aed5b7cb949459d514a3e33.tar.gz |
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
Diffstat (limited to 'README')
-rw-r--r-- | README | 109 |
1 files changed, 70 insertions, 39 deletions
@@ -437,45 +437,76 @@ cases" involving lists. Consider this source: 3. Third -Pandoc transforms this into a "compact list" (with no `<p>` tags -around "First", "Second", or "Third"), while markdown puts `<p>` -tags around "Second" and "Third" (but not "First"), because of -the blank space around "Third". Pandoc follows a simple rule: -if the text is followed by a blank line, it is treated as a -paragraph. Since "Second" is followed by a list, and not a blank -line, it isn't treated as a paragraph. The fact that the list -is followed by a blank line is irrelevant. (Note: Pandoc works -this way even when the `--strict` option is specified. This -behavior is consistent with the official markdown syntax -description, even though it is different from that of `Markdown.pl`.) - -Unlike standard markdown, Pandoc allows ordered list items to be -marked with single lowercase letters (from 'a' to 'n'), instead of -numbers. So, for example, this source yields a nested ordered list: - - 1. First - 2. Second - a. Fee - b. Fie - 3. Third - -The letters may be followed by either '.' or ')': - - 1. First - 2. Second - a) Fee - b) Fie - 3. Third - -Note that Pandoc pays no attention to the *type* of ordered list -item marker used. Thus, the following is treated just the same as -the example above: - - a) First - 1. Second - 2. Fee - b) Fie - c. Third +Pandoc transforms this into a "compact list" (with no `<p>` tags around +"First", "Second", or "Third"), while markdown puts `<p>` tags around +"Second" and "Third" (but not "First"), because of the blank space +around "Third". Pandoc follows a simple rule: if the text is followed by +a blank line, it is treated as a paragraph. Since "Second" is followed +by a list, and not a blank line, it isn't treated as a paragraph. The +fact that the list is followed by a blank line is irrelevant. (Note: +Pandoc works this way even when the `--strict` option is specified. This +behavior is consistent with the official markdown syntax description, +even though it is different from that of `Markdown.pl`.) + +Unlike standard markdown, Pandoc allows ordered list items to be marked +with uppercase and lowercase letters and roman numerals, in addition to +arabic numerals. (This behavior can be turned off using the `--strict` +option.) List markers may be enclosed in parentheses or followed by a +single right-parentheses or period. Pandoc also pays attention to the +type of list marker used, and to the starting number, and both of these +are preserved where possible in the output format. Thus, the following +yields a list with numbers followed by a single parenthesis, starting +with 9, and a sublist with lowercase roman numerals: + + 9) Ninth + 10) Tenth + 11) Eleventh + i. subone + ii. subtwo + iii. subthree + +Note that Pandoc pays attention only to the *starting* number in a list. +So, the following yields a list numbered sequentially starting from 2: + + (2) Two + (5) Three + (2) Four + +If default list markers are desired, use '`#.`': + + #. one + #. two + #. three + +If you change list style in mid-list, Pandoc will notice and assume you +are starting a sublist. So, + + 1. One + 2. Two + A. Sub + B. Sub + 3. Three + +gets treated as if it were + + 1. One + 2. Two + A. Sub + B. Sub + 3. Three + +Note that a list beginning with a single letter will be interpreted as +an alphabetic list. So you are out of luck if you want a roman-numbered +list starting with 100 (C). + +Note also that a paragraph starting with a capital letter and a period +(for example, an initial) will be interpreted as a list: + + B. Russell was an English philosopher. + +To avoid this, use backslash escapes: + + B\. Russell was an English philosopher. Definition lists ---------------- |