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,RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3170 invoked from network); 29 Apr 2023 16:08:23 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 29 Apr 2023 16:08:23 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E2D8E1C2C51; Sat, 29 Apr 2023 18:08:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 iDDwxiZ9djQz; Sat, 29 Apr 2023 18:07:57 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2F8BA1C2C3C; Sat, 29 Apr 2023 18:07:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 135C81C2C3C for ; Sat, 29 Apr 2023 18:07:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 7GfWWmTe514W for ; Sat, 29 Apr 2023 18:07:54 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=82.64.235.169; helo=azules.eu; envelope-from=garulfo@azules.eu; receiver= Received: from azules.eu (82-64-235-169.subs.proxad.net [82.64.235.169]) (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 zapf.ntg.nl (Postfix) with ESMTPS id 34E771C23FF for ; Sat, 29 Apr 2023 18:07:54 +0200 (CEST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=azules.eu; s=mailkey; t=1682784464; bh=RDzLj9LAA527AN82Kq6kMG7c/enNsfACygTv9M4CHi4=; h=Date:To:From:Subject; b=ftPCWNlvwtPf2A0K4q+aqHZIsEnsnJrTICP5jN6v2UqkeXTL/ZcjJN6Pzi8F35yIN mwZ4zaOjnllNwEKknXsrRiwihtmVBQ/RUhbXeyPBEQotgFWh+4RtK0/R5jvLk/YOV6 TytykCDsTFHtrTDfrB+WwDfnBT1Tdv/GBVnuI58o= Date: Sat, 29 Apr 2023 18:07:43 +0200 MIME-Version: 1.0 To: Aditya Mahajan via ntg-context Content-Language: fr X-MailScanner-ID: 0B9DEE8302E.A52D8 X-MailScanner: Found to be clean X-MailScanner-From: garulfo@azules.eu Subject: [NTG-context] how access to \namedstructurevariable [next / previous] X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Garulfo via ntg-context Reply-To: mailing list for ConTeXt users Cc: Garulfo Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" Hi all, I would like to use the title and the number of a section twice : - first with a specific layout (with makeup) - second, as usual, as part of the page flow. like in : http://www.pragma-ade.nl/general/manuals/cont-enp.pdf#page=23 looking at the source code (http://context.aanhet.net/svn/manuals/context/layo-00.tex), I understood that it was achieved with : \setuphead [\v!chapter] [\c!command=\PlaatsHoofdstuk, \c!page=\v!yes, \c!before=, \c!inbetween=\PlaatsHoofdstukIndex, %\c!incrementnumber=cont-\currentlanguage, \c!header=\v!nomarking, \c!textstyle=\bfd, \c!numberstyle=\bfe] and \def\PlaatsHoofdstukIndex % todo: lucida {%\startnotmode[*\v!frontpart] \page[\v!right] \setupbackgrounds[\v!paper][\c!background=\v!color] \startmakeup[\v!standard] \raggedleft \doifsomething{\currentheadnumber} {\hfill\expanded{\processMPheadnumber{\currentheadnumber}}} \vfill \hfill\expanded{\processMPheadtext{\currentheadtext}} \stopmakeup \setupbackgrounds[\v!paper][\c!background=] }%\stopnotmode} But currently, I can not reproduce it : - \currentheadtex return empty - \namedstructurevariable{section}{title} only report the update title once the title is actually typesetted Is there a way to access \namedstructurevariable with [next] or [previous] like options ? Here is a test trying to reproduce cont-enp.pdf example =================================================== \def\CheckA{{\mono\currentheadtext}} \def\CheckB{{\mono\namedstructurevariable{section}{title}}\page} \setuphead [section] [before={before : \CheckA - \CheckB}, inbetween={inbetween: \CheckA - \CheckB}, after={after: \CheckA - \CheckB}, beforesection={beforesection: \CheckA - \CheckB}, insidesection={insidesection: \CheckA - \CheckB}, aftersection={aftersection: \CheckA - \CheckB}, color=darkred, style=\tfc, ] \starttext \startsection[title=Section A] Text of section A. \stopsection \startsection[title=Section B] Text of section B. \stopsection \stoptext =================================================== Thanks for your help Garulfo ___________________________________________________________________________________ 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 ___________________________________________________________________________________