From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113263 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio via ntg-context" Newsgroups: gmane.comp.tex.context Subject: Re: getting number from context.figurewidth Date: Wed, 27 Oct 2021 14:41:08 -0500 Message-ID: References: <7b76b1c2-a912-08ed-7040-ee107d392203@gmx.es> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7698832229050275222==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29079"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Jairo A. del Rio" , Pablo Rodriguez To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 27 21:41: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 1mfony-0007N7-9D for gctc-ntg-context-518@m.gmane-mx.org; Wed, 27 Oct 2021 21:41:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 13840267F29; Wed, 27 Oct 2021 21:41: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 lVRzxP8ZfoHC; Wed, 27 Oct 2021 21:41:25 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F0499267F1F; Wed, 27 Oct 2021 21:41:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3243D267F1E for ; Wed, 27 Oct 2021 21:41:22 +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 Q_RJ8qNteh6l for ; Wed, 27 Oct 2021 21:41:20 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.50; helo=mail-wr1-f50.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 CCF9F5E5 for ; Wed, 27 Oct 2021 21:41:20 +0200 (CEST) Original-Received: by mail-wr1-f50.google.com with SMTP id s14so3098283wrb.3 for ; Wed, 27 Oct 2021 12:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cKFsAhi3t5QTmKDN1A7T6lxsnv4OTCelgaJb1oStArc=; b=L9nAXN8zgaaUk1V5lQZkHc5bOll9BbN0tlNdguHDj7aQWukdCiPhGWsOl3xXgRBnvh CO32Sqfu1KFOxb6BfVV5sqjJFVDXwuRRDE663jXNNM291rbrieAk9MYc5JygaXk6dDz6 PV9FRUctEL6m+nX2T28T9WoBXJLmmVtPB4CcXFQfdIQ6+IQWqk21BGuFFvMJwD+AHnlB 6REqDaHc5pqUr3nwTht2b+Azeo+6YrX3nuo2qN+RcN7PxVV6HOtP0bkjh8CpcvKjdDyC a4a0f+8BnW0QWezjz+6yaLIqCIkO5SKebz8LVbVXq9d7AzOPruPj1KXzDJUi3zifBil3 2l2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cKFsAhi3t5QTmKDN1A7T6lxsnv4OTCelgaJb1oStArc=; b=39K1SML0HXlZZX4iXPsjfGAFJ8WX/ljRRzd0LxsIHWPe61DsNeyg2ToMJiWAuquKFq RyMpal09pnf8TQ+m+X5gQTjh+swcjl/osholkGjUESAX9uqdpnckiq+XwYelMGs/g48f JXNEQCZRBFhnzE8XQedgvRijqxwO69TA9Cp4/qHGLxcHDAR1g743Z8V08fRzuVraBy7o UKe3yZBJwZGjkddR6enbIlWvixxGOGvBZSPvajfKfyCtcLNVuDbtR3s/y4lzTtwktB1j yI29Jpu+nkvl/ioi9hWP8jFnWHhMyPyh7AyRVOSJQbfPaplOxPwcY6uJHAQ5xvnl9q/j A4XQ== X-Gm-Message-State: AOAM5335MGawLgJAbEzyT+rGXo45JoNCDbI5AuTf+IXODtpxWo2RLPke ztne7kSW3JdVpHnjkTRHeo9AlQ4G2LdLBQiDzk7nfLX+TnZifA== X-Google-Smtp-Source: ABdhPJxGaY2FMMC4f/2mDejPGW3m/Zm/7tf3aoSTmvXhuIKdEG++f8gzFiIhRv/AEbvHtPwki39kkJATmQWk5ASYhN4= X-Received: by 2002:a05:6000:1449:: with SMTP id v9mr43515224wrx.137.1635363680421; Wed, 27 Oct 2021 12:41:20 -0700 (PDT) In-Reply-To: <7b76b1c2-a912-08ed-7040-ee107d392203@gmx.es> 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:113263 Archived-At: --===============7698832229050275222== Content-Type: multipart/alternative; boundary="00000000000040082a05cf5ac726" --00000000000040082a05cf5ac726 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Pablo. I have no idea of what you need to do, but in grph-inc.lua you find the following (line 709): implement { name =3D "figurestatus", actions =3D { get, context }, argume= nts =3D { "'status'", "string", "string" } } So that \figureheight calls this function via \clf_figurestatus and, in turn, it calls figures.get. If I'm right, figures.get('status','height','0') -- or '"status"' ? would have to return the value you're asking for (at the TeX end, "sp" units are added). A MWE wouldn't hurt. I hope this helps or, at least, it leads you through the right direction. Cordially, Jairo El mi=C3=A9, 27 de oct. de 2021 a la(s) 14:20, Pablo Rodriguez via ntg-cont= ext ( ntg-context@ntg.nl) escribi=C3=B3: > On 10/26/21 6:31 PM, Pablo Rodriguez via ntg-context wrote: > > [...] > > Is there a way that I can get a number from context.figureheight, such > > as I get it from tex.dimen.paperheight? > > Sorry for insisting, I need it for a Lua script that in the relevant > line reads: > > loader_times:write('.box placeholder width=3D' .. context.figurewidth > .. ' height=3D' .. context.figureheight) > > I cannot concatenate string and function (and I need the number, not the > unit). > > Is there no way of doing it? > > Many thanks for your help, > > Pablo > -- > http://www.ousia.tk > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --00000000000040082a05cf5ac726 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, Pablo. I have no idea of what= you need to do, but in grph-inc.lua you find the following (line 709):
=
implement { name =3D "figurestatus", =C2=A0 actions =3D { get= , context }, arguments =3D { "'status'", =C2=A0"stri= ng", "string" } }

So that \figureheight calls t= his function via \clf_figurestatus and, in turn, it calls figures.get. If I= 'm right,

figures.get('status','height',&= #39;0') -- or '"status"' ?

would have to= return the value you're asking for (at the TeX end, "sp" uni= ts are added). A MWE wouldn't hurt. I hope this helps or, at least, it = leads you through the right direction.

Cordially,

Jairo

El mi=C3=A9, 27 de oct. de 2021 a la(s) 14:20, Pablo Rodriguez vi= a ntg-context (ntg-context@ntg.nl= ) escribi=C3=B3:
On 10/26/21 6:31 PM, Pablo Rodriguez via ntg-context wrote:
> [...]
> Is there a way that I can get a number from context.figureheight, such=
> as I get it from tex.dimen.paperheight?

Sorry for insisting, I need it for a Lua script that in the relevant
line reads:

=C2=A0 loader_times:write('.box placeholder width=3D' .. context.fi= gurewidth
=C2=A0 =C2=A0 =C2=A0.. ' height=3D' .. context.figureheight)

I cannot concatenate string and function (and I need the number, not the unit).

Is there no way of doing it?

Many thanks for your help,

Pablo
--
http:/= /www.ousia.tk
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000040082a05cf5ac726-- --===============7698832229050275222== 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== --===============7698832229050275222==--