From: Joost <joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Interpolate a value defined in metadata without a template
Date: Wed, 09 Feb 2022 10:19:50 +0100 [thread overview]
Message-ID: <525b4bf5-4db1-4040-baaf-b4fea3be6a01@www.fastmail.com> (raw)
In-Reply-To: <CAEe_xxjkA5yFoxtq7aFfxfxw_88HO1aL46URc1qyr3fdzddudg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, 9 Feb 2022, at 10:13, William Lupton wrote:
> I think this requires a filter. There's a very simple example at
> https://pandoc.org/lua-filters.html#macro-substitution (that
> illustrates how to expand '{{foo}}') and I have written my own that
> uses '%foo%' syntax. I could share an outline of my filter if you like.
> W.
FWIW this example filter may be even better:
https://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-value
Since it seems to discuss the OP's exact use case: fill in place holders with information from the metadata.
--
Joost Kremers
Life has its moments
next prev parent reply other threads:[~2022-02-09 9:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AQHYHVgud3W2GHIs10iUFNi6wRG666yK3yAAgAABzACAAAR1gIAAVtcAgAARTiA=>
2022-02-09 1:55 ` Shiwei Weng
[not found] ` <986f8e0f-9bf8-44ba-aae9-678315f1da94n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-09 9:13 ` William Lupton
[not found] ` <CAEe_xxjkA5yFoxtq7aFfxfxw_88HO1aL46URc1qyr3fdzddudg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-09 9:19 ` Joost [this message]
[not found] ` <525b4bf5-4db1-4040-baaf-b4fea3be6a01-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2022-02-09 9:35 ` William Lupton
[not found] ` <CAEe_xxgk1UD44XHm6CRzHbWuPEcgWdEd+q65XqsLf3AxMJY0Pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-09 14:46 ` Shiwei Weng
[not found] ` <c8c01eae-a15d-45fd-bf60-ccfe266994f2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-09 14:49 ` AW: " denis.maier-NSENcxR/0n0
[not found] ` <6616f42d3fcc49ba8b0f50b037603bd3-NSENcxR/0n0@public.gmane.org>
2022-02-09 15:06 ` Shiwei Weng
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=525b4bf5-4db1-4040-baaf-b4fea3be6a01@www.fastmail.com \
--to=joostkremers-97jfqw80gc6171pxa8y+qa@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).