From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32524 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Use Writer in Lua Filter? Date: Thu, 04 May 2023 22:59:59 +0200 Message-ID: <878re3bb7a.fsf@zeitkraut.de> References: <9dc956cf-74a3-4e25-b4bd-62aae6dcc3f4n@googlegroups.com> <87jzxobp5d.fsf@zeitkraut.de> <87fs8cbnne.fsf@zeitkraut.de> <4c078a54-2252-4253-b2a5-6348ecc1f916n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18241"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBDVH2KRAMGQE35MSE6A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 05 07:26:42 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ed1-f56.google.com ([209.85.208.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1punxq-0004cd-Ej for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 05 May 2023 07:26:42 +0200 Original-Received: by mail-ed1-f56.google.com with SMTP id 4fb4d7f45d1cf-50c9582877csf1473516a12.1 for ; Thu, 04 May 2023 22:26:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683264402; cv=pass; d=google.com; s=arc-20160816; b=cadaGanlz85S/lcpeOesSsNsXZkrvQLfNPMiP9FyY/DmJALZzdqEAM6PrC/XwzcWIf xTyO03M82PL2pRtKmT70GHuN7yRggAX/2z8I18tiWo/BzhKMz2Q5BWcm+Qy7mR1xc5xT rIORYzuPTEJLFdAPYDmS1mdtbzAJhYYoGRf5glvrLxeOFhO+ppkKpwEiaUPdT7UhEvfX wZRrWFTzwREIVk0AYiyDSUlVxAXaxW/sJ8WkEh7Q2lgO27DZ4HsObTZ0bAuJF2ba0Ok2 gUtUevsRRLWG9PbIlFUxnX5vsrlqro78MSsYWd3pOAj+AHwf2lleg6AqS8YGvaHCjR7j KLpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=W+99hyCyy5Gjv9CaNB+dpFJDtW3yg8tlzDfOpgiPzqg=; b=oyC/V/7LO1YbDLXDPxW200RaTCv/gqHKfC1YTx4qFzBp3Kf1MHCI7Y0j5GJGsFTL/L Lkh7C4E5mc9y+Junc2bIpu6uhYtGVZhb7oxFXYjfYg2624czywgArKB6u59CNUq2rrz7 /vDjY6kv4Z2qMR5oacEtF7f7zAN5R6LxS5cw8Bnwmqpey8A0dGUVIQTCF+lodeDyrX5E CzFiO7mKLhmVQfKvgFooiUQfvyUtL/DSxCNfElUWf0yepJwEflKgYq1DRAOs7N/cXsGN 2swC5thXz7aI1nexH8EXLUFnKBPiWwABQfx9cpkuIQitlLOQMuW4wg5uotxQ8ghRDeB6 cchQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683264402; x=1685856402; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:in-reply-to:date:subject:to:from:references:sender:from :to:cc:subject:date:message-id:reply-to; bh=W+99hyCyy5Gjv9CaNB+dpFJDtW3yg8tlzDfOpgiPzqg=; b=c0WZ6Rx9kUM6TV4BoXMNqz2M0uiQhHj/R2P1nZzAp79ijM1cs96NS5ybjZcFlMtrSO nKDcb9jg2SI/qZi7T83n99wqo0b6g0LGK4DRuZebN79EX+Qg0GGxEqPvLiBcPS59wAxd R4Hx5OZRwXxVPzJdFLDqJ+q9ek8EOXsnKFfQg/8hf0uM62RkznL/Ql42fPjnm6JdK2sd lV/5uOfBpeU/XiFWSuEFCWF+K/91VPDgTd3dfrRNpKlZfaWDJLjH2eMDzZxKsiy2LAVG ma1Nep/DUo88CxNXnKhYw0XMk0s0xGp7aofi880Hw4Nr0F/sLHQme/6tDgoaAe6VVbid X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683264402; x=1685856402; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:in-reply-to:date:subject:to:from:references:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=W+99hyCyy5Gjv9CaNB+dpFJDtW3yg8tlzDfOpgiPzqg=; b=WKRgnFqIccELq/kwggAirGrYBaCGz8A5My48d8YdrBSsLgTS1bw94xTAXBEjsfVGwn cXaKAtL4dKK3TjYAvW9DqG39cmI4a0F05v9Rwv/Sqx4mzDWbT9wzROUnT/FA+ZkC9K0K hKP6RUsIWY6CzeIJHywNd0YL6TAWeSHGkItTqfqqhwl4Ipbaro/knVa/dMy4e2WZKeHf SsYtd2vqXKcIMTfHxWs6Ie03mLYGqMzFz6a2GvHgi55UhGxUyH3zdHmgst/OilAY/Ym4 G7r5we Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDybwRaDhjjKqzCZkkyqoZojSrmJMB8oC+HpVT9AS1qSabfI6M3L Xb01yV9qK8dm/1ohGbO9y8Q= X-Google-Smtp-Source: ACHHUZ4BNxip+iHWsToEKD+PCDIh80nXuvnXaOdIZycAhyJ4mDnYcl1rnkv+1j2ncTX5TP8UQe1TWg== X-Received: by 2002:a05:6402:5107:b0:50b:f58b:322d with SMTP id m7-20020a056402510700b0050bf58b322dmr668888edd.4.1683264401881; Thu, 04 May 2023 22:26:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:337:b0:50b:c6d7:3963 with SMTP id q23-20020a056402033700b0050bc6d73963ls450579edw.0.-pod-prod-06-eu; Thu, 04 May 2023 22:26:36 -0700 (PDT) X-Received: by 2002:aa7:d954:0:b0:504:921b:825 with SMTP id l20-20020aa7d954000000b00504921b0825mr248699eds.36.1683264396878; Thu, 04 May 2023 22:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683264396; cv=none; d=google.com; s=arc-20160816; b=nkDre49kzuHdnv6C3UghwlTtrJzWFiBE00Si5pypViC68MRyjx2MvNRCLObPLPVC0q OCtXj4g0MeETDY55sEVskjofuZMBo5nPhaP9zg4+m4UM+7v7+dk1x4Dg4nr1LYwN0Kbh UaOAI15xSjhP/g3jKvMdVNDTDQieyvV3HdOyhE6bAD6/pF5SeV0Lc12C1QVBkjv2zIJP 0lbyixmApKPIEg1xw9gEhEoBxbZecExDAFU3WZ0mm1fZldd++Mfpe3ibyVUZcIRy4Qx3 pHWKIWuBJu6ucREte6G+R2c1MYTcIjJeRlKTwZjwytS3uPGnww2PVd07Iy/OhK0ITpoU Dgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=psjf5UPEs9uRw5LoCC0gLhfuIpZa3I/AnuH1+FMXzg8=; b=02v3zv0wnTnByOFhsHJALBkFDhb4O83Sp9PDlLwrWTSF0HaV42tBLji370fD7QrUyr 1DZFQluMDLFYumUJ5oVpjze282DK+bB7Map4r1tCXiYNFFk0t//+jujkAQE7rhSP1es1 lFXNN8bANA6HocsIszqB0SdL6Ww20rCS3jxiEpwlwiZ6gp4JxmYXk3vDluH7gi+gNG5Q AW6S9ldUv0LFdCGk6S8E151ID1s8hOzNEXfQiMCSnWMj17pGS8dIImzVn1ERBvT1D2hJ 9+T2+AUuAJhUqv7e/REDMU4hstUoZG6EnYK8vFo2N7F1IhQHXXGVQhCYV0SWbgk8z2Kd sXCg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [80.241.56.171]) by gmr-mx.google.com with ESMTPS id d12-20020a056402400c00b00506bc68cafasi354971eda.4.2023.05.04.22.26.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 22:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) client-ip=80.241.56.171; Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QCK1653fJz9sWs for ; Fri, 5 May 2023 07:26:34 +0200 (CEST) In-reply-to: <4c078a54-2252-4253-b2a5-6348ecc1f916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32524 Archived-At: ThomasH 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 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