public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: ThomasH <therch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Use Writer in Lua Filter?
Date: Fri, 5 May 2023 01:03:24 -0700 (PDT)	[thread overview]
Message-ID: <79a8dca6-9860-4109-b2e8-5841faa36cc0n@googlegroups.com> (raw)
In-Reply-To: <878re3bb7a.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1635 bytes --]

Ah, ok, sorry, I've only come to Lua through Pandoc, so I'm often not aware 
of general Lua features. I will keep an eye open for the 'show' method.

T.

On Friday, May 5, 2023 at 7:26:41 AM UTC+2 Albert Krewinkel wrote:

>
> ThomasH <the...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > I just wished that would have been more apparent from the docs.
>
> The `tostring` function is the default Lua way to convert an object "to
> a string in a human-readable format". Still, I made a mental note to add
> better docs once we switch from a Haskell to a Lua representation as
> `tostring` output.
>
> The Haskell/native output will probably become available via show
> methods, as in `block:show()`. This already works for Block elements,
> but not for Inlines.
>
>
> >> 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/79a8dca6-9860-4109-b2e8-5841faa36cc0n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2416 bytes --]

  parent reply	other threads:[~2023-05-05  8:03 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
     [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 [this message]
     [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=79a8dca6-9860-4109-b2e8-5841faa36cc0n@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).