From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 7AC2B247DD for ; Tue, 4 Feb 2025 18:05:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 7495C4857B8 for ; Tue, 4 Feb 2025 18:03:01 +0100 (CET) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-transfer-encoding:content-type:content-type :list-unsubscribe:list-subscribe:list-post:list-owner:list-help :list-archive:archived-at:list-id:subject:subject:reply-to :precedence:from:from:content-language:user-agent:mime-version :date:date:message-id:received:received:received:received :received:received:received; s=cgl; t=1738688580; x=1741280581; bh=uFEtWZqEg/d1HwRgPZ+f8dvOAVpMUit04Z4BH7eUFlI=; b=JYrYwSrYGrVk xrAeeVQrI7RAcfRq8ziktVYlcTWfHN4at+34NuQ9wC5BlbwqZmDY1PPA3wsVgaBd 5bj9/+3647m1IOtxSixKRfpfXtXt37mrhVTPf7vvSBQOu8S+MKegXtaa7DM0lpzK PT3TyaN4yZ1bNM00+3eRZTTADzghGck= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=xs4all.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 YnsY4hxXR4ON for ; Tue, 4 Feb 2025 18:03:00 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 48A624857BA for ; Tue, 4 Feb 2025 18:00:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id B2DDF4852E5 for ; Tue, 4 Feb 2025 17:59:56 +0100 (CET) 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 Zl0Wo37zmnTz for ; Tue, 4 Feb 2025 17:59:56 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.121.94.184; helo=ewsoutbound.kpnmail.nl; envelope-from=j.hagen@xs4all.nl; receiver= Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.184]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 5213B4852E4 for ; Tue, 4 Feb 2025 17:59:55 +0100 (CET) X-KPN-MessageId: d3234f3e-e319-11ef-9401-005056994fde Received: from smtp.kpnmail.nl (unknown [10.31.155.8]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id d3234f3e-e319-11ef-9401-005056994fde; Tue, 04 Feb 2025 18:02:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=content-type:subject:to:from:mime-version:date:message-id; bh=fgzBZ/GCPKORSCnMWlbSLVCv4pqiKCHPCSq6/xNiMdk=; b=FeVXUhi6GVLgojKFrnt1gTZKP1mAgTZ6WBK9/TioMHGrivv5Rinac5z8v466uBnyhQjAuf90r1fd5 1GvGil0mVIwm0q88M0CUd1DC+m8YqS5R/HULDB1yLh81XDNAzcTvb2l6ieAIpo8qajysPXi83UyDf4 aTysSO3QkCdlD2MI0VvVnWG/R0SYhzZJcE4bIP67G50LAdw/uZmkHCrHpzXLRQ+SxTNpULB7Rv6LX4 ZNFy3bMjhEsj1oMg01nNytq0ptzhmdYBW0XaBAplXfDDQJSd44SFFYexN+ydz9+JDvVK+ST+qQI411 nJtvrMLmCVcXHf4+aGgLItiq83EK+kA== X-KPN-MID: 33|hDD9ydqLt2RO4BhUjEJNqc3wRJEwzHzxIA0cBYC8VNHyx7ldDBNqRfbRI2ALcZd itdfX35I+ze2aDZGe9GQYRr68zMjOE4GG4M42j7QxKso= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|jDNRK11QFehtnwI2Z4EGGa+Bwbzglyn4FBSXNsqLo/mMwT6LOzYBhKSPf1VXeos GIt0N8CXuqjemRGvbYv/btA== X-Originating-IP: 213.125.29.162 Received: from [10.100.1.105] (d57d1da2.static.ziggozakelijk.nl [213.125.29.162]) by smtp.xs4all.nl (Halon) with ESMTPSA id 75762d75-e319-11ef-8956-00505699d6e5; Tue, 04 Feb 2025 17:59:55 +0100 (CET) Message-ID: <63efa3c9-1fe1-47ea-b076-e61222f4a8fc@xs4all.nl> Date: Tue, 4 Feb 2025 17:59:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: nl From: Hans Hagen To: mailing list for ConTeXt users Message-ID-Hash: KP52NQS3SKJK37TWTAWML5VI7IPJAFSR X-Message-ID-Hash: KP52NQS3SKJK37TWTAWML5VI7IPJAFSR X-MailFrom: j.hagen@xs4all.nl 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.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] new upload 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"; format="flowed" Content-Transfer-Encoding: 7bit Hi, NOTA BENE: The next upload is kind of special so best save the old tex tree if you update. For quite a while we have an extended expression scanner on board (in luametatex) and after recently testing it a bit more I decided to start using it. A side effect is that we can also use more clever assignments to dimensions and numbers. We already had: \scratchcounter 10 \scratchcounter = 10 \scratchcounter \numexpr 1 + 10\relax \scratchcounter \numexpression 1 + 10\relax etc but these expr have a potential lookahead problem, not so much when used liek this but when we have cases like \numexpr 1 + 10 - #1\relax because no one can predict what #1 is, maybe \numexp 1 - 10/5 which effectively is: \numexpr 1 + 10 - \numexp 1 - 10/5\relax which can run wild so in the end that is not suitable for use in key value situations. As part of our column set experiments we actually want to pass 'expressions', think \framed[height=2\lineheight-\strutdp]{...} or even \framed[height=2 * \lineheight - \strutdp]{...} or even \framed[height=2 * lh - sd]{...} etc. where the 2 * dimension is something not possibel with \dimexpr. So, to keep a long explanation short, we now also support \dimexpr{....} and also \scratchdimen{...} where in the later case we actually use \dimexpression{....} There's also \dimexperimental which has proper priority handler and can mix with integers and floats as well as limited boolean expressions (comparison) while its \numexperimental sibbling can also do bitwise operations. (Actually \dimexpression also can do some of that but one needs to use more ( ) around subexpressions; so \dimexpression conceptually sits between \dimexpr and \dimexperimental). Anyway, more about that in manuals and articles, and it's kind of old news already. The main impact is that now keys that refer to numbers and dimensions can also accept expressions without the need to be explicit, so width=3em + 2em * 4 lines=4 + (5*2 - 1) eventually will all be seen as {something} which as it is valid in assignments will trigger the right expression scanner. The \todimension and \tointeger primitives also accept {} because they scan for a dimension or number as again as side effect do all primitives and engine keyword that matter. They are serializers. Deep down context is now adapted to this: adding many {} in assignments, wrapping parameters in {} so that they can properly nest, replacing /removing redundant \dimexpr etc. All this can have introduced temporary issues but they can be fixed easily, so I think that the benefits outweight temporary issues. Think 'beta'. In case one wonders, there is no real impact on performance because expressions were already quite optimized and the (already kind of old) new scanners even more so. In due time more of the now possible features will be revealed. Hans (and mikael who tested intermediate versions on real documents) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________