From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23418 invoked from network); 17 Sep 2023 07:07:25 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 17 Sep 2023 07:07:25 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id B70CA48311E for ; Sun, 17 Sep 2023 09:05:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 857dATPu_uhM for ; Sun, 17 Sep 2023 09:05:39 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 4267D48303D for ; Sun, 17 Sep 2023 09:05:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 1D97D482FA9 for ; Sun, 17 Sep 2023 09:04:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BJMiyNmnZk1F for ; Sun, 17 Sep 2023 09:04:45 +0200 (CEST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 83570482F9F for ; Sun, 17 Sep 2023 09:04:45 +0200 (CEST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-1d6a7354533so596692fac.0 for ; Sun, 17 Sep 2023 00:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; t=1694934284; x=1695539084; darn=ntg.nl; h=mime-version:user-agent:content-transfer-encoding:in-reply-to:date :to:from:subject:message-id:from:to:cc:subject:date:message-id :reply-to; bh=W+j18421V3cavougV2iUVUpxz42Ep7kqivF46v+6JSQ=; b=flZr77cMl5SWAGsX3neSSl6oPOaMU3pCyNNQPpJALKqN8NJ/w/SxsgAYmD5vLdshuM 46htuTjsEtZAiDBwF8TWdgTjE+Z9oj/a7rGa/0H7AQ+NfeWPO9aJBg6Skv3d2A56+RxL akuBnf1aZAO23okou5W/M0xy/7qNjk6Lc2uAK4QD+bx9gvtjqHCm4IHEQxLLhqUNibvr vZmXRWblZxBvbVCNOcoZaOxiVe4FXg2l2UEfQeX6KqIyfiJ2E5i8U+Q2weoPr/MQx2Fk IFRw4BjL4iJPB9OTI/FOzRzxCf9bworTsAAWJkSvsvSLe8xFr/rgQqcIYuHI5pe3HsYF mMYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694934284; x=1695539084; h=mime-version:user-agent:content-transfer-encoding:in-reply-to:date :to:from:subject:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=W+j18421V3cavougV2iUVUpxz42Ep7kqivF46v+6JSQ=; b=lMPJ+feae20r6W/ERnCNtS/SP7836YyHH8/goDZhaEEvUSJucbzktgmt8555qYqEG3 KxJDpVaXxD1riOojyvKIWg74E3nnruKm/Xri3Uz+NWdRmV0/VpxMwLt7cn7I/tZrdsoA mpb2YybP8tBMBBrChjfrwEzjhf15VWMHoh/DTgGYV7HodSkNcjlx6fuxR5a8n3P0AOJd nrn9DGm0FqUECuIlYnHr0fxO8ZYIXn0l+p3N9lI2RshzSxijuTTehBBYyvjQ5sbWg12X lFlVuLOomC0IlKjfmmLRb5RMgttFmdCvh3DD7pHAz3jCMLWkbJTLOVFPi23zES7Wm7kf XkRg== X-Gm-Message-State: AOJu0YwULf8GCjp17FrOnHdLVyzcedpTTbl2thMfoQiQA6rbiNMK7UIO MTi9n6pWyw+5W4/ef9BaBmoxHO15TrkEejanRUI= X-Google-Smtp-Source: AGHT+IGZOcQQ2Ab63tHVZNTiAt2LTrgxrtgjES+TWvAXk1vgbJQO02WpvRVSFDvnhErZ48t0gHrZoQ== X-Received: by 2002:a05:6870:7029:b0:1d6:2476:be2e with SMTP id u41-20020a056870702900b001d62476be2emr6926642oae.35.1694934283491; Sun, 17 Sep 2023 00:04:43 -0700 (PDT) Received: from ?IPv6:2001:56a:7256:fa00::834? ([2001:56a:7256:fa00::834]) by smtp.gmail.com with ESMTPSA id gd13-20020a17090b0fcd00b002747df11d0fsm3525355pjb.1.2023.09.17.00.04.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 00:04:42 -0700 (PDT) Message-ID: <947cf5e7a0e99d13535f7d839a8b3204e6038d61.camel@telus.net> From: Max Chernoff To: ntg-context@ntg.nl Date: Sun, 17 Sep 2023 01:04:42 -0600 In-Reply-To: User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 Message-ID-Hash: 6OPQ3OB6UU3XO3PEPRJAXMH6UUA64VXX X-Message-ID-Hash: 6OPQ3OB6UU3XO3PEPRJAXMH6UUA64VXX X-MailFrom: mseven@telus.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Different behavior of \clf_lastypos vs \clf_lastxpos List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Aditya, > For some reason, there is an extra \relax written to file after > `\the\numexp\clf_lastypos\relax` (there is no such relax after > `\the\numexpr\clf_lastxpos\relax`). The test.pgf file is: > > \macro {A}{23930350}{43358454.0\relax } \macro {B}{39564274.0\relax > }{14083538} > > Any ideas on why is the extra \relax written after lastypos and how to > fix that? \numexpr stops at the first non-expandable or non-digit token. If \clf_last[xy]pos expands to an integer, then that's the \relax, but if it expands to a float, then that's the decimal point. With Lua, adding, subtracting, or multiplying two integers will give you an integer, but dividing gives you a float. So somewhere in the backend, the vertical position is probably divided but the horizontal position is only added or subtracted. To fix this, change lines 2344--2345 of anch-pos.lmt from implement { name = "lastxpos", actions = function() context(jobpositions.lastx) end } implement { name = "lastypos", actions = function() context(jobpositions.lasty) end } to implement { name = "lastxpos", actions = function() context("%.0f", jobpositions.lastx) end } implement { name = "lastypos", actions = function() context("%.0f", jobpositions.lasty) end } Thanks, -- Max ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________