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=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 00264286A9 for ; Tue, 21 May 2024 10:37:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 8C87848473B for ; Tue, 21 May 2024 10:36:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=dwarfmaster.net 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 PUKYM_D7UkXy for ; Tue, 21 May 2024 10:36:09 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 34ACF483ABF for ; Tue, 21 May 2024 10:35:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id EF2C24843EE for ; Tue, 21 May 2024 10:35:32 +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 826G2RC5K_hZ for ; Tue, 21 May 2024 10:35:31 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=188.165.216.157; helo=dwarfmaster.net; envelope-from=luc@dwarfmaster.net; receiver= X-Greylist: delayed 562 seconds by postgrey-1.36 at cgl.ntg.nl; Tue, 21 May 2024 10:35:31 CEST Received: from dwarfmaster.net (dwarfmaster.net [188.165.216.157]) (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 ACB5D4843EB for ; Tue, 21 May 2024 10:35:31 +0200 (CEST) Date: Tue, 21 May 2024 10:26:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dwarfmaster.net; s=mail; t=1716279968; bh=8SXdu3/J4OZLpsqDMPu0WxuVoEQiU+eTLsUivv21djc=; h=Date:From:Subject:To; b=OEC9lhpJrQM3I0+qLiPn5fQizfnpoziPazVPoz8qeWYqFiP2sOSciINciRFU2hKbN 85ARz6C0OeW4qpTtBGQgKvwJBmzGXBL2Dna3Bc06bg9nJf/l99ukmZIm84tT91DMu2 6rD9YhT4nQ2ULtdluF+eiM6eIu8D5vRaTWP/UKLY= From: Luc Chabassier To: ntg-context@ntg.nl MIME-Version: 1.0 Message-Id: <1716278987.izni348y64.astroid@tungdil.none> Message-ID-Hash: E72N6IFIC3M2VGFDEX3ZUQEQKWGQ3QCF X-Message-ID-Hash: E72N6IFIC3M2VGFDEX3ZUQEQKWGQ3QCF X-MailFrom: luc@dwarfmaster.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] LUA API for page numbers 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 everyone, I have recently migrated my PhD dissertation from LaTeX to ConTeXt. In LaTeX I was using kaobook, a template with lots of margin notes, but I was frustrated with the automatic placement of the notes. I implemented a system using overlays that automatically places the notes using lua. To know where the ideal placement should be (if they do not interact with each other), I use lua to insert a latelua whatsit that uses lpdf.getpos() to get the coordinate on the rendered page. However, I haven't found a way to get the page number using lua, and the tex macro \pagenumber is unreliable near pagebreaks. Furthermore, it would be helpful to know if there is a way to access the position and sizes of figures at the end. Thanks, Luc ___________________________________________________________________________________ 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 ___________________________________________________________________________________