From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113062 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Reviczky via ntg-context Newsgroups: gmane.comp.tex.context Subject: combination with lua Date: Mon, 11 Oct 2021 12:38:14 +0100 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6355293834684229997==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39855"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Reviczky To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Oct 11 13:38:46 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZtdm-000AEh-OS for gctc-ntg-context-518@m.gmane-mx.org; Mon, 11 Oct 2021 13:38:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 22F302889DA; Mon, 11 Oct 2021 13:38:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pftbdLJtVyA0; Mon, 11 Oct 2021 13:38:27 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D89022889AB; Mon, 11 Oct 2021 13:38:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C2399287A5C for ; Mon, 11 Oct 2021 13:38:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I3Sl8Ff42kVb for ; Mon, 11 Oct 2021 13:38:26 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.51; helo=mail-ed1-f51.google.com; envelope-from=reviczky@gmail.com; receiver= Original-Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id E2C3F287A58 for ; Mon, 11 Oct 2021 13:38:25 +0200 (CEST) Original-Received: by mail-ed1-f51.google.com with SMTP id p13so67224934edw.0 for ; Mon, 11 Oct 2021 04:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=tlZYoK+8LSJ13OdXi7LH55t26bBVPIvfm8Y4qnh8A2s=; b=lCRhXR7dfneyQEZ6fduHPuxZJsjPFovfSysTYnKPKTr9DACOzhTKUpbPc2HI892ivd bEVwR48fEnJ3y+5DIE2NMBKFksimM92lOLGxld2YO7GWJnzwv0bR6vmiseSLjnv23gam CkBi0P7h5a8y+VcZUjyccZsz2ajQ4ay66I0uhrZqhuuJXb8nDChiW5IkMGTDcL5FlMbn pOlFQj4jMtJIPrNoPJnN/4yTrLnkor0v5DrUk7QvgcwaBppQmjN/MeIHrFAV4btke1Ae vmqq+apfDMtmJj5EoV9CKBg7H/asgw8pNer4Q4v2VPApeam+qWY88OhfJR4KVl14bATh afFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tlZYoK+8LSJ13OdXi7LH55t26bBVPIvfm8Y4qnh8A2s=; b=xKgOBcE/DLvMjV8axw/XHJe6syR+OmXgDRqT8BFAfHkOSchfc74An6bwmgUjG2A0eq mQPd1NqgTY9ePlPN2feWDO2etInAWoI5t3YXfavDnjHWEvKdrcp3k/D7UjrihGSjrjkU 0XcnXrpIziVhtI6Xdg4GxhUChvjLS3PLKTbbVAWZAZQP+iRlyD7e+X93a5bN+17xMRCj 4OVk7fPUSjH2CFbKEnLQ3AKp3rU99uBTMLLuljLUBq/v8o2VxaAVr0IA1TeFE5WMWdQb HKM6CC0gZW8gQuyqCSqi/x1Pkno3j8zLa4EOVNU5cPYZQRsLlKS7VvTHgLMa7pmwHYxA optA== X-Gm-Message-State: AOAM533xOG20oJvVADqZByLBjvuCC4axkrHpIefKjkmLtM2FYTkw8WJM QDCIAdIJDVoiPvRkUK/c8i6bE7Q1r0oj3v6EUvUI+mXrM1o= X-Google-Smtp-Source: ABdhPJzSBB+JmcZJzzJgJfdpTicfmYSLum8hO4blyOPKemkvZbUAjI8bVpQteMwpMLYT0TohmUUPGfJ8gVeSs9QwA4c= X-Received: by 2002:a17:906:6d9a:: with SMTP id h26mr26325641ejt.96.1633952305074; Mon, 11 Oct 2021 04:38:25 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:113062 Archived-At: --===============6355293834684229997== Content-Type: multipart/alternative; boundary="000000000000b957ac05ce122ab1" --000000000000b957ac05ce122ab1 Content-Type: text/plain; charset="UTF-8" Hi, I am trying to use a combination figure with luacode (both with latest MKIV and LMTX). However, the figures do not line up in the grid of the combination. I get the correct result with examples 1 and 2 below, but example 3 using lua functions for combination and externalfigure is what I wanted to use in the first place. MWE: \starttext \startluacode -- Combination 1 context.startplacefigure({title = "Figure"}) context.startcombination({nx = "2", ny = "2"}, "\\externalfigure[cow][width=50mm]","Caption 1", "\\externalfigure[cow][width=50mm]","Caption 2", "\\externalfigure[cow][width=50mm]","Caption 3", "\\externalfigure[cow][width=50mm]","Caption 4" ) context.stopcombination() context.stopplacefigure() -- Combination 2 context.startplacefigure({title = "Figure"}) context.startcombination({nx = "2", ny = "2"}, "Picture 1","Caption 1", "Picture 2","Caption 2", "Picture 3","Caption 3", "Picture 4","Caption 4" ) context.stopcombination() context.stopplacefigure() -- Combination 3 context.startplacefigure({title = "Figure"}) context.startcombination({nx = "2", ny = "2"}, context.externalfigure({"cow"},{width = "50mm"}),"Caption 1", context.externalfigure({"cow"},{width = "50mm"}),"Caption 2", context.externalfigure({"cow"},{width = "50mm"}),"Caption 3", context.externalfigure({"cow"},{width = "50mm"}),"Caption 4" ) context.stopcombination() context.stopplacefigure() \stopluacode \stoptext Any hints on what I am doing wrong in example 3? Thanks, Adam --000000000000b957ac05ce122ab1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am trying to use a com= bination figure with luacode (both with latest MKIV and LMTX).
Ho= wever, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but e= xample 3 using lua functions for combination and externalfigure is what I w= anted to use in the first place.

MWE:

\starttext

\startluacode

-- Combination 1context.startplacefigure({title =3D "Figure"})
context.startc= ombination({nx =3D "2", ny =3D "2"},

"\\ext= ernalfigure[cow][width=3D50mm]","Caption 1",
"\\exte= rnalfigure[cow][width=3D50mm]","Caption 2",
"\\exter= nalfigure[cow][width=3D50mm]","Caption 3",
"\\extern= alfigure[cow][width=3D50mm]","Caption 4"
)

context= .stopcombination()
context.stopplacefigure()

-- Combination 2
=
context.startplacefigure({title =3D "Figure"})
context.sta= rtcombination({nx =3D "2", ny =3D "2"},

"Pi= cture 1","Caption 1",
"Picture 2","Caption= 2",
"Picture 3","Caption 3",
"Picture = 4","Caption 4"
)

context.stopcombination()
cont= ext.stopplacefigure()

-- Combination 3

context.startplacefigu= re({title =3D "Figure"})
context.startcombination({nx =3D &quo= t;2", ny =3D "2"},

context.externalfigure({"cow&= quot;},{width =3D "50mm"}),"Caption 1",
context.exte= rnalfigure({"cow"},{width =3D "50mm"}),"Caption 2&= quot;,
context.externalfigure({"cow"},{width =3D "50mm&qu= ot;}),"Caption 3",
context.externalfigure({"cow"},{w= idth =3D "50mm"}),"Caption 4"
)

context.stopc= ombination()
context.stopplacefigure()

\stopluacode
\stoptext<= /div>

Any hints on what I am doing wrong in example 3?

Thanks,
Adam

=
--000000000000b957ac05ce122ab1-- --===============6355293834684229997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6355293834684229997==--