From: ThomasH <therch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Use Writer in Lua Filter?
Date: Thu, 4 May 2023 09:06:47 -0700 (PDT) [thread overview]
Message-ID: <4c078a54-2252-4253-b2a5-6348ecc1f916n@googlegroups.com> (raw)
In-Reply-To: <87fs8cbnne.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1519 bytes --]
Great, that worked, thanks.
I just wished that would have been more apparent from the docs. I guessed
something like 'tostring' might exist, and tried 'element:toString()' and
similar without success. There are three mentionings of 'tostring' on the
doc page for Lua filters, two in the section entitled "Global variables"
where you would only spot them by chance. And one is in the section about
the LogMessage type <https://pandoc.org/lua-filters.html#type-logmessage>
where I figured LogMessage objects had a 'tostring' method, but didn't know
how to use the LogMessage type in the first place.
Cheers,
T.
On Thursday, May 4, 2023 at 8:45:34 AM UTC+2 Albert Krewinkel wrote:
>
> Albert Krewinkel <albert...-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:
>
> > The alternative is to use `pandoc.write`, e.g.:
> >
> > print(pandoc.write(pandoc.Pandoc {element}))
>
> The above is missing the second parameter:
>
> print(pandoc.write(pandoc.Pandoc {element}, 'native'))
>
>
> --
> 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/4c078a54-2252-4253-b2a5-6348ecc1f916n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2174 bytes --]
next prev parent reply other threads:[~2023-05-04 16:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 6:00 ThomasH
[not found] ` <9dc956cf-74a3-4e25-b4bd-62aae6dcc3f4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-04 6:07 ` Albert Krewinkel
[not found] ` <87jzxobp5d.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-04 6:44 ` Albert Krewinkel
[not found] ` <87fs8cbnne.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-04 16:06 ` ThomasH [this message]
[not found] ` <4c078a54-2252-4253-b2a5-6348ecc1f916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-04 20:59 ` Albert Krewinkel
[not found] ` <878re3bb7a.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-05-05 8:03 ` ThomasH
[not found] ` <79a8dca6-9860-4109-b2e8-5841faa36cc0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-05-06 8:35 ` BPJ
[not found] ` <CADAJKhCKdyaTdjEVzAzc6+q9vDwGtbjLL_euCEP5G8GEcT9Diw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-05-06 8:53 ` BPJ
2023-05-07 10:41 ` ThomasH
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=4c078a54-2252-4253-b2a5-6348ecc1f916n@googlegroups.com \
--to=therch-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).