public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Is there a way to get access to variables or metadata set on the command line inside an invoked lua filter?
@ 2023-02-04 20:57 T. Kurt Bond
       [not found] ` <CAN1EhV-Bg-qiTysHEbbatbHC2DVWXQwN2_iys4KNbJrxFsbZDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: T. Kurt Bond @ 2023-02-04 20:57 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

Is there a way to get access to variables or metadata set on the command
line inside an invoked lua filter?

-- 
T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io

-- 
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/CAN1EhV-Bg-qiTysHEbbatbHC2DVWXQwN2_iys4KNbJrxFsbZDQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 1260 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is there a way to get access to variables or metadata set on the command line inside an invoked lua filter?
       [not found] ` <CAN1EhV-Bg-qiTysHEbbatbHC2DVWXQwN2_iys4KNbJrxFsbZDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2023-02-05 13:34   ` Albert Krewinkel
  0 siblings, 0 replies; 2+ messages in thread
From: Albert Krewinkel @ 2023-02-05 13:34 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


"T. Kurt Bond" <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Is there a way to get access to variables or metadata set on the
> command line inside an invoked lua filter?

Metadata is part of the `Pandoc` document and can be accessed via

    function Meta (meta)
      -- ...
    end

or

    function Pandoc (doc)
      local meta = doc.meta
      -- ...
    end

Variables are part of the writer options, e.g.,

    PANDOC_WRITER_OPTIONS.variables['my-var']

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-05 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-04 20:57 Is there a way to get access to variables or metadata set on the command line inside an invoked lua filter? T. Kurt Bond
     [not found] ` <CAN1EhV-Bg-qiTysHEbbatbHC2DVWXQwN2_iys4KNbJrxFsbZDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-02-05 13:34   ` Albert Krewinkel

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).