From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32189 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ben Menashe Newsgroups: gmane.text.pandoc Subject: docx -> gfm with custom styles Date: Thu, 16 Feb 2023 20:00:08 -0800 (PST) Message-ID: <3909f520-e8db-4cf9-900d-6a5a858c1a18n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5236_998281908.1676606408520" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29183"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDNMLY433MCBBTHXXOPQMGQE765QDBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Feb 17 05:00:15 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f64.google.com ([209.85.219.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSrux-0007QR-HR for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Feb 2023 05:00:15 +0100 Original-Received: by mail-qv1-f64.google.com with SMTP id 98-20020a0c806b000000b0056c2797aa8bsf2277952qva.2 for ; Thu, 16 Feb 2023 20:00:15 -0800 (PST) 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:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=NL1g6O5Zql57YfS0pThS3NX8IeNYHfqGQgRwfotk8KI=; b=NqrYwhoJelEtF4ZTB2IbyiyEdz/TsCEWkruu8D0B8LgEbzvFt6ZZDt0WHIi4kRyIuo 0M+LjeBVsgvHGwjQUrJ3qcOmIDkT3UXHQ6SWCpOAL7UXxIQFYj1zwjGJzQ3eHYeP9+D9 f+andoJ4JrZG+rdsSncDkr+viyNEVT4tIfmBMlTwFNMyvauz+jpyEhtyESGVkAtWxg8w Xo3Z6T1zJxcI1pyQiX4wjmmb+xKdY0KgIXP997NxYYK1SVEMXFqaAHYWFaHJTDs5gzyq O0ifLXMOPPWH97zx7665bueCYkiVnlNlS+eumLj1pkJ1PA8srzNO9oIr/hjcaXaY30m8 KNSA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=NL1g6O5Zql57YfS0pThS3NX8IeNYHfqGQgRwfotk8KI=; b=RAJ7qUU+rRP5A9QuKdfoHK1kXTWkx8t/49zrUqCU9QOWYrabG2BCC7/MC8YpyTgN4w Y8mMwPkoKYPXSfKlm4Nunl020W+2Be6dWAISeAnq00jSnCU0iYr2e+8VH4rhdlzh3bon NRzwn/okI8SiXFEqP1Ovxst4NQCF0h1N0Zjv0UqxK1aHa2//rRYc9xHcEVr2MoY8Hcdh WUvd1RDtKlJfYajwv9vVDq7s+kFuHGkkocG0nfip2zxFGkGr90JVylxT6Ip11yj1s8dp 2DWGas49gcWOpj1YKMCyrILIOp5wzKNSUdtclHQIZnu/8IS1bOVI/Y/UUqWjWdYpjgc0 eQ4g== 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:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=NL1g6O5Zql57YfS0pThS3NX8IeNYHfqGQgRwfotk8KI=; b=ruLAhFymyn0drPDCbS3XFvLuzIKgC1ddfcdIwKP2E7WLyuAoyzb1DMHbcfZjWXJBxV 8FHfuUsSfGUa40qs47P0pfMbTyLIfbLVq6GJYhEQIf/hmNfTfvi+J3lEAx5CLZ1lFeT8 RZiSEFXMvaOWw9jszfzIrSItQnWFT/hq2+Jub+Jf4yw726LZ9xKFp11hmT8rrJoMZmvQ ZELAc8JX5DIlD38ihzND4jIf2E57Hji4vDYs9XYI5O9VHCHczNYq5BGsRnPWZjHQ6aoK xUmQkaw37NgUZpzNOZHS90d/6W+jzOp3LB862qq4sVhGYVm09njqFD7TJXFqtf+NExMk B1Ng== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWmWco0aIJUJNHUp5sI0cCWWk82GoavLMJGVwMGaab70AViLc3g bO4fVZnYOzUlCHTJbUz33uk= X-Google-Smtp-Source: AK7set8hux+APHTWKv3eCSW5aikhw5x0jiDMz7PW6SdjxSad+ePaiGGqEqBzU+QpQFN61ZKpBH8RDg== X-Received: by 2002:ac8:15b:0:b0:3b7:fda5:caa5 with SMTP id f27-20020ac8015b000000b003b7fda5caa5mr14716qtg.2.1676606414430; Thu, 16 Feb 2023 20:00:14 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6214:3984:b0:56e:94a0:dc66 with SMTP id ny4-20020a056214398400b0056e94a0dc66ls2853360qvb.11.-pod-prod-gmail; Thu, 16 Feb 2023 20:00:09 -0800 (PST) X-Received: by 2002:a0c:e1d2:0:b0:56f:80e:8ae1 with SMTP id v18-20020a0ce1d2000000b0056f080e8ae1mr322910qvl.14.1676606409217; Thu, 16 Feb 2023 20:00:09 -0800 (PST) X-Original-Sender: benm5678-Re5JQEeQqe8AvxtiuMwx3w@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:32189 Archived-At: ------=_Part_5236_998281908.1676606408520 Content-Type: multipart/alternative; boundary="----=_Part_5237_1614767490.1676606408520" ------=_Part_5237_1614767490.1676606408520 Content-Type: text/plain; charset="UTF-8" Hi, We have a need to convert docx to gfm. Since docx has some user defined styles we use this "+styles" extension: pandoc --to=gfm -f docx+styles --output=rtb.md --extract-media=. --wrap=none 'rtb.docx' So now we have html div that wraps our content. Let's say I want to transform this:
Scope
Into: ## Scope 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. -- 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/3909f520-e8db-4cf9-900d-6a5a858c1a18n%40googlegroups.com. ------=_Part_5237_1614767490.1676606408520 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,
We have a need to convert docx to gfm.
Since docx has som= e user defined styles we use this "+styles" extension:

pandoc --to=3Dgfm -f docx+styles --output=3Drtb.md --extract-medi= a=3D. --wrap=3Dnone 'rtb.docx'


So now we have html div t= hat wraps our content. =C2=A0Let's say I want to transform this:

<div custom-style=3D"Internal Heading">

Scope
</div>

Into:
<= br />
## Scope

How can it be done? I t= ried to setup a Lua filter but not having success to have it output "##" al= ong with the div content.


--
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/3909f520-e8db-4cf9-900d-6a5a858c1a18n%40googlegroups.= com.
------=_Part_5237_1614767490.1676606408520-- ------=_Part_5236_998281908.1676606408520--