From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31199 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: bapt a Newsgroups: gmane.text.pandoc Subject: Re: Using --section-divs with a custom environment in LaTeX Date: Tue, 9 Aug 2022 02:43:48 -0700 (PDT) Message-ID: <5e553023-038f-4270-9c23-040d1cfa1761n@googlegroups.com> References: <5779B033-0E00-4C16-954D-ACC2EE2FA125@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_442_30193933.1660038228570" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39552"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDG3FYUYQUCBBVOYZCLQMGQELLIADXY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 09 11:43:53 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f189.google.com ([209.85.219.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oLLmD-000A7z-2Z for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 09 Aug 2022 11:43:53 +0200 Original-Received: by mail-yb1-f189.google.com with SMTP id 207-20020a2505d8000000b0067709d8d3eesf9324211ybf.18 for ; Tue, 09 Aug 2022 02:43:52 -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=pujUlqRks/kt41vcwqma3WMepDh1q4SM74UojMxCM+A=; b=c3Td5/fQbzlOD8h/Eye/bJaBlX/zG59CMOd37zcNNXJ3cCq2RyQ6z/ftJ2qS8K4aAt cKFaiLiK4B36Jo1aNBLb+5+3rJFLIyzRuk70m6hILc8bm2z5gJ7Q0jW9PcV1GWe/lNI+ cUJvzApi6rL1Cy9XH+3mFn6STp+7dvN0rxKYkYtuWQtVKtJCSOFU3HD+XV+N9S5EtwIm 1pXiHnBx+r8VpR4Rz7TGDZkCAIq+SrtcnG4IrsEb3d7godQvJ32qDRHCI3kEiZOfOJx4 vg1nUmQe/STn3dRYaNDGxKdpy4rf+DWwK8RzXAJ2jBIS6wY5UtS/65/QsmZbPOEtnttk qV0w== 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:references:in-reply-to:message-id:to:from:date :from:to:cc; bh=pujUlqRks/kt41vcwqma3WMepDh1q4SM74UojMxCM+A=; b=TIn3d44hI4hh9UzG9paGEQs7QodtJSiNR6jNgDV4/twKgHVh6VpW21n9xD7bb/kjRE 7ur0Okqi04ux9nRr01OIn73cg6Mmm+vVXdmQ11y3eusL/R/XZ8K6ignovM0byFM9xRSy vleG0Fpzkr7wFowwA4FZd5wirG0zuOxmjqJgO92LFC66ajhlJEZWJMo6i2Tt/j6cyfZm 50UU2eSRdo7XysAjgs9i4T3VwZ6K/Ba8xXQUWreVY8V4KnxsJks4CfFedAp55WHvbtiI xpAaTa2czS8YBIB81EBLO71/ot/7/OaXcwbo8dZJXmaiarPpaR8iOqRFOQAoSlv3X1K9 LuHQ== 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=pujUlqRks/kt41vcwqma3WMepDh1q4SM74UojMxCM+A=; b=6CglY/KihQrMYaWhfEIeoYdrGifeH1SLQ0MPHie0uIibsXBAHfB8WVLUr+aKp1cmwU cDAeJ+kWlUkIJhCY27BvxPKPO2x0mOV2zxmedtqs1Q/l6FQvjoC+W0TXOfrRm3pn/Li8 cC3CJvveOz/bIBlDl9tNrtPzPHxULw2S4ryxekIxAGoaIrEaxsBf6QpIHhqRjz8BT2hi GvyPY7ZZslxFqkEcsOkXcVV6Pj8Sbqowzhy5mw8lo63pT444zqjznZgVxs/gwwvvraeT oz1L6yNbYSf26nznXis5PKoNA2hmUsUUeNfRDoxwGrTHaS5sNL262JSUe6W1Dv4Owx08 XgCg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACgBeo0ktMVyKEQpVWFsUEXEjYYaIjCcXO9DW1j4CpJsiHbI75flX8jb jnOpFEW8iF0yEkc40qeGlyQ= X-Google-Smtp-Source: AA6agR6RWzQdNSH2bySApDOLaC/qKMjxOCR+6TzZFmrjVwpNkeVS0vscje1L3zEblSgU2Jtut098+A== X-Received: by 2002:a81:1487:0:b0:328:2f38:3401 with SMTP id 129-20020a811487000000b003282f383401mr22938816ywu.438.1660038231960; Tue, 09 Aug 2022 02:43:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:dcc5:0:b0:671:7493:cd0e with SMTP id y188-20020a25dcc5000000b006717493cd0els8045304ybe.3.-pod-prod-gmail; Tue, 09 Aug 2022 02:43:49 -0700 (PDT) X-Received: by 2002:a05:6902:12cf:b0:67a:7055:677f with SMTP id j15-20020a05690212cf00b0067a7055677fmr20372486ybu.219.1660038229225; Tue, 09 Aug 2022 02:43:49 -0700 (PDT) In-Reply-To: <5779B033-0E00-4C16-954D-ACC2EE2FA125-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: auguieba-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:31199 Archived-At: ------=_Part_442_30193933.1660038228570 Content-Type: multipart/alternative; boundary="----=_Part_443_688761972.1660038228570" ------=_Part_443_688761972.1660038228570 Content-Type: text/plain; charset="UTF-8" Ah OK, thanks, it wasn't clear to me that it was only for HTML. I've adapted the Quarto filter "latex-environment.lua" (https://github.com/quarto-ext/latex-environment/blob/main/_extensions/latex-environment/latex-environment.lua) to produce local beginEnv = '\\begin{staticcontents*}{' .. v .. '}\n' local endEnv = '\n\\end{staticcontents*} table.insert(divEl.content, 1, pandoc.RawBlock('tex', beginEnv)) table.insert(divEl.content, pandoc.RawBlock('tex', endEnv)) to wrap the content from divs with specific IDs into the corresponding flowframe, ::: {.frameid1} ## Introduction This too should go in the section's _frame_. ::: Seems to work well enough for my use-case. Thanks, baptiste On Monday, 8 August 2022 at 18:29:39 UTC+2 fiddlosopher wrote: > --section-divs is HTML only. > However, you can use the function > https://pandoc.org/lua-filters.html#pandoc.utils.make_sections > in your Lua filter. > > > -- 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/5e553023-038f-4270-9c23-040d1cfa1761n%40googlegroups.com. ------=_Part_443_688761972.1660038228570 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah OK, thanks, it wasn't clear to me that it was only for HTML.
<= div>
I've adapted the Quarto filter "latex-environment.lua" (= https://github.com/quarto-ext/latex-environment/blob/main/_extensions/latex= -environment/latex-environment.lua) to produce

&nb= sp;       local beginEnv =3D '\\begin{staticcontents*}{' .. = v .. '}\n'
        local endEnv =3D '\n\\end{static= contents*}          
  &n= bsp;     table.insert(divEl.content, 1, pandoc.RawBlock= ('tex', beginEnv))
        table.insert(divEl.conten= t, pandoc.RawBlock('tex', endEnv))

to wrap the con= tent from divs with specific IDs into the corresponding flowframe,

   ::: {.frameid1}
 &nb= sp; ## Introduction

 &nbs= p; This too should go in the section's _frame_.
   ::= :

Seems to work well enough for my use-case.
=

Thanks,

baptiste

On Monday, 8 August 2022 at 18:29:39 UTC+2 fiddlosopher wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left:= 1px solid rgb(204, 204, 204); padding-left: 1ex;">--section-divs is HTML o= nly.
However, you can use the function
https://pandoc.org/lua-filters.html#pand= oc.utils.make_sections
in your Lua filter.


--
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/5e553023-038f-4270-9c23-040d1cfa1761n%40googlegroups.= com.
------=_Part_443_688761972.1660038228570-- ------=_Part_442_30193933.1660038228570--