How do you make lettered lists using markdown?

前端 未结 6 1062
青春惊慌失措
青春惊慌失措 2020-12-08 00:07

Markdown allows ordered lists using numbers. How can I instead get an ordered list using letters? i.e.

A. the letter A
B. the letter B
C. etc
         


        
6条回答
  •  悲哀的现实
    2020-12-08 00:25

    At least for recent versions of Pandoc (I'm using version 1.13.1), it looks like you can use some of the fancy_list syntax without having to enable the extension, e.g.:

    I.  One                                                                                                                                                                                        
        A.  two                                                                                                                                                                                    
            1. three                                                                                                                                                                               
            2. four                                                                                                                                                                                
                i.  five                                                                                                                                                                           
                ii.  six                                                                                                                                                                           
                    - seven                                                                                                                                                                        
                        * eight                                                                                                                                                                    
    II.  Nine
    

    To compile this into a PDF you can then run:

    pandoc input.md -o output.pdf
    

    NOTE: For this to work, you have to make sure you add an extra space after any letters or roman numerals: instead of the usual one space between a bullet and the text, use two instead. (see pandoc docs)

提交回复
热议问题