From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31243 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Johan Bergquist Newsgroups: gmane.text.pandoc Subject: Re: Conversion from docx with numbered sections Date: Thu, 18 Aug 2022 00:59:58 -0700 (PDT) Message-ID: <4c0d85e5-65a1-4c19-8859-d50d1be7bb8an@googlegroups.com> References: <73852e23-81fd-4c2f-9846-7670ebdde004n@googlegroups.com> <9761f078-45b4-46e2-8197-511e2ae188bfn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1646_2006692236.1660809598367" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38843"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDWY3LNK6YFBB77C66LQMGQE7KJRAEA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Aug 18 10:00:04 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yw1-f188.google.com ([209.85.128.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oOaRg-0009r9-7J for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 18 Aug 2022 10:00:04 +0200 Original-Received: by mail-yw1-f188.google.com with SMTP id 00721157ae682-32a115757b6sf15247987b3.13 for ; Thu, 18 Aug 2022 01:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc; bh=ZFcN7asiKkWOFf0ivVro4OrGKO1RZlwyBBV9UAmz5zM=; b=Pfc4lMA2IESXd2r3YduYJoAEVfNRwzEFVRL9azWiGAZTMJih5nuCPlDllrFsWkv5SM 7E1ug4ow+pvr5JBUjcyxOcMUVcNEvV0dwmpq3ftlI2lgwNoAXGGbkrjVfH+6vCZBf1QQ h933jmhLC6DRPYExvP9TTx8f0i42Em1tCuQseeaTB6izj7rCg3E9z/730RE805PDz51u MgLxRg3o12Zw9LP+xPXxaAtN2hz7u1kC0DZS6KgJ2vl300N8JMNCqZbT7ElfqzrXC767 5RHgFLfC1mInGsPUO3sn3XGyvpcyXrIE4fTMv70uw1vhNct1ZHu3BFDMVsFY3ik9CKZC kHcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=den-se.20210112.gappssmtp.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc; bh=ZFcN7asiKkWOFf0ivVro4OrGKO1RZlwyBBV9UAmz5zM=; b=sVOc72tXH65DSHD4GPpAzxcaRrYWpDM2BgS0RoTfGQqi7Vi3cpvC+KfXmuaAklggbg Q8obtU3ilEEstdOKaUEc/7aRGCeLTcp8g3Jk68eWtoUakdanfdp0UTRM/JnSHs/GM8PJ XWjkwEqtMLQtu9RaNwsuIufdYuHD0lsUXqTPxSmZf4wHkTcYaF7o4btz153vwWJ0KJj4 Xbb8l5+7tVd9QjdeLYAht9lFimpcAAe0blPbAYePYmhXNqg04QaO+FtFo0BOtsCHpbcn S3tu+odCcoYgdkneldVEgszgKYZM1M/JkzYK5aAkd8QxqfkoXCvmecRUDWlThp6/rY7i vCbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc; bh=ZFcN7asiKkWOFf0ivVro4OrGKO1RZlwyBBV9UAmz5zM=; b=YrKtTs9ZmIs8Ca748voyao9SBWn5YEIKPDc9iUJqA6pHbKZlImCPquScFTIg4zFdnG nhzmMt91Px2K00Hu62qDlVwnQHqty47UqiwEFpkI3gspHuSn3Kfxh2lRxckgUd6rsnAF VF0HiWACRDXtD+9KHY78BgLbR1h2I8DmZQn4nuldFIkL/IjbdnRPn8J5uykNCSeGB+yy z89nG33zWD6/pohRAI3W5HpHy2DBE2J3Qgr5IlMt9VCzubWgBzX0g/f+OZwvG1NOhl/2 y0q6svOozO5966exST0YXb0KzM+9TGFmT0IqsBY26v+3dTMY2aUi9AT8wdQRU6E0Z1zl AAdg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACgBeo3m9ibNFNVoF5w8Pmu8cFgcvwlnxanTVx8fL8aLmsise/hRSGMi nUTalpkO8eA1c66j4KdKkJs= X-Google-Smtp-Source: AA6agR6RK83tWay6oX7AgNDOFg8OmgCPdlcJSOyBKLSgK/9MIB+o9amMV6IWVyDkfVZA6N+Ck87GvQ== X-Received: by 2002:a81:bb41:0:b0:328:fd1b:5713 with SMTP id a1-20020a81bb41000000b00328fd1b5713mr1743710ywl.238.1660809602306; Thu, 18 Aug 2022 01:00:02 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:ce4a:0:b0:694:25d0:a511 with SMTP id x71-20020a25ce4a000000b0069425d0a511ls110584ybe.2.-pod-prod-gmail; Thu, 18 Aug 2022 00:59:59 -0700 (PDT) X-Received: by 2002:a25:4e07:0:b0:67c:1b3e:9fb6 with SMTP id c7-20020a254e07000000b0067c1b3e9fb6mr1778230ybb.549.1660809599108; Thu, 18 Aug 2022 00:59:59 -0700 (PDT) In-Reply-To: <9761f078-45b4-46e2-8197-511e2ae188bfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: johan-+Ii6mvK/KIU@public.gmane.org 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:31243 Archived-At: ------=_Part_1646_2006692236.1660809598367 Content-Type: multipart/alternative; boundary="----=_Part_1647_367182302.1660809598367" ------=_Part_1647_367182302.1660809598367 Content-Type: text/plain; charset="UTF-8" In some places, numbering gets correctly rendered in html5 if I change the second part of the field from "{ SEQ Equation \* Arabic \s 1 \* MERGEFORMAT }" to "{ SEQ Equation \* Arabic \s 1 }". In some other places, it works without this change so it's still not consistent, though. On Thursday, 18 August 2022 at 12:52:04 UTC+9 Johan Bergquist wrote: > Hi jgran, > I'm using Pandoc 2.18 for Windows for docx-to-html5 conversions while I do > the docx-to-PDF conversions directly by other means (Acrobat, Word Save as > PDF). I have no problems with the html5 conversions and the > --number-section option except that unnumbered section headers in Word get > numbered too. I solved this by creating a different Word paragraph style > "Headline" without numbering and applying the +styles extension, i.e. -f > docx+styles, and added a "div[data-custom-style="Headline"] p" entry to the > css file for selecting and formatting that paragraph style upon html5 > rendering. > > However, I have not been able to get figure, table, and equation numbering > consistently rendered in html5. I want to include chapter and section > numbers in front of those numbers so I'm using fields like "{ STYLEREF 2 \s > }.{ SEQ Equation \* ARABIC \s 2 }". I also tried Word's "Insert caption" > command but that didn't work either. Typically, the html shows"1.." instead > of "1.1.1", i.e. only the chapter number is included. > > Best regards, > On Wednesday, 20 April 2022 at 19:26:51 UTC+9 jgran wrote: > >> Hi, >> >> how to correctly convert Word documents (.docx) which have numbered >> sections while keeping numbering? >> The numbers become paragraphs when translated into other formats >> (markdown or pdf for instance) and remain on a line above the header text. >> a.docx: >> 1. Header 1 >> 1.1. Header 2 >> 2. Header 1 >> >> a.md >> 1. # Header 1 >> >> 1. ## Header 2 >> >> 2. # Header 1 >> >> What's the best way to deal with this situation? should I somehow remove >> numbering and use --number-section in a second step? >> >> Thanks >> >> -- 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/4c0d85e5-65a1-4c19-8859-d50d1be7bb8an%40googlegroups.com. ------=_Part_1647_367182302.1660809598367 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In some places, numbering gets correctly rendered in html5 if I change the = second part of the field from "{ SEQ Equation \* Arabic \s 1 \* MERGEFORMAT }" to "{  SEQ Equation \* Arabic \s 1 }".
In some other places, it works without = this change so it's still not consistent, though.
On Thursday, 18 August 2022 at 12:5= 2:04 UTC+9 Johan Bergquist wrote:
Hi jgran,
I'm using Pandoc 2.18 for Windows fo= r docx-to-html5 conversions while I do the docx-to-PDF conversions directly= by other means (Acrobat, Word Save as PDF). I have no problems with the ht= ml5 conversions and the --number-section option except that unnumbered sect= ion headers in Word get numbered too. I solved this by creating a different= Word paragraph style "Headline" without numbering and applying t= he +styles extension, i.e. -f docx+styles, and added a "div[data-custo= m-style=3D"Headline"] p" entry to the css file for selecting= and formatting that paragraph style upon html5 rendering.

However, I have not been able to get figure, table, and equation n= umbering consistently rendered in html5. I want to include chapter and sect= ion numbers in front of those numbers so I'm using fields like "{ = STYLEREF 2 \s }.{ SEQ Equation \* ARABIC \s 2 }". I also tried Word's "Insert capti= on" command but that didn't work either. Typically, the html shows= "1.." instead of "1.1.1", i.e. only the chapter number = is included.

Best regards,
On Wednesday, 20 April 2022= at 19:26:51 UTC+9 jgran wrote:
Hi,

how to correctly convert Word documents (.docx) which= have numbered sections while keeping numbering?
The numbers becom= e paragraphs when translated into other formats (markdown or pdf for instan= ce) and remain on a line above the header text.
a.docx:
<= /div>
1.=C2=A0=C2=A0=C2=A0 Header 1
=C2=A01.1.=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Header 2
2.=C2=A0=C2=A0=C2=A0 Header 1

= a.md
1. =C2=A0# Header 1

=C2=A0 =C2=A0 1. =C2= =A0## Header 2

2. =C2=A0# Header 1

Wha= t's the best way to deal with this situation? should I somehow remove n= umbering and use --number-section in a second step?

Thanks

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/4c0d85e5-65a1-4c19-8859-d50d1be7bb8an%40googlegroups.= com.
------=_Part_1647_367182302.1660809598367-- ------=_Part_1646_2006692236.1660809598367--