From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32574 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Open Discussion: Features of Templating Date: Tue, 9 May 2023 13:51:21 -0700 Message-ID: <2FDEDBD6-5C9B-4FD9-B1F9-D736635D6E07@gmail.com> References: <0297ad79-799e-4ed4-aa5b-943c124f7f55n@googlegroups.com> <875y91s2ni.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30859"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBTPE5KRAMGQEJ4H6IQQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 09 22:51:29 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f60.google.com ([209.85.161.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pwUIy-0007mC-TJ for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 09 May 2023 22:51:28 +0200 Original-Received: by mail-oo1-f60.google.com with SMTP id 006d021491bc7-54f867d4624sf783030eaf.0 for ; Tue, 09 May 2023 13:51:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683665488; cv=pass; d=google.com; s=arc-20160816; b=zGC2/KpvMxVA5A2wyJL5O++FnHfjq9lrhQkCzgyBUw4l5D9Nuzf2K+gH0YJEJMB0V1 T0czbSFNr86WV4nmofwx29NLvR6P0xzf4+bpPzeAbd7TZw2YmCnQiWkvrfTCi66y64/s 1tRkXxxIVf8pEVvxBv+D7TG0Eh+fXsWfSmhNqAQpaAcrAaGnBMhYzRca+LFER43VpEdT vBz3pZOLDCCz/xrrVNAG1fgFsccyA6QESjY/MX2nSKSlQE7ck0HNg3NFH4ifxLCce7kA o0yO+9w5tCQjCTczKD1X+bO8odZ5rOuQkF3NK733BaM6F7+R5SxbMMZNRlOcqiJh3KZ2 wPDg== 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:message-id:in-reply-to:to :references:date:subject:mime-version:from:sender:dkim-signature :dkim-signature; bh=ZypHO33xMFB9v3JIpBvyXeOcO/kHrhfEaMyprmg6Alc=; b=xXs4lFS6jlBP8IRhl8NGVFvwb44o5MsZV4CGOdAkRVXfcjzq4936GDSSVnN58nYdRZ yW4pR6UHbfMDxpDUFNYvDeiSL/Ceu9Q8lKxGScs8akTG5FyjSfATXnuohhhUJZEB17rb itqZwt6lF1kNkF//OqEWrwsXklzioq8Xb6C3VKXRhbtQvanvNl7fi91JiQTFDu6/BT4M 32yHmHUDr35Gw7IN6fJHrfJgU3OcEPSUQIcIn15/G1e4hER4mcyyCEUmyA1ajNrBhIVe wch/S9PQjvpMlecOr3JKued6JObWhQcX93xaLWoneQ1lnbtKt6zIYcM0OzTogTWL5Pg+ nCjw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SPGT0cgy; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62d as permitted sender) smtp.mailfrom=fiddlosopher-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=1683665487; x=1686257487; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=ZypHO33xMFB9v3JIpBvyXeOcO/kHrhfEaMyprmg6Alc=; b=NsfGog2nwzRV6Rb+STuCRhEXkmv29W1KXxS/58qxmJVmqRyS3QSKn8NtiuT3Q/uTvK kTY7YFSQznd2Bwa6tRhJTE5rIzJG6loyzRPMRWDB6q4s6Eq1BB2Ic9OFpK0d0HYJGn8W 3S0wgvwknpiHq6TAwsBPHb7PmRIq+w0OXRVyoUV099s+VSfV8/wWSU9jsTTtpGWX29Z0 PsiHTYcdp+GBkFp9pQwkj9qSAUQpfoLlZUj7cKVtJBvxlO2m4GEtbUOEpX2jQVGVkwtg Ns+ZYo/Sb3OZEQ6PezDIU7mHXZhIxfR2szDYYz/dSS0SGJocJJjvqqgP+5dCjzqzYsSM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683665487; x=1686257487; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from:from:to:cc :subject:date:message-id:reply-to; bh=ZypHO33xMFB9v3JIpBvyXeOcO/kHrhfEaMyprmg6Alc=; b=KAlX/HcuKqOTEaRTIW5rSQ+CF8ERjZC34JnMkshrwfbpfmBMJJXzxh5e0uLAizZSmn 0pZz31ZuHV4ZpQfvGSrOxjFsXgbct7GJ9kqArWJ/K4dWLmrGE9GJfewVEp/7vz6UEgV+ aO/bBgQRSIveXL6rJVG4eLqsp1zhZ99LIs5JoIF1ZrrY8QvRa+9EzrxgU5f5gCQiUBvq i1Rl/J2FEXVUWeTVXmFa7ILbWaJjLcbQ39Qqdbj/FVPo8+fOjbC3s1rRg0UT03JD4lZM Kr2DS6sbpYz2/+Szeiv8qtUqQk10cI2AueU6SU5IWLOriozU66tGKSj1nFse6H7BcA4h U5Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683665487; x=1686257487; 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:message-id :in-reply-to:to:references:date:subject:mime-version:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=ZypHO33xMFB9v3JIpBvyXeOcO/kHrhfEaMyprmg6Alc=; b=W3gMhviY13wU4KrLVHbqD7tbocYq6j8dUbnXq+BfrC9LAtKrB+56PNLwzhC8fr7Hed PlrnmTtISnOAa/WPtEOvOhIcaQdbJ92QbNeEVfMVQjMe8E8ZdsdOBGFQs3qLXXwPqg/B LtPR4nU0bxi88ZaHYKtQZCqrwTW6kliAJbkeVgkcRC4oLmwW9IusIRWwF/lXZEpjARrP noeauJncJSVFkRO6xqi+1H7f1K729lS0xVNjPG5vJGG8MEFxfFAiEdlPeVfJUIcpEe/6 pDELla Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDxQxG3k3A5xfKtANuK70u1S5hwmdb8TUL9hjilUwtW3sa5u10Io Yy0J/ItYxyBmG+Eehgng0tc= X-Google-Smtp-Source: ACHHUZ4HVFwbykN2+QE2H84vOf4pnIMmjj6tuSPw2fh1KpUwjma8Qf640C0OEQwufa7DR0udPSVo8Q== X-Received: by 2002:a4a:b1c6:0:b0:54f:aec6:ec9a with SMTP id j6-20020a4ab1c6000000b0054faec6ec9amr1306107ooo.1.1683665487828; Tue, 09 May 2023 13:51:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:822b:b0:18b:13f7:81c with SMTP id n43-20020a056870822b00b0018b13f7081cls408382oae.1.-pod-prod-04-us; Tue, 09 May 2023 13:51:25 -0700 (PDT) X-Received: by 2002:a9d:7406:0:b0:6aa:f539:5ad5 with SMTP id n6-20020a9d7406000000b006aaf5395ad5mr1847642otk.23.1683665485204; Tue, 09 May 2023 13:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683665485; cv=none; d=google.com; s=arc-20160816; b=IYownQiAhM+otyy7WkLQU4msxSPDSug6HOQIjiZ9nAHLctU8ALL5dKqjmF8X2lADQy IhlUsZgNSfqbrcLYvdswQDqKB2tVdc7TbddsSdo8nTNlZdFVmtMXF1/MCRL2F2eSKoWJ GaHry/KZWkq/vyjdoXgMt8Y481q3zBYLu3zHoEGiI5rqGr0coYJcivh59Lx7pmRIu+xo KZSuY2k2DJlPv1mnylPpoWa8TUqjZmB/PUxKApImtWrHmD1bhhocfQhj+eTKl20Jpm7f d5C63xB9TH6hIwq+dYLXf/KnJ/dbvGhS3ujb0kShlmGpg35DwOoNpZlEu84iIsOt+Cmb dhSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=ULWUD07K1LMM5ad/oVmgaeHBZhATXq4pjtXz296UopE=; b=C/xoBR1Bg2/pMZSVhNPoQ60W7lWbgUkgbENdMrRA0ylMkytkyWY9rytLVnHJ+J2BdN 2e4VxIUEcWVceFxsmM4X427eVGlUQKbjtWQevjULiIY9DuFgTMFnEObA2w+TqIPheB+M RgYsPt3j9aQunveH15fjxZ1wxAp5HxXUCiusgoXC9Qst9cJY4Gy//UaqDK76Fi96COH9 Zg4TUJz/KFGdMn9UWovGcD2x3Qt+yKYqTFeKpSbSMsaAVgqL8VVV9lQyeJ5Jsq75mnal N9u1f0iKZCikzH+pngD0TBqomNToiugjBNyrZ2WdAhwBWcz03USLiBvA3VVrUuk1yW1c fpQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SPGT0cgy; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62d as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com. [2607:f8b0:4864:20::62d]) by gmr-mx.google.com with ESMTPS id cp23-20020a056830661700b006a42f0f76f4si634416otb.2.2023.05.09.13.51.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 May 2023 13:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62d as permitted sender) client-ip=2607:f8b0:4864:20::62d; Original-Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1aaf21bb427so46160655ad.1 for ; Tue, 09 May 2023 13:51:25 -0700 (PDT) X-Received: by 2002:a17:902:d4c6:b0:1ac:8ad0:1707 with SMTP id o6-20020a170902d4c600b001ac8ad01707mr7589790plg.1.1683665484098; Tue, 09 May 2023 13:51:24 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:7011:95e1:f552:96a9]) by smtp.gmail.com with ESMTPSA id o11-20020a170902d4cb00b001a076025715sm2061592plg.117.2023.05.09.13.51.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2023 13:51:22 -0700 (PDT) In-Reply-To: <875y91s2ni.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SPGT0cgy; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::62d as permitted sender) smtp.mailfrom=fiddlosopher-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:32574 Archived-At: I'll note that the pandoc template engine can do things no external one will be able to do, because it interacts with doclayout. So, you can get very natural wrapping and indenting that takes into account the template context. Maybe not a big deal for everyone. > On May 9, 2023, at 12:37 PM, Albert Krewinkel wrote: > > > Stephan Meijer writes: > >> Maybe at this stage it'd even be easier to be able to decouple the >> templating engine from Pandoc, so people can use their own templating >> engine. > > It's almost possible to do that already, custom writers get us something > like 80 % of the way there: any Lua template engine with a compatible > interface could be used in theory. The limitations are: > > - The pandoc.template.meta_to_context function is difficult to use with > built-in writers. > > - The custom writers cannot access the template variables that are > auto-generated by a built-in writer. > > Both limitations could be fixed by exporting more of the writer > internals from the respective Haskell modules, and then in turn to > expose those to Lua. Not difficult, but a good bit of typing, API > changes, and the need to break-down abstractions (making writers less > opaque). Could be nice to have, but I'm not sure if the result would > justify the effort and downsides. > > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > > -- > 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/875y91s2ni.fsf%40zeitkraut.de.