From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33370 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Handle "Restart at 1" for Numbered Lists When Converting docx to gfm? Date: Wed, 22 Nov 2023 22:30:17 -0500 Message-ID: References: <18ee3bf5-6a86-468a-8568-de6e7e7a63a7n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7298"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBTMO7OVAMGQEWYCHHJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 23 04:30:25 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f188.google.com ([209.85.166.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r60Q5-0001jV-21 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 23 Nov 2023 04:30:25 +0100 Original-Received: by mail-il1-f188.google.com with SMTP id e9e14a558f8ab-35abad7755csf4454405ab.0 for ; Wed, 22 Nov 2023 19:30:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700710223; cv=pass; d=google.com; s=arc-20160816; b=BViRJQXJaFTw0pSUfQYGkgTMeE/DPcbKyzNz7C0S9RjhTR1FuQh5TNB0aVkxuvihfl 3OGpViLRQtP9fIjnV4QSFqHGR1+lQOt3oHYtdE/EBnvXDvyRn3BxNieI7OnQnb206y7P 3LKBXHTtSPzzhKNzvWixDbnrgDsnF/pqg1LQHnTh5tF6eW1u9KtpvahzGhdmjNZBxg8j PhBxtEu/EpJrMc18dBGNlNMGJoGXQNro32oHkd5mvdEx5esK6LOwMV9DUYHP8Lijo4Wq PtbUC/u1a2H1OLFc+9Ix9u7/BVQTFGA5gaR3cshS3Rb/XmpmiE5s4YC/i2635jmnEz4B DCUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=NGhRvz5Jtu3clJ3UohAuIaoVOxqrTPYNI1N6vSsuY/o=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=B/qwq4qLeK9qR6EZsQhx5Hkv/WQoOKZQMp5CPdmY7DilDAdCaZbrip2150qjISmXbi imv+7X+ZjxZQCZJ+xAR6toY52etlts2DRIGsifrrZFaDw5Tstf5QG7RN15AZTnp0o/IB nusZw0bFLIOppClbCK8MM/rstV5VaRLQfCbIzwgDzy3eUlfD1Ob5mMGpd9+cLZGfp5ai 2pGNfZQLcI8fJG+RQvS4Tv48hmhu/FG/ZL9VFr/CRAFiFddFS3UIthhC7Lzc0NAI2f1a MUQRx45zW4hpYQZGsnQ0mvX12PxUtaC2O6sW5Od0WENE7Vc92/9kIFXY6xmmqNACiScU tRSw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="g/UqHcbF"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::f2f as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700710223; x=1701315023; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=NGhRvz5Jtu3clJ3UohAuIaoVOxqrTPYNI1N6vSsuY/o=; b=vYManXZQEj0vJW2fvlvqYj0s86IIq748gULzDG2ZuoquD2KmFH8JzdCjIAiOfH2EsW H3Xlx4tumWL/rfQ40xImrUsEe3LhoX51PXz1KrSQDwdU2oBHDgjG4Do61ub/4INfEGD4 LEKfZ47tRoYOdtEKLFsDZuOA0voRj2uY+VXlxEE5y+ERHiS1530Ii7Az3sQMv7Ia1fXv uUTowpyZ8v8DUVeOJi+pULECuhZ1AbfuxtQfeUW+RsZAeEzfBQd6+re2b8Mw2heePrKn jVpJ2dPAi4SsAgok DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700710223; x=1701315023; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=NGhRvz5Jtu3clJ3UohAuIaoVOxqrTPYNI1N6vSsuY/o=; b=BivNXo5b4rjfinQEpsjNiX3lx/4fB7K0QWOQzFzNzhCQ8hfoAlyy7JLhHFwFv+q4Kj YE91sriB7m/Q2w0slaeefoq0qBV6bd5T1SmZY/JtxFys+9QjGmCtAicVeWh/3g21XW/R OFaSGWN2iTYTng75igsMd+rJTacxo2L73bTYoUHfV7WvxEIlKjYhpMcLnc8fTI+gpk/i fmi6zGwkjngwtobfBuWsHQurRpzsCBg67PKV6HBm+PoXpQZBDlJsa9m+NQQjoU4XDA2y 3ehMZ4nBE+qQqDvrm3v0PIOP3NUjde X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700710223; x=1701315023; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=NGhRvz5Jtu3clJ3UohAuIaoVOxqrTPYNI1N6vSsuY/o=; b=l5NTV5w95uJsCBWqHH0f2DSC5va+8NZc0ZEeOGRQmPGwURv5hQCzxzjbFjIZjFLAy2 RMLUWlLryzfOI4dx+/n10jWr60eiGAl5IuNZYNOqaKjUDR81UvLNsR6ORK265ZSS8tSA q4xSxTGdDzx9WJktGyfDX+63c+yBbyGmWePJcH321rVAfJO2eZ4NC9qcMVBUGY2qOmbY 2ojNze90UeINrM3lXVhddvAMX1mUJD/VEptfAUG+RdCSoL/0SVZVsTsSwT Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YxybCg2WnBtdsy60ZYFKveqXceOk8dnrHrazxqpGzf5OdvkslzA WMwzY5KzxSCngelLDdRSKyk= X-Google-Smtp-Source: AGHT+IHh0tCPsWfUrsDhtS6I0qupBIfRGNdU4TQ7N6jeaN8kxAFdglgdPdJUr/84ux46g5k35R+vkw== X-Received: by 2002:a05:6e02:2146:b0:35b:7d4:9d5c with SMTP id d6-20020a056e02214600b0035b07d49d5cmr5691963ilv.14.1700710223795; Wed, 22 Nov 2023 19:30:23 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6e02:1ca4:b0:34f:be2e:4505 with SMTP id x4-20020a056e021ca400b0034fbe2e4505ls246252ill.0.-pod-prod-05-us; Wed, 22 Nov 2023 19:30:21 -0800 (PST) X-Received: by 2002:a5d:9353:0:b0:798:312a:5403 with SMTP id i19-20020a5d9353000000b00798312a5403mr4239690ioo.19.1700710220882; Wed, 22 Nov 2023 19:30:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700710220; cv=none; d=google.com; s=arc-20160816; b=j3sNDaMYE08dQpTb7HCA+5nKTIM3FJfmuJAZIZEnljpYMeaV0b1JRDlkC6TJbrH1s1 ZZfVsulYDqIOZRGDF2q8D0qClNbp7g9wzPjZ/2RgSxSsQE2wLM/aVpcZG1XdlR7n1aeS cbTPc30VmyHix16mxe/rZOptntnaXqfiaVRqmIUWKRm2qXre+Wiap0bZjwHT1jb3VFif 7j2cZFqLmjJZHQeSnwI2sooLwfwxN4p1FQoT0k3spDHRmZJZmo1A5oQVn5jJL9o093BE e1XhWOBzFg9nKJotS9Wy6tLGUasxlhTeCpOEaxfsSe+z4aLzdolA1KQfWNNbCdBrxUhj vJew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=mk8GfrnmVo5MzIgebQiRrZXnRNzvnyvYQpfvgmFWtWg=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=FvO3npe75H81uuKKsQ+p6KJxuDsNuG1VQDSNy/hV+uzKRsWrWUqiTY/nZalt/qQ1Kn zIqWEt927zBW98CcqZkV8KHx9iGg8VkdTe2zr9q4/ANRmcl/WU1DdwdaW5ynCdWCl8su bacigteahcgLDmwb1KayfNcsf654Yp+t1p41yWIIpdfu01sHSS/bp//tWZxdzJlkIQnn bsH8wgdvjn2uMp8/ibApI8HX143D7QO4tZUjJAWpXwIlhs1uSiPY71l4bJknoGXcE9Jb Cj5cGZ0GOXCgyE7WrKihaLfZ4q5jzfBARyf66rsFNEGQS/9hMsb3le8lf1avKzD4GW9Z q+Qg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="g/UqHcbF"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::f2f as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com. [2607:f8b0:4864:20::f2f]) by gmr-mx.google.com with ESMTPS id m4-20020a6bf304000000b00792153b2901si19451ioh.4.2023.11.22.19.30.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 19:30:20 -0800 (PST) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::f2f as permitted sender) client-ip=2607:f8b0:4864:20::f2f; Original-Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-679dc22f2b7so2764686d6.2 for ; Wed, 22 Nov 2023 19:30:20 -0800 (PST) X-Received: by 2002:a05:6214:1301:b0:679:e320:e5bf with SMTP id pn1-20020a056214130100b00679e320e5bfmr6130197qvb.34.1700710219557; Wed, 22 Nov 2023 19:30:19 -0800 (PST) Original-Received: from smtpclient.apple ([2600:1002:b028:717b:89f4:a045:fee3:bee]) by smtp.gmail.com with ESMTPSA id v2-20020a0ce1c2000000b00674a45499dcsm138434qvl.88.2023.11.22.19.30.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Nov 2023 19:30:18 -0800 (PST) In-Reply-To: <18ee3bf5-6a86-468a-8568-de6e7e7a63a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="g/UqHcbF"; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::f2f as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33370 Archived-At: 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 wrote: >=20 > Here is a long question for (hopefully) a simple answer. Take the followi= ng command to convert from docx to gfm. >=20 > pandoc -f docx myfile.docx -t gfm -o myfile.md >=20 > In Word, I use the List Number paragraph style for numbered lists. The fi= rst item of each new list is overridden with Restart at 1. (In Word, you ri= ght-click the paragraph, and then click Restart at 1). So here is an exampl= e of how two lists look in Word. > =E2=80=A2 This is the first list, first item. Paragraph style is List Nu= mber. > =E2=80=A2 First list, second item. > The first list ends. A few paragraphs are here. Then a new list begins. > =E2=80=A2 This is the second list, first item. Paragraph style is List N= umber, with Restart at 1 override.=20 > =E2=80=A2 Second list, second item. > =20 > When Pandoc converts this to markdown (gfm), the second list, second item= numbering is messed up. Here is an example of the Markdown output. >=20 > =E2=80=A2 This is the first list, first item. > =E2=80=A2 First list, second item. > The list ends. A few paragraphs are here. Then a new list begins. > =E2=80=A2 This is the second list, first item, which is overridden with = Restart at 1. > =E2=80=A2 Second list, second item. > =20 > The second list, second item should be 2, but it is 3. This is because Pa= ndoc recognizes Restart at 1, but then it does not begin the next list numb= er from that restarted number. Instead, it begins the next number as contin= ued from the last number of the previous list. >=20 > I've tried various options and extensions to fix this with no luck. Here = is what doesn't work: > =E2=80=A2 --shift-heading-level-by=3D-1 > =E2=80=A2 -f docx+startnum. The startnum extension is not supported for = docx. > =E2=80=A2 -f docx+native_numbering. The native_numbering extension. Did = nothing. > =E2=80=A2 -f docx+styles. Added styling tags, but the list numbering was= still wrong. > =E2=80=A2 -f docx+fancy_lists. The extension fancy_lists is not supporte= d for docx. >=20 > Any other suggestions? >=20 > --=20 > 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/msgi= d/pandoc-discuss/18ee3bf5-6a86-468a-8568-de6e7e7a63a7n%40googlegroups.com. --=20 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 e= mail 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.