From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30987 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Abhishek Ulayil Newsgroups: gmane.text.pandoc Subject: Lua filter to modify captions in tables Date: Sat, 16 Jul 2022 05:21:38 -0700 (PDT) Message-ID: <0abadbc7-8cc9-4d67-92e2-fbd636f6cf3fn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2240_920966234.1657974098908" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40712"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQIR5HZ7MFBBVG2ZKLAMGQEIABBA6Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jul 16 14:21:43 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f191.google.com ([209.85.219.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oCgnn-000AOK-G7 for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 16 Jul 2022 14:21:43 +0200 Original-Received: by mail-yb1-f191.google.com with SMTP id n192-20020a2540c9000000b0066fca45513esf5456323yba.0 for ; Sat, 16 Jul 2022 05:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=MyBGM683FRWsoAjwlfBDZXKaA/2ZytkXFJIqumyGfHo=; b=kNFhrY9soIF9lVtfh3AXCI8dNPhID7WnondUOfNrgeHCmz3wbGsumMUr66e0kDdW/R UtDDYUJA8VhTyoGaRAVRWyELhE+DdsehznqWtrcGMYQp3IdDsjXtMGf61PtSe0ECfl0l 06Edd7urIgm6iC025ta+9JQviXUo8oexPtQlz2chGj5Wur80RNTMDXByB1otHoZ8bnoy TJTyRtDhJNst95xF1fgSDbUdHdvsk8nuOgN0xeqkcwKsedYb3OpH9vWB9nNwTTd6aGQT aTI8FtTZVBKToLnE8X3seNazAGYMUYe26rdpzOpsPx4/jp2ITEMlJVlRK3yKMcUxk/37 6h1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=MyBGM683FRWsoAjwlfBDZXKaA/2ZytkXFJIqumyGfHo=; b=pXDTPiZjItj4SylMulnmNjPJjXVBleB7qdgMBQ06t8QSw9W3c5/EA4j+lEd1eqlwic ES+nsxpxFqf8aIXn5ICgqp47vg2Zvd+OD/JU2ubYRYKoehUPgx2Ke0o00Q65PmjK9DF9 ofGLXZch/uXbTQ1C03PTOEA8uea+g7hqJYtSiQDerKE5PtwDNCx6idmMHbNBXxwuBrC4 F8D+FleSjMXeMb0r9jF5okeNJtqc0/phvAIDda0LMu++J4ZVQXNQb1HtwGBse5Y2kjj9 Gpv4cUImMNIgjFppU7Hz91CAcqcb0SX8gjs4ZavU2v6eoAHgMtpFn/vT2N+ZHPIVd163 ZWvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MyBGM683FRWsoAjwlfBDZXKaA/2ZytkXFJIqumyGfHo=; b=sz+uu8zrk8HH65LQiiIkklEkywbV09qK2lW+wBPQrSzB6FoApDY4/GpopuEWH0VtLH +ZVFobHoIe/YPlAFo5UcwsIeDtQqHO+QL09pqXyEkhjvQ6n6MpV68uCP46nOvjJo35q5 fR3jJXh8bXaquKkIktG16Kc/Jg8CRhmoPQ70+BJ85todd32MetWcPoIF9N6nqkKkMLHY w89FpAdpIo2XvMnG1kIn1KVHDi+hgeyHVO9PshXeirvrVuVS4y/1us4y5rycuer1pHTt jIeqn5dFmt3x3EMnSBseWa5daG6L9lZZu5DGDZWRsAkbbNdCmNw5IFLZPwYRwHG35P48 nPQw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora/bw9AK1FI1MtG9AjpyITXLbPOq1DgbsjpCTk73hVwq60Aqa0HZ AP+YldbHBw9XImusSkVZNBA= X-Google-Smtp-Source: AGRyM1vdlwGQCcW9rT6VIpiYneMzlXlp0bm5Ire+Fbe+z0QflyDwdIYYCgat7qjl1kk4g6QcJ4Wwlw== X-Received: by 2002:a25:33c4:0:b0:668:cc8d:bc43 with SMTP id z187-20020a2533c4000000b00668cc8dbc43mr18066478ybz.467.1657974102530; Sat, 16 Jul 2022 05:21:42 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:e64a:0:b0:66e:bd0b:da58 with SMTP id d71-20020a25e64a000000b0066ebd0bda58ls14581817ybh.5.gmail; Sat, 16 Jul 2022 05:21:39 -0700 (PDT) X-Received: by 2002:a05:6902:10c2:b0:66e:fbc5:84b7 with SMTP id w2-20020a05690210c200b0066efbc584b7mr19045982ybu.401.1657974099602; Sat, 16 Jul 2022 05:21:39 -0700 (PDT) X-Original-Sender: Abhiman2000-Re5JQEeQqe8AvxtiuMwx3w@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:30987 Archived-At: ------=_Part_2240_920966234.1657974098908 Content-Type: multipart/alternative; boundary="----=_Part_2241_1298037675.1657974098908" ------=_Part_2241_1298037675.1657974098908 Content-Type: text/plain; charset="UTF-8" Hi everyone, I was working on a lua filter to change the Table caption to add numbering ``` tables = 0 function Table(el) tables = tables + 1 local caption = "Table " .. tostring(tables) .. ": " .. pandoc.utils.stringify(el.caption) print(caption) el.caption = caption --facing problem here return el end ``` I am facing a problem to set the caption back to the element, what will be the correct way to set the caption. Thanks in advance, -- 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/0abadbc7-8cc9-4d67-92e2-fbd636f6cf3fn%40googlegroups.com. ------=_Part_2241_1298037675.1657974098908 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi everyone,
 I was working on a lua filter to change the Table ca= ption to add numbering 
```
tables =3D 0
function Table(el)
&nbs= p;   tables =3D tables + 1
    local caption =3D "Table "= .. tostring(tables) .. ": " .. pandoc.utils.stringify(el.caption)
 = ;   print(caption)
  &nb= sp; el.caption =3D caption --facing problem here
    return el=
end
```
<= font color=3D"#000000">I am facing a problem to set the caption back to the= element,
 what will be the c= orrect way to set the caption.
Thanks in advance,
<= div>

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/0abadbc7-8cc9-4d67-92e2-fbd636f6cf3fn%40googlegroups.= com.
------=_Part_2241_1298037675.1657974098908-- ------=_Part_2240_920966234.1657974098908--