public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Handle "Restart at 1" for Numbered Lists When Converting docx to gfm?
Date: Wed, 22 Nov 2023 22:30:17 -0500	[thread overview]
Message-ID: <C7F0EC85-4B88-49D4-A360-1EF4551644FD@gmail.com> (raw)
In-Reply-To: <18ee3bf5-6a86-468a-8568-de6e7e7a63a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Can you submit a bug report, with a docx we can use to reproduce it, on our github bug tracker?

https://github.com/jgm/pandoc/issues


> On Nov 22, 2023, at 9:05 AM, Jason Langkamer-Smith <jlangkamer-smith@intellicheck.com> wrote:
> 
> 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.
> 	• This is the first list, first item. Paragraph style is List Number.
> 	• First list, second item.
> The first list ends. A few paragraphs are here. Then a new list begins.
> 	• This is the second list, first item. Paragraph style is List Number, with Restart at 1 override. 
> 	• 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.
> 
> 	• This is the first list, first item.
> 	• First list, second item.
> The list ends. A few paragraphs are here. Then a new list begins.
> 	• This is the second list, first item, which is overridden with Restart at 1.
> 	• 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:
> 	• --shift-heading-level-by=-1
> 	• -f docx+startnum. The startnum extension is not supported for docx.
> 	• -f docx+native_numbering. The native_numbering extension. Did nothing.
> 	• -f docx+styles. Added styling tags, but the list numbering was still wrong.
> 	• -f docx+fancy_lists. The extension fancy_lists is not supported for docx.
> 
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/C7F0EC85-4B88-49D4-A360-1EF4551644FD%40gmail.com.


      parent reply	other threads:[~2023-11-23  3:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 14:05 Jason Langkamer-Smith
     [not found] ` <18ee3bf5-6a86-468a-8568-de6e7e7a63a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-23  3:30   ` John MacFarlane [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C7F0EC85-4B88-49D4-A360-1EF4551644FD@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).