public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Open Discussion: Features of Templating
Date: Tue, 9 May 2023 13:51:21 -0700	[thread overview]
Message-ID: <2FDEDBD6-5C9B-4FD9-B1F9-D736635D6E07@gmail.com> (raw)
In-Reply-To: <875y91s2ni.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>

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 <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> wrote:
> 
> 
> Stephan Meijer <me-nPKYAObcRdo6Blr+0TYHagC/G2K4zDHf@public.gmane.org> 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.


      parent reply	other threads:[~2023-05-09 20:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 14:08 Stephan Meijer
     [not found] ` <dbe4c60c-1178-406f-b794-ce8c9807c2c1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-09 17:35   ` BPJ
     [not found]     ` <CADAJKhC=5P-rTeCFbuuVE+5YG7b2ND7r+0v7vQGoEzFOyAjsDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-05-09 19:16       ` Stephan Meijer
     [not found]         ` <0297ad79-799e-4ed4-aa5b-943c124f7f55n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-09 19:37           ` Albert Krewinkel
     [not found]             ` <875y91s2ni.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-09 20:51               ` John MacFarlane [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2FDEDBD6-5C9B-4FD9-B1F9-D736635D6E07@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).