From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32573 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Open Discussion: Features of Templating Date: Tue, 09 May 2023 21:37:02 +0200 Message-ID: <875y91s2ni.fsf@zeitkraut.de> References: <0297ad79-799e-4ed4-aa5b-943c124f7f55n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15969"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBFWJ5KRAMGQEOE4V5UQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 09 21:52:59 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f55.google.com ([209.85.218.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pwTOM-0003wE-Bo for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 09 May 2023 21:52:58 +0200 Original-Received: by mail-ej1-f55.google.com with SMTP id a640c23a62f3a-94a341efd9asf775635866b.0 for ; Tue, 09 May 2023 12:52:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683661978; cv=pass; d=google.com; s=arc-20160816; b=tsh0QrxjdigodIn3pbFPZOCw12x82Bl1ze+MCAEcIqqZuKk624IppaDu3NIXaKmClz gqpw3zbMDt2tAEv+23lSM3QSMOiWbfE9nPG85vMDbTffsHPNhAQZLG/sjroYigSiy93p yT2NBNZOY3hQ0EvPUfLYAjLOhkO2zsV4+QxFulTw2g8TSe3tPGDChl/p/N99mIx4RA0M B4c4chbQ4nTl3alVYius1+VYBIwy/9RCxkvaPD7u2u/OA4xQAFsySmxeZ9NlEyOgAJ8v v3JV2nq/JsxP9o7xeGCZosH1gjYjTyj3nm96/nBvb0iyn62ozsCJCEHxxDKzSxMagVPP wOjA== 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:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=N2rbgz1MkMdF0QrmqwWQLeTj1Y+F7jWSXh/qYjih/lY=; b=I7ltcCRxuAXZZBblQnLzI87PH5jLWz1Ll8raBdOATO9zRRh/R5moJTh4mUyohonCkN SVpkNBu4rlcZPey2JL4v9GysW+UCLsdRDhUrbJk3/2FkkwJE/8rVJp8VnEhVYu1HcycS VSU69NxUkdY34n4DeElQNsUMgmNpwwhv4mhvhQf0s4+ZxkiJOasIhoTfql6j43s/DSO/ r7jqw/Ksu+0AyB+dYzIxIOcHFzuW7nIJWR37KUJvpxYfMbrEEWK9IaEIXuCbZYUsyQG+ xi4zfhcpLUgfMSoQfnnfMeFKF8dxkX9btgwrqLqgyRQ2YIOJRjlLmxBTt580nP9EMvpd 5FEw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683661978; x=1686253978; 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:mime-version :message-id:in-reply-to:date:subject:to:from:references:sender:from :to:cc:subject:date:message-id:reply-to; bh=N2rbgz1MkMdF0QrmqwWQLeTj1Y+F7jWSXh/qYjih/lY=; b=Se5DkwGS+cvYyqKLHiwzYqx1q/0PIyw4C4Zcry7GzvTcmrsp4geE+dIg1sX6o7SVNP XIemtwvWtEJKkqCDGiBTjnkG+NxvRz2k2xxl8HZdKpmRHhWLIv5L6XvFRGp9m5t36WYp aYpsVcC6UjGTy+8v0SLLKgrGDSVtkJzkJVK8KdRKYIgqEeLPjC7gbb19p4HXbs7YfzY2 WprHTve/2mKUir/UPhn4u/4SQ0Ggpv3Gz5iuDANBW9Pm+d1EhpCtqtzybWdn/IrjBRKj n9/S4g74FjWxeGxH7cQs8PyYGUlllyqYLnvyGgYlf0ZsvW2im+YPfcXJfJmIWdRXM5s6 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683661978; x=1686253978; 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:mime-version :message-id:in-reply-to:date:subject:to:from:references:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=N2rbgz1MkMdF0QrmqwWQLeTj1Y+F7jWSXh/qYjih/lY=; b=NiAGiaz+dBHrRxAGsJVmYlp1hIlzQxEUAEZ3P2nmIglsNtYqZnwKHpC7B/9dwuL45R 52BN+5KXJb2NAD5JjTE2jM0Q7TEFTV/RVzGGVXaojtmvE+rokEayDMACeNB6MSBMkf7B E4Z32gAazP6K0XLZscltywm9m28L7SJEI9Phf+5Q2ZIEagECKkaEKQ7ggKQM+FPKrQRH 712mWZZZX4QEwlmkA5AOOXeAjzx8ofAa6t2m0BPd+vFuBXonVIhMyCOARtBg5Wl4Bhcw tBorL6 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDxAfDvV6N1mrXADYWjFh9WTHq5vRI/LfTYuyG5K23M7qlhX1sKj fK4V8z/K1/fMkNsyybj9KWY= X-Google-Smtp-Source: ACHHUZ4SP+w2z395MSounSzyMtlE/QmOWeKiEojyfCNypBlmgz0cZdBjlSVXCuzMBccvxDIgCjdwdg== X-Received: by 2002:a17:906:846a:b0:94d:cf8c:1542 with SMTP id hx10-20020a170906846a00b0094dcf8c1542mr5849645ejc.2.1683661978061; Tue, 09 May 2023 12:52:58 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:1b0c:b0:50d:8979:572a with SMTP id by12-20020a0564021b0c00b0050d8979572als893404edb.1.-pod-prod-07-eu; Tue, 09 May 2023 12:52:53 -0700 (PDT) X-Received: by 2002:a17:907:9608:b0:969:e95e:e4f3 with SMTP id gb8-20020a170907960800b00969e95ee4f3mr3703649ejc.55.1683661973195; Tue, 09 May 2023 12:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683661973; cv=none; d=google.com; s=arc-20160816; b=lDl2qRajnwyiIIUfDSyM9fD+S7waZJlMwxDUokdJYG7x/yku5MC7dg8NTZAdWQeMPw hLWeBRrJqOsUif8r+Q3/XvGZWYvMTJb3o6ICAnr/06UWsvGsTNApgvGsEiDaLeuwpoeb K2w84FE0GfIIEqFHzUN4h4NDcYC4FutT/YrMSFn4sStdBwrBaUJH5qaCII7EI1u51/mo v80dZIXHqNFHuUISdwwy7I8O+hLGa/YgcINccSLs8oc592tQi90b9K9rUcR8bQXzhc9X IAVsLqz9XeLcFtxmpXoUpwXGfFppsDee+2hRSmVbasCKK7mfgejqCoIITNbKNrlNlwP5 aSfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=5w+WythCoK8wjc9yMqCTHORdgWNHf0pft60UDIK35as=; b=u52lgybK6cKzqFI/XBm8BQaY24nDDSozhVfSkAngZSoixDr1Gz7uQzJGqqHVrxGbPF rz7RCS/p7CgxRsLHX8u1FZ1LezInxe/WQq/ZZHJ2/5OXkca8+fzKqEzdGRseQjxzh/Ys ZJhs8un+5l6/6QUykbsT8hsliT17XHzLcZqXiRoLqGkF8XmxtARytFal08UA5YDSqXvS cfBN1LrTk3dfE0caNGm0pSy9hUUqC+3/UZ4IAaKGn4Vh4UJKs6BXcYNSQxymo3ERdY9x ZzELUqDnog/VYrWW9Y6pdVCXeXZKiUxAKfAbYtcxHTcstF86U/KAXGGIKjbZ9zyLJ/25 KqcA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [80.241.56.171]) by gmr-mx.google.com with ESMTPS id sb32-20020a1709076da000b009531f349d24si337256ejc.0.2023.05.09.12.52.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 12:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) client-ip=80.241.56.171; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QG82p6GDlz9svV for ; Tue, 9 May 2023 21:52:50 +0200 (CEST) In-reply-to: <0297ad79-799e-4ed4-aa5b-943c124f7f55n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Queue-Id: 4QG82p6GDlz9svV X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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:32573 Archived-At: 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