From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32790 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Wrapping sections of text with
in custom filter Date: Sun, 11 Jun 2023 15:51:09 +0200 Message-ID: References: <2fc450a6-5a16-316c-02c8-8ef055bccd11@meddatainc.com> <93e5b610-66a2-6ac7-1d53-8a04a8314249@meddatainc.com> <853c402b-d9ee-4c9d-8bae-15b20faf7194n@googlegroups.com> <1F66BB1E-B5C8-4062-8202-D82C5CE9A3D0@meddatainc.com> <6d414734-e661-ae2d-68a1-4dfc9cb4f035@meddatainc.com> <4c58dad0-bd86-608e-2d68-74bd6f2f808b@meddatainc.com> <574fbf9f-c1b8-711a-f14a-3acd75cbf634@meddatainc.com> <05ba5663-1578-d555-8539-d6a2bdff6743@meddatainc.com> <7878b22d-bf64-2d25-1136-d9f9cf5e135b@meddatainc.com> <992af9a4-285c-a20f-56de-347ea88f021f@meddatainc.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a7437c05fddae500" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15131"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBWVCS6SAMGQEWQTKTSI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jun 11 15:51:27 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f185.google.com ([209.85.219.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q8LTa-0003kJ-MB for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 11 Jun 2023 15:51:26 +0200 Original-Received: by mail-yb1-f185.google.com with SMTP id 3f1490d57ef6-bad475920a8sf9956908276.1 for ; Sun, 11 Jun 2023 06:51:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686491485; cv=pass; d=google.com; s=arc-20160816; b=0+KgFNyEZaOUSrExSMlEGpBN0/dqBHuJFTSRR6C+yXuDcFX4B0QOCggB6WITadOE0N 64iVAWlGRBoXKv4MYHLSZt1ii0BBT8lBEzSnIbEdFeBB58p653mBfsg8yvpON/JbB3ud 8j2NycWwCJEjKFT2qyXMowjCE5G27wpDYsJgJcyQSKALnlksBK/Ig1MqJ07mx8qffGCr PSyz/dAj2Ilon7VfsEjFJ0QXzmfHXMa7Q6ocCgN1J87XpXF7T2B1VqKxZL46YVBllIVL pRROF3cFR6B+gKbFbpWr5Ka4bOgHWLIrgTDwwcEA11k2yzbrNe52KXSG8iwduW/nhRus wRkQ== 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:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=ZPlwosboztoOVuwFVc6T0KeBSx8CfE1ET/kLH3Lk9xE=; b=ngP5C1ApFxB7ysZZQlFbMxV2bkf9F7p96ZbGRmHAizUQbXv4DdnDHNCbd5lP7oAz9n r0SNpIrfv20k/BDSsyc8ja8r7AL+FKjhLLHt5uXyAZp8dIdhfTWiWSlVplO+JEA7rHlS dvJh7H8YXOqyceTu1zvSPBgWUZ3ruQLY6ApD2KhotfbMfBf1OteYG10tC5gKzZdur4z3 3Z+XKjUQ8th4mLTncDqt2M8nlZY4S5Fm43+QgYC7sVC4Wy1fDvZ0tRQXDJ50NAgSnEZb hkChZTiJVcNX/zCFNJyKSTQIw2WLE70szachSYImvkHvM55976LuixOGA5bjfYfu6tzE qLfg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.173 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1686491485; x=1689083485; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=ZPlwosboztoOVuwFVc6T0KeBSx8CfE1ET/kLH3Lk9xE=; b=UiMQVRwUM3hCOXjUH833+NdbdYrY3tjSv+W4eDqvODGRSk/TfnqqRr3cmR3tqa0ksn LnfjOUCLUOHCA7MxYLLzr2/2A7kotDZm0FzlXKr/FyYxZFZvdF4/ZXhlGQ262sOXfLZm Z1wFdbWwed/vSwfwR9Z3X8qUCR6kyZog5UUKfw+Z+7l8mJ+NsDfMNshqhIDrGNRNBDFN oCrH1DSWv+jhqvWJ0ZxZfojF2BiKIgwpftC82AfyiQUfTISvPwlCVnAwImqfH3yByUP4 iIOFHvRGnL7R2f6Y5iexYSX0V5NOrB4xU6Tkrfam+/TunmTsKwKgVJgzitpmujytPTLV X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686491485; x=1689083485; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=ZPlwosboztoOVuwFVc6T0KeBSx8CfE1ET/kLH3Lk9xE=; b=j4qxGMY9R/NdFAr4d7+/raTMRl4qP1s2bymM0hl18SWyOGHvPoI19U/mII8Mi13BPQ nt8jFbQLzGRQ7mrP/AoiymfoNUvQJ4frH13GV0qtEa64gQM4cxZ5MUbtQ2N8YmaLDID4 6RPQOzKhBmUuncadqnAnd4Kd8LrC3vGsXC4xNKTnZtAlqqbl06RieVkLY7Q9lo2oL+4Z qL3uwmUVHKmsCZEtPPfpfwvjZgEH6A26cnP6vDZ/TYHC4uG0yAC6sED06C5dIec66NUm 1lZjbd Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDwbxdY4YQnw79AJqHpgtEG4gm/bBDOrdKkiu1p+oDhtDJJ5QKtx Mv3eYXiykQXOLD/X3fr0KYU= X-Google-Smtp-Source: ACHHUZ4hjWRBnfrLUEpcsEtI17BBIcYtwBDTWueSWHiPXW5UmQYM1dSv7hdGnKhpuMjj559WWw4axw== X-Received: by 2002:a25:d85:0:b0:bca:f238:5ff2 with SMTP id 127-20020a250d85000000b00bcaf2385ff2mr501558ybn.8.1686491485632; Sun, 11 Jun 2023 06:51:25 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:8001:0:b0:bb1:af05:8006 with SMTP id m1-20020a258001000000b00bb1af058006ls943403ybk.0.-pod-prod-00-us; Sun, 11 Jun 2023 06:51:22 -0700 (PDT) X-Received: by 2002:a81:a014:0:b0:56d:c02:58ac with SMTP id x20-20020a81a014000000b0056d0c0258acmr1863372ywg.20.1686491481967; Sun, 11 Jun 2023 06:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686491481; cv=none; d=google.com; s=arc-20160816; b=elrQB02jT/gpHwzoJoCkOae7lzWDwnmxoA9G0NYrzn2gghm6q4Lbt+X3rQtU6K0xNW b7V6qjZJmiyChN0TKZeMM7ePQru0bYruMdqmPTy2OVqnMrq7FJmEeH4wMFA7w8oA1Egz xPmCeDlMdVcyeOqyLqjzvb4GRwWe8b9CSfI2eHGqIKyHquzOYSZi8RwlnGk+sI9e5y6h eYdmajPU0I/04ncUAWfkQplaJWsQxM7zfyxEUuaK5Wb00Cy7XXehufuizn7dPvrr0Quk Y3mQ/BG4byuMyJ9WzbdniOumhA0vaRQOzJ3oOrfhMa7/ezf3SoDr3wpFgVDAQRSv6Bgn Ex7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=zJxrkebGdccEXmqT1rsl9Jw2Obj7UD6X/KVVS/9nKGs=; b=XM9bY5b+5Y1pGpatUO8j5AhCCUNpguLsxrVgyS7GiirkRwdmrhbFf1PoIFKbCIGojN dVEOYf+7wM5MMRr/yZ9XZhfx8VvEuFYugCDrnJ9SdzmkLN7boncbSImIxCtERA3TQLYU DrL8wzhKrLxYPoXSqFhYnt/oijcpFBuWTOQcDKWOaEIltW0iS2PXTh57wIS8+sCaeqkc vQpcz3R/z3NqV8L9k2quvHfpq8DVd5Fq8bzzTLDsXqu2ahTVgWTdJXRMORXi0UGS6afn QR8te4K9KMQtLQ28v1IYbmidq0ffRtTa2BkyU9BpHrDDuvn/nAd6fY4+AxrKUsOMbdbq OOAw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.173 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com. [209.85.128.173]) by gmr-mx.google.com with ESMTPS id eh24-20020a05690c299800b0056974f3f27dsi163396ywb.4.2023.06.11.06.51.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Jun 2023 06:51:21 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Original-Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-569386b7861so66398167b3.0 for ; Sun, 11 Jun 2023 06:51:21 -0700 (PDT) X-Received: by 2002:a0d:cb52:0:b0:56d:6dd:c1e0 with SMTP id n79-20020a0dcb52000000b0056d06ddc1e0mr2647906ywd.21.1686491481193; Sun, 11 Jun 2023 06:51:21 -0700 (PDT) In-Reply-To: <992af9a4-285c-a20f-56de-347ea88f021f-FcZObrvlYduBUy7/sJONFg@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.173 as permitted sender) smtp.mailfrom=melroch-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:32790 Archived-At: --000000000000a7437c05fddae500 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable An image will be wrapped in a `
` when it is the only thing in a paragraph, so the workaround is to add a non-breaking space after the image= . This filter removes the Figure leaving the Image and an nbspace in a Para unless the Image has a class `.fig`. It can be used both to globally insert the needed nbspace into Markdown or used always to so to speak implement a better syntax where you clearly mark a lone-image paragraph if you want a figure. https://gist.github.com/bpj/6664b0b0755e7ebe9007de4d1426d400 Den s=C3=B6n 11 juni 2023 04:26H skrev: > On 06/06/2023 03:14 PM, H wrote: > > On 06/01/2023 04:34 AM, 'William Lupton' via pandoc-discuss wrote: > > Am I correct in thinking that when you say "filter" here, you really mean > "writer"? > > In filters, you can use the 'traverse' field to force top-down traversal. > See https://pandoc.org/lua-filters.html#traversal-order > > In writers, you can choose to call doc:walk(), which will honour > 'traverse'. See > https://pandoc.org/custom-writers.html#example-modified-markdown-writer > (and example below) > > However, if you use pandoc.scaffolding.Writer (as I think you are?) then = I > suspect that you can't control the traversal order (but I'm not sure that > it makes sense to do so, because, for example, surely you always want the > contents of a
to have been traversed before you add '
' and > '
'?). > > With the custom writer shown below, and with an input file that consists > of the single line 'Text' (and using my logging module > ), you get this with the default > 'typewise' traversal: > > (#) inline Str "Text" > (#) inlines Inlines[1] {[1] Str "Text"} > (#) block Para {content: Inlines[1] {[1] Str "Text"}} > (#) blocks Blocks[1] {[1] Para {content: Inlines[1] {[1] Str "Text"}}} > (#) meta Meta {} > (#) doc Pandoc { > blocks: Blocks[1] { > [1] Para { > content: Inlines[1] { > [1] Str "Text" > } > } > } > meta: Meta {} > } > > ...and this with 'topdown' traversal: > > (#) doc Pandoc { > blocks: Blocks[1] { > [1] Para { > content: Inlines[1] { > [1] Str "Text" > } > } > } > meta: Meta {} > } > (#) meta Meta {} > (#) blocks Blocks[1] {[1] Para {content: Inlines[1] {[1] Str "Text"}}} > (#) block Para {content: Inlines[1] {[1] Str "Text"}} > (#) inlines Inlines[1] {[1] Str "Text"} > (#) inline Str "Text" > > The writer: > > local logging =3D require 'logging' > > local function report(label, elem) > logging.temp(label, elem) > end > > -- 'typewise' (default) or 'topdown' > local traverse =3D 'topdown' > > function Writer (doc, opts) > local filter =3D { > traverse =3D traverse, > Inline =3D function(inline) > report('inline', inline) > end, > Inlines=3D function(inlines) > report('inlines', inlines) > end, > Block =3D function(block) > report('block', block) > end, > Blocks =3D function(blocks) > report('blocks', blocks) > end, > Meta =3D function(meta) > report('meta', meta) > end, > Pandoc =3D function(doc) > report('doc', doc) > end, > } > return pandoc.write(doc:walk(filter), 'html', opts) > end > > Thank you for your thoughtful response. I realize I have used the term > 'filter' and 'writer' cavalierly. I have a "slightly" complicated layout = I > want to output from the writer and my thought right now is that I should > try to add the
and
in the right places in a filter and then > let the writer just output the resulting html. > > I may have to traverse the AST several times in my filter to accomplish > the result since multiple
need to be added at different level= s > to achieve the desired output. > > I just downloaded your logging filter to aid in the development and am > also working on formalizing the rules for adding
. > > > I spent some more time learning more about writing filters and have made > some progress. > > I think the entire logic for adding
to achieve the desired > layout might be doable in the filter and most of it seems to be working. > > One thing I found is that when an image is included using the following > syntax > ![test](https://www.somedomain.tld/test.jpg) > pandoc wraps the element in
which I think I > don't want/need. > > How can I get rid of
wrapped around elements? At the ver= y > least I want got get rid of some text I do not > need inside the
element? > > -- > 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/992af9a4-285c-a20f-56de-= 347ea88f021f%40meddatainc.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/CADAJKhDBqvOL469ZXigacDug2dMx%3DOiGWjteOM3fXqT-29BM5A%40mail= .gmail.com. --000000000000a7437c05fddae500 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
An image will be wrapped in a `<figure>` when it is= the only thing in a paragraph, so the workaround is to add a non-breaking = space after the image.

This fi= lter removes the Figure leaving the Image and an nbspace in a Para unless t= he Image has a class `.fig`.

It can be used both to globally insert the needed nbspace into Markdow= n or used always to so to speak implement a better syntax where you clearly= mark a lone-image paragraph if you want a figure.
<= br>

Den s=C3=B6n 11 juni 2023 04:26H <agents-FcZObrvlYduBUy7/sJONFg@public.gmane.org> skrev:
=20 =20 =20
On 06/06/2023 03:14 PM, H wrote:
=20
On 06/01/2023 04:34 AM, 'William Lupton' via pandoc-discuss wrote:
=20
Am I correct in thinking that when you say "filter" here, you really mean "writer"?

In filters, you can use the 'traverse' field to forc= e top-down traversal. See https://pando= c.org/lua-filters.html#traversal-order

In writers, you can choose to call doc:walk(), which will honour 'traverse'. See=C2=A0https://pandoc.org/custom-writers.html#example-modified-= markdown-writer (and example below)

However, if you use=C2=A0pandoc.scaffolding.Writer (as I thi= nk you are?) then I suspect that you can't control the traversal order (but I'm not sure that it makes sense to do so, because, for example, surely you always want the contents of a <div> to have been traversed before you add '<div>' and '</div>'?).

With the custom writer shown below, and with an input file that consists of the single line 'Text' (and using= my logging module), you get this with the default 'typewise' traversal:

(#) inline Str "Text"
(#) inlines Inlines[1] {[1] Str "Text"}
(#) block Para {content: Inlines[1] {[1] Str "Text"= }}
(#) blocks Blocks[1] {[1] Para {content: Inlines[1] {[1] Str "Text"}}}
(#) meta Meta {}
(#) doc Pandoc {
=C2=A0 blocks: Blocks[1] {
=C2=A0 =C2=A0 [1] Para {
=C2=A0 =C2=A0 =C2=A0 content: Inlines[1] {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [1] Str "Text"
=C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 }
=C2=A0 }
=C2=A0 meta: Meta {}
}


...and this with 'topdown' traversal:

(#) doc Pandoc {
=C2=A0 blocks: Blocks[1] {
=C2=A0 =C2=A0 [1] Para {
=C2=A0 =C2=A0 =C2=A0 content: Inlines[1] {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 [1] Str "Text"
=C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 }
=C2=A0 }
=C2=A0 meta: Meta {}
}
(#) meta Meta {}
(#) blocks Blocks[1] {[1] Para {content: Inlines[1] {[1] Str "Text"}}}
(#) block Para {content: Inlines[1] {[1] Str "Text"= }}
(#) inlines Inlines[1] {[1] Str "Text"}
(#) inline Str "Text"

The writer:

local logging =3D require 'logg= ing'

local function report(label, elem)
=C2=A0 =C2=A0 logging.temp(label, elem)
end

-- 'typewise' (default) or 'topdown'
local traverse =3D 'topdown'

function Writer (doc, opts)
=C2=A0 =C2=A0 local filter =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 traverse =3D traverse,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Inline =3D function(inline)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('inline&= #39;, inline)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Inlines=3D function(inlines)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('inlines= ', inlines)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Block =3D function(block)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('block&#= 39;, block)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Blocks =3D function(blocks)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('blocks&= #39;, blocks)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Meta =3D function(meta)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('meta= 9;, meta)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Pandoc =3D function(doc)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 report('doc'= ;, doc)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 end,
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0 return pandoc.write(doc:walk(filter), 'html= ', opts)
end


Thank you for your thoughtful response. I realize I have used the term 'filter' and 'writer' cavalierly. I have a= "slightly" complicated layout I want to output from the writer and my thought right now is that I should try to add the <div> and </div> in the right places in a filter and then let the writer just output the resulting html.

I may have to traverse the AST several times in my filter to accomplish the result since multiple <div></div> need to be added at different levels to achieve the desired output.

I just downloaded your logging filter to aid in the development and am also working on formalizing the rules for adding <div></div>.


I spent some more time learning more about writing filters and have made some progress.

I think the entire logic for adding <div></div> to achieve the desired layout might be doable in the filter and most of it seems to be working.

One thing I found is that when an image is included using the following syntax
![test](https://www.somedomain.tld/test.jpg)
pandoc wraps the <image> element in <figure></figure> which I think I don't want/need.

How can I get rid of <figure> wrapped around <image> elements? At the very least I want got get rid of <figurecaption>some text I do not need</figurecaption> inside the <figure></figure> element?

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/992af9a4-285c-a= 20f-56de-347ea88f021f%40meddatainc.com.

--
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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhDBqvOL469ZXigacDug2dMx%3DOiGWjte= OM3fXqT-29BM5A%40mail.gmail.com.
--000000000000a7437c05fddae500--