Here is a long question for (hopefully) a simple answer. Take the following command to convert from docx to gfm.


pandoc -f docx myfile.docx -t gfm -o myfile.md


In Word, I use the List Number paragraph style for numbered lists. The first item of each new list is overridden with Restart at 1. (In Word, you right-click the paragraph, and then click Restart at 1). So here is an example of how two lists look in Word.

  1. This is the first list, first item. Paragraph style is List Number.
  2. First list, second item.

The first list ends. A few paragraphs are here. Then a new list begins.

  1. This is the second list, first item. Paragraph style is List Number, with Restart at 1 override. 
  2. Second list, second item.

 

When Pandoc converts this to markdown (gfm), the second list, second item numbering is messed up. Here is an example of the Markdown output.


  1. This is the first list, first item.
  2. First list, second item.

The list ends. A few paragraphs are here. Then a new list begins.

  1. This is the second list, first item, which is overridden with Restart at 1.
  2. Second list, second item.

 

The second list, second item should be 2, but it is 3. This is because Pandoc recognizes Restart at 1, but then it does not begin the next list number from that restarted number. Instead, it begins the next number as continued from the last number of the previous list.


I've tried various options and extensions to fix this with no luck. Here is what doesn't work:


Any other suggestions?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/18ee3bf5-6a86-468a-8568-de6e7e7a63a7n%40googlegroups.com.