ordered lists: type lower alpha?
jgm at berkeley.edu
Wed Jul 24 21:22:40 EDT 2013
+++ Michel Fortin [Jul 24 13 18:51 ]:
> Le 23-juil.-2013 à 15:57, John MacFarlane <jgm at berkeley.edu> a écrit :
> > +++ Klaus Mueller [Jul 23 13 18:40 ]:
> >> Hi folks,
> >> atm we have in markdown [ordered lists] with the [type] 'arabic
> >> numbers' working:
> >> 1. one
> >> 1. two
> >> would it be possible to have also the type 'lower alpha'?
> >> a. first
> >> a. second
> >> The type attribute is deprecated, but it is allowed to supported it
> >> or just add an inline css (e.g. " style='list-style-type:
> >> lower-alpha;' ").
> > It's not standard markdown, but pandoc's extended markdown supports this:
> > http://johnmacfarlane.net/pandoc/try/?text=a.+item%0Ab.+item%0A&from=markdown&to=html
> Just curious, has anyone reported a bug where a sentence would end with a letter alone and would trigger a list on the next item?
It's not a big problem with lower-case alpha, at least in English,
since the only single-letter lower-case alpha word in English
is 'a', and it never ends a sentence. (There may be some languages,
however, for which this is more of a problem.)
The issue is bigger with upper-case alpha, because of initials.
Here pandoc requires two spaces after the list marker, so that
B. Russell was a philosopher.
doesn't trigger a list.
There are also potential issues with roman numerals (which pandoc
also allows as list markers). Someone actually did report the
following as a bug:
1. This is a long line that my text editor wraps.
Swedish text begins now: I hela mitt
liv. Bla bla bla.
'liv' is a Swedish word, but here it's interpreted as the Roman numeral
54 and starts a list item.
So there are a few minor pain points. All can be worked around using
backslash escapes, and on balance, I find it nice to have the expressive
flexibility to use different kinds of ordered list markers and have
them respected in the output format. (Pandoc also respects the starting
number of a list.)
Also, like all pandoc syntax extensions, this feature can be
individually disabled if you don't like it:
pandoc --from markdown-fancy_lists
(Read: "markdown minus fancy_lists")
> Also, what is a valid list marker in pandoc, is "aa." a valid list marker (just like "11." is)?
No, "aa." doesn't work, though that has been requested. Of course,
allowing two letter combinations would just increase the risk of
capturing things that weren't supposed to be list markers.
More information about the Markdown-Discuss