From: EBkysko <ebkysko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Thoughts trying to write a Lua filter
Date: Tue, 17 Sep 2019 09:08:44 -0700 (PDT) [thread overview]
Message-ID: <222ed82f-906e-441c-942c-7fa4a39be736@googlegroups.com> (raw)
In-Reply-To: <9da35dc5-3eec-446b-8464-889ec1eb26f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1290 bytes --]
I know this is borderline necroposting, but I was just faced with this
problem, dpi doesn't seem accessible in lua filters (not in
`PANDOC_READER_OPTIONS` anyway, which are reader options). So in case
anyone wants a hint, here goes...
Since I usually invoke pandoc from a script (a windows batch in my case), I
just create (set) the dpi to a variable (say 'dpi'), and then pass it to
both `--dpi` and `-M` on the pandoc command line.
So in a win batch that would be, for example:
```
...
set dpi=300
...
pandoc %1 %otheroptions% -M dpi=%dpi% --dpi=%dpi% -o %output%
```
Then in the lua file, the first filter in the return list would be a
`Meta(meta)` filter that would retrieve the dpi through meta["dpi"] and put
in a lua variable to be used.
Yes, it's redundant, but I don't see how else (apart from setting an
environment variable, but it's the same principle).
--
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/222ed82f-906e-441c-942c-7fa4a39be736%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1824 bytes --]
prev parent reply other threads:[~2019-09-17 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 17:42 Samuele Pilleri
[not found] ` <6e09bd71-ee77-4de7-a002-953a62325234-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-08-19 18:40 ` John MacFarlane
[not found] ` <m2wosm5heu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-08-20 19:47 ` Samuele Pilleri
[not found] ` <9da35dc5-3eec-446b-8464-889ec1eb26f4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-17 16:08 ` EBkysko [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=222ed82f-906e-441c-942c-7fa4a39be736@googlegroups.com \
--to=ebkysko-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).