From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32688 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mf Newsgroups: gmane.text.pandoc Subject: announce: a Lua filter to recursively include other documents from a master document Date: Tue, 23 May 2023 17:35:31 +0200 Message-ID: <4f707c3a-0048-8fbc-a2fe-f33a70204590@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------GqpDh0fsZ5HnEZPW3dKkqe0w" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37546"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDZYJ4HW2QPBBR52WORQMGQEYRP6UXA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 23 17:35:44 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f183.google.com ([209.85.208.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q1U32-0009SG-FS for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 23 May 2023 17:35:40 +0200 Original-Received: by mail-lj1-f183.google.com with SMTP id 38308e7fff4ca-2af25b667d5sf23853351fa.1 for ; Tue, 23 May 2023 08:35:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684856140; cv=pass; d=google.com; s=arc-20160816; b=OSYRcow8Va2gwQ3kUliqdO1unrI7dquTaLTQiOONe6FXRJK0HDk6kLcVodoohAGS06 KT6p5uECStqXdN7Z1zN+ZyO9LKIuZIeASzNBh/n8mh1u7pSFNhJgLv2hA8OjpIDJgZlL I+xrteRIK5cOTXiBq+KbxoWRUwNnSR3D8sWpLPdIAWkZPG8oGfvxs69xqpb9/4TaU6Wu TYPNo5U+n+dis6pjnpOltrkOHnt6QJ/OzYAIXMtqKFiHkWSMB0yjWcmQSpBu3v+1SeJb 9v58n2hvm4X4xMIopKedXKXbJV331qCbCI3yOleBOwmzizHxKa7BGxb3cot1ntpwq/D5 QFrg== 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:sender :dkim-signature:dkim-signature; bh=om3Dy86omTh7Qj8F+EkAFRa6sjsgLM/r4ml2m+Xgn4I=; b=K8klZEDqlxKWhzgDONsXvsfdeE+eWpywIbtGQxAJiWOWbKDT/iYxLjwnkirOtMyXtO s7Vu1LT91arfHkZozMcvrK3d7TbRjceXtBLZWJ/6jcS++ZEVUEFqiGLB+anNkxL5uLY6 6Z28128tUReFbOEGLykzhOWMgIUBIb9LN2/2rZ3KvmC6osDht0JDlGwxqf98Myen8j51 A0V0ehIa/9bz6qcrVmYxdI8yjNrrK3TW/F5ISdEYWd/p2RokGQruBiYIsrIrf3rnJXAh AvxhmMIBMmCcsQmUhlZbDbRMSurp6ISsqYjldtcp8WqtTgje8z7ssIoqCCD2L6bJaxh/ YH+w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=S0ljrayY; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1684856140; x=1687448140; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=om3Dy86omTh7Qj8F+EkAFRa6sjsgLM/r4ml2m+Xgn4I=; b=jtLnrcSsUFXwYBFhcD1RJ3np46aaluheUundejbQQuVooN7Q+7MYzVt1eT6PorPdBF JWf76Rsp3esOAuIjc5BXEbXxwVfnVON9hKNA6oSq+gjTzytzMZ+b+/u/pcHIdrA9HhY+ Ow1uc4vV/LcBg8b3V31UD8ZustbuoMHdORk1sByOueWhkkGjbcYWatrNf/PVnXvaUBIO 4a7lI7SOJUIG46l4e7j2/ODqw+sapCvoWU41jwIP/m5ZhaA90pCjk7/Zr2MRI8pwlRDi G03gR/wAdyi5NSUl1ZpLCf4RwAgEbMOq9bx/Itvfsfn7IvFlk7ZTNq79FhbRdoYPZg94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684856140; x=1687448140; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=om3Dy86omTh7Qj8F+EkAFRa6sjsgLM/r4ml2m+Xgn4I=; b=X+qmFCgNA2QI/VOUZZqvyGilEevH7xznfP7STWfPm0oHmoE5iy2ZeAzd7H8nsGKfqM 3Rv3vcAaluvy/T/jH6XkD/YAzBZoqxtyVV/xLsN+An7kHTrLtMvkeTeb0O+JRdnSw5hN 7K9NfjvEyaubUm+bomIXR8wZsvkDa/yKw92IjJLJoZbjl+CHKoTdcagDdeGUoBlpGsCA wYeLKbb4MzWtZyDNN0TzSCj92evtzgJwmLYGywGrFnZ5vxHEjfv49Ea58vqlypnBNnkE VFOIzUqS59MTwVBz8QEZXNTgNqynDaCQRr4+d1QhVj00g8PFtkHYBWTHhm4xIQgxvumo nzNA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684856140; x=1687448140; 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:subject:from :content-language:to:user-agent:mime-version:date:message-id :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=om3Dy86omTh7Qj8F+EkAFRa6sjsgLM/r4ml2m+Xgn4I=; b=EHEiArkimUdN3a0XgQWDHcIgQ8yBjcedwpkfawrU3h6uvgJJBH7CHl0XFUzL30qQUf fWKoCID3R08gAiXhib1ztRB7EZyHICMnvT+u2a+vahhWv2Pe5VPp7S9o68/Mts451shA 1zB2iBxys1lX1SisVkN3aRBCyS07mLaOuA8HCj0k8FQhFIxNz+atEPpe1lE+IyRU9pRN MzDMcYD5noWxNctdzjVdampbB1uyrm7zK9HFBUPvoUeFlUqDU41kO7Ma9TaNG423XFkY M Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDyhcUS6oVoz6lq1SHCi5jz9+ByYGcBRhx9QGmXG1kVt4RmY2Dp9 QUdBKk3/phKWqmXafCWuaoU= X-Google-Smtp-Source: ACHHUZ5sq7KFN8SlIB7yT5FWG9p+6w/1g0rCWLpeu3TtJEtBenXGuYmbPTU8+wnGVZMxV9FfPu6cRQ== X-Received: by 2002:a2e:9610:0:b0:2a8:b802:6f43 with SMTP id v16-20020a2e9610000000b002a8b8026f43mr3649324ljh.10.1684856139525; Tue, 23 May 2023 08:35:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac2:5b46:0:b0:4f1:4c37:e1cb with SMTP id i6-20020ac25b46000000b004f14c37e1cbls721926lfp.0.-pod-prod-09-eu; Tue, 23 May 2023 08:35:34 -0700 (PDT) X-Received: by 2002:ac2:5183:0:b0:4f4:6189:1d0 with SMTP id u3-20020ac25183000000b004f4618901d0mr2424049lfi.7.1684856134137; Tue, 23 May 2023 08:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684856134; cv=none; d=google.com; s=arc-20160816; b=Y7SU45mM8QwCgrrlFHkpOyTnAkhi+Kj3Lm/fgcTVz4raaLgb+597+qWAnHVPbSJNTk V1U1dp/I0xQPCLEBvpbyrv4iXBYBTxoDwIIka/rAc317IZde9hdv9KnCXoBItU9eQ4UZ O36Ylq11EWDIlj3dNOBh0lqujUoazVcX91PH1aE+vHbTxJCvy6nisSFHmXw00URG7Ujm OfqVMZPpD3RDZunabfkT/j1+kaR4Vivl4pklBnLHK+iQTdYad1xHKKl3fGlyh6lnD6lJ CrdlkIyJhIuEEKJrsMbqLVGqpKZpE5rWh+UEShARK+mvuiuVgovIHP2u4WWDHg0wMUdi AOKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:from:content-language:to:user-agent:mime-version:date :message-id:dkim-signature; bh=TkiCF+fu1PLeK36m7Lc4fO/5F0Ooc2sSszMe1s44VbI=; b=kA8Elvm16bX5HS1caWwAEgWnZpRm+Miu8cHqsVxCMiGjqpnoWsM3SJ4Q1CeIPXcc13 okNCfPgsh7O/LII4aQPk5sOAvSKznLbDBAzzjKI9WBkiTn1Fiun2khqY2xAQrLAKCgcq vlpGavVYdF8QSfjqOs2gLPAVcK08vRxrF7sUECvx6HQi3q7WgvmfbXjHfif6aK2nQFWl /B/nJiivl42gNmnv2qEawJbm14EAJiBWomDgWeAKpJl9W1BGnjavyrdZ/NcFgJQsCjkM 3DW7IHyPDXooXgP3CiFUz4o3EgVrjC6smuhZL24KiKXNJ3HAIbR1h2905w6IvnHoemr6 ackA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=S0ljrayY; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com. [2a00:1450:4864:20::22d]) by gmr-mx.google.com with ESMTPS id e6-20020ac24e06000000b004f3a8f89761si724320lfr.11.2023.05.23.08.35.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 May 2023 08:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::22d as permitted sender) client-ip=2a00:1450:4864:20::22d; Original-Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2af177f12a5so68704771fa.2 for ; Tue, 23 May 2023 08:35:34 -0700 (PDT) X-Received: by 2002:a2e:850f:0:b0:2af:1622:a69 with SMTP id j15-20020a2e850f000000b002af16220a69mr5605392lji.48.1684856133484; Tue, 23 May 2023 08:35:33 -0700 (PDT) Original-Received: from [192.168.1.52] (host-95-229-108-50.business.telecomitalia.it. [95.229.108.50]) by smtp.gmail.com with ESMTPSA id d20-20020a2e8914000000b00295a96a0f6csm1620622lji.102.2023.05.23.08.35.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 May 2023 08:35:32 -0700 (PDT) Content-Language: en-US, it-IT X-Original-Sender: massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=S0ljrayY; spf=pass (google.com: domain of massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::22d as permitted sender) smtp.mailfrom=massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:32688 Archived-At: This is a multi-part message in MIME format. --------------GqpDh0fsZ5HnEZPW3dKkqe0w Content-Type: text/plain; charset="UTF-8"; format=flowed Hello, I just published a Lua filter for Pandoc that lets you organize a document in multiple files in a tree-like fashion, and assemble them later. You can find it at https://github.com/massifrg/pandoc-include-doc. The filter supports the inclusion of sub-documents through Div elements, whose contents are replaced by the contents (the blocks) of an external file imported through pandoc.read(). Those Div elements have a "include-doc" class and must specify the source and the format in the "include-src" and "include-format" attributes. Sub documents inclusion is recursive and the filter detects possible circular references in the inclusions' chains. You could already assemble a list of input files in Pandoc (i.e. see --file-scope in the docs), this filter lets you organize your documents in a tree-like structure. Motivation: I wrote this filter because I'm writing a visual editor for pandoc types (= documents coded in the internal Pandoc format) based on Tiptap/Prosemirror. Since the editor is browser-based, the size of the documents it can handle is much less than the size of the files converted by Pandoc, so it makes sense slicing them into smaller units (i.e. chapter, sections, etc.) MF -- 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/4f707c3a-0048-8fbc-a2fe-f33a70204590%40gmail.com. --------------GqpDh0fsZ5HnEZPW3dKkqe0w Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello,

I just published a Lua filter for Pandoc that lets you organize a document in multiple files in a tree-like fashion, and assemble them later.

You can find it at https://github.com/massifrg/pandoc-include-doc.

The filter supports the inclusion of sub-documents through Div elements, whose contents are replaced by the contents (the blocks) of an external file imported through pandoc.read().

Those Div elements have a "include-doc" class and must specify the source and the format in the "include-src" and "include-format" attributes.

Sub documents inclusion is recursive and the filter detects possible circular references in the inclusions' chains.

You could already assemble a list of input files in Pandoc (i.e. see --file-scope in the docs), this filter lets you organize your documents in a tree-like structure.


Motivation: I wrote this filter because I'm writing a visual editor for pandoc types (=3D documents coded in the internal Pandoc format) based on Tiptap/Prosemirror.

Since the editor is browser-based, the size of the documents it can handle is much less than the size of the files converted by Pandoc, so it makes sense slicing them into smaller units (i.e. chapter, sections, etc.)

MF

--
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/p= andoc-discuss/4f707c3a-0048-8fbc-a2fe-f33a70204590%40gmail.com.
--------------GqpDh0fsZ5HnEZPW3dKkqe0w--