From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32190 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: docx -> gfm with custom styles Date: Fri, 17 Feb 2023 08:10:03 +0000 Message-ID: References: <3909f520-e8db-4cf9-900d-6a5a858c1a18n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 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="28142"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBX7MXSPQMGQEZGKJUQY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Feb 17 09:10:12 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f192.google.com ([209.85.208.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSvop-00077o-UJ for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Feb 2023 09:10:11 +0100 Original-Received: by mail-lj1-f192.google.com with SMTP id n22-20020a2ebd16000000b00293603b77adsf58898ljq.6 for ; Fri, 17 Feb 2023 00:10:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676621411; cv=pass; d=google.com; s=arc-20160816; b=Dl6FcCOhHdz/RXaPhAtPXXxBjOKMgOLdGgrfvAE4ihDuQRUGJX1vefi2cFUqn/2R1A g+akIOUwfkTF5EEVnKJw6zxsmk2nEqfMF3nYhMmgce/oRiJfY8Z7CdtRk1ED32UMZbdM LMt5xZ3tvuXSyxLg4+8JIuO5/CXUHddE1bFPIiAMPwnqecEkYD7xxYdo01oWABeNL3A+ g1nHaJDEu8KDWpQ5KvA446fsAVRqi/m+nIfaXA7eWRCZqi66uo3liLH++vIxE4AlYT/g XG6SdrRL6gBL7C8GCKVF+r+wPZxMF5S35GdcgFmQQkFHgLYgf97uqUf6gpiFrJvBIxAC 8zqw== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=Z8kXqfNaQc7op5QRzu7qDa5QPGfA9KKFAs2GEPGkDoU=; b=pikZQAi6nnLRW4n3pukgogmBG4SjkEPXndlPk5HSeZI1saWee9Iepvj29+7/mlBL88 BYYW0p3Al7KZ/JQFGRJKiEChTrqdRQnKzetDwdb7537Lza+SzHv8FpTDZLidl5eLCg1L SUzolSMxQGFqdbeJZXKpwMSz8Vpz9nb49yfhV+x7Tow9xyDCItB96L5MXdiEOkZj0gQ5 A8kRwEpYqnopf5F38u7wI5ybkr3+QnuPEsraCspmwAmcVG0X07RRSAqgB7P+CDLymij9 uc/SdZugeX0Od9Tii/a898P5VhnUNcMUgALmKwr1bMElnAVgcJ2ofLjedgZXcUj7OHHr GQ5w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=KiOmaXCT; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=Z8kXqfNaQc7op5QRzu7qDa5QPGfA9KKFAs2GEPGkDoU=; b=CiDdARd2i6G+rbut/EqKGrS/Cp5nMMM8ySq4aR1LBabjLQrH9x+dR4LUxZbjMAmW+2 iDD52+Hbl9pADReGHjbLdUOh80g9dFntEQ1muS40MzpqreeiHLYAEzHzNP0oUV47p2nc VORPX5bXnu2VN7WUBf1gryb4xZVCiwYBKKa1BWTRtYnzB3WyfMt5UbOxHghQBD47zsdA uQ3PAbkSYFouEYrx+Yrl/+A/OY+p08MDahYWBRgh+a3IuhV6E/fWXdjLTfEc0ZzUzwJY hqEJgA3Uh+5s1CxigOvul/7b8VQYPWYhzVqR/jilrHxOg 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=Z8kXqfNaQc7op5QRzu7qDa5QPGfA9KKFAs2GEPGkDoU=; b=v0sewItb2GrHBo8o9x4iaJXH8We1wGz4h84fDz4G3kNR79a016qWhPSBBBJGyZhtcd w6YvFUySsbN25PGzunzukN9WFiOjFceGfvPbMNuyVr31/yLQWov9PVni7OOh1Qn+3yX6 hHSq5kk7SUAWiILfkIczj7O2j8KBbAir/JLphPHKIp1knXxhqZ8HTxMaK1tl/oRYzu0d IwjoU1EXJ64ISiK0cke7cO8OkEZwMpudvAvTBuIzKfDy1+18owMLYDBUxikHv1c3IU8l Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWNVgEuiPr2brzxb2wZrBnRWFvxKRXr4O4iI/TH289GaT4JEyaW OtOhAYm70XqfY/ZMfXxoPbk= X-Google-Smtp-Source: AK7set/p/fDNW/1KucNMcMUIMSD47oEvzSTi///rjkamFPW6+wrZBZNcDMFKHvjD5TGwC6QRWMkUnQ== X-Received: by 2002:ac2:5442:0:b0:4d5:ca42:aee3 with SMTP id d2-20020ac25442000000b004d5ca42aee3mr176523lfn.3.1676621411338; Fri, 17 Feb 2023 00:10:11 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3b91:b0:4db:51a5:d2e8 with SMTP id g17-20020a0565123b9100b004db51a5d2e8ls103171lfv.2.-pod-prod-gmail; Fri, 17 Feb 2023 00:10:06 -0800 (PST) X-Received: by 2002:a19:761a:0:b0:4b5:9bfa:801a with SMTP id c26-20020a19761a000000b004b59bfa801amr2180645lff.46.1676621406246; Fri, 17 Feb 2023 00:10:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676621406; cv=none; d=google.com; s=arc-20160816; b=ZZEMgvbk2DDrKsbad4IYuyvJ2PjR0/0hFN08wADmDHHxjxrF/AyEXFF10ummpPtyZ8 2//Fe72U7ykRhL+5tN/xEVrLoXQdd1GmZrhWQb7q7RRp9nLq76d6Oq693SDeyiOmXLVN N7567U9oivQwSzbksBZWjVdV0SXJ87YPj+z1464uN03Kp4BV4tV0hC0oyE8rvfpde+HL Cc/SVXaR3unFZ1NjkmR3PBhtPxNFEfxy0zvK6itl10jiy7rnpQsTqP0XOnx8FSuHaQY/ +F+rF9W84Dt3wWcUaMXrOWkJ3ozYG4CtHbAymIjKCjrye1ZLtUeUbX045MKcnMi4ustK FDaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=z042LLe+WQUsx/gLD5Wh4/zbgEuaanQPQ3HBQpDxEmA=; b=oxVS/iGD8aWNgPGKmXBSEQeCUh4uJ1E4BVKZvNo+c5p9m3zjzFsbm+54rOZuQ+48ZD /FB86J4HFu3a8cQKGJtJOci3iQGU2f4x4F4QwDp3nnUfoX18bJCCs2KUxzR1zovKzVVM ZHtNaLZHWOGK8xqIOWNEgB1YdX9+czrv2WEJr0j7bF+tnUMrf3ZmFsDvqG4/yT69V1X+ O1MMW/Dn0xDs/pEuGZ9Cdc47qAqz7b2AlIFuH7yaHSrPcPav7XM86R7jJ0589enAuJq5 G1aQOc24m6MO1VF0G3NK9C8PDg8GL2reftATPN4lF0kCEQ4QQTm07PCfosI+A9+L+G7C oVlg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=KiOmaXCT; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id b14-20020a056512070e00b004dbafe55d43si161776lfs.13.2023.02.17.00.10.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 00:10:06 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7680724064F for ; Fri, 17 Feb 2023 09:10:05 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PJ4HK0VVlz9rxG for ; Fri, 17 Feb 2023 09:10:05 +0100 (CET) Content-Disposition: inline In-Reply-To: <3909f520-e8db-4cf9-900d-6a5a858c1a18n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=KiOmaXCT; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:32190 Archived-At: In this case, it would be preferable to turn the div into a Header element = and let Pandoc format it itself: ``` function Div(div) if div.attributes['custom-style'] =3D=3D 'Internal Heading' then return pandoc.Header(2, div.content[1].content) end end ``` Le Thursday 16 February 2023 =C3=A0 08:00:08PM, Ben Menashe a =C3=A9crit : > Hi, > We have a need to convert docx to gfm. > Since docx has some user defined styles we use this "+styles" extension: >=20 >=20 > pandoc --to=3Dgfm -f docx+styles --output=3Drtb.md --extract-media=3D. --= wrap=3Dnone > 'rtb.docx' >=20 >=20 > So now we have html div that wraps our content. =C2=A0Let's say I want to= transform > this: >=20 >
>=20 > Scope >=20 >
>=20 > Into: >=20 > ## Scope >=20 > How can it be done? I tried to setup a Lua filter but not having success = to > have it output "##" along with the div content. >=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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/m= sgid/ > pandoc-discuss/3909f520-e8db-4cf9-900d-6a5a858c1a18n%40googlegroups.com. >=20 > References: >=20 > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/3909f520-e8db-4cf9-9= 00d-6a5a858c1a18n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=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/Y%2B82W6%2BZIQlExrwL%40localhost.