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 BFC8525FAE for ; Mon, 24 Jun 2024 19:20:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 3659C483F69 for ; Mon, 24 Jun 2024 19:20:20 +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=flump.de 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 mb7ZC16_-0VO for ; Mon, 24 Jun 2024 19:20:19 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id CD74D4842BF for ; Mon, 24 Jun 2024 19:20:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 74E05483E94 for ; Mon, 24 Jun 2024 19:19:55 +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 T1DsjA5_4IWS for ; Mon, 24 Jun 2024 19:19:55 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=185.163.118.210; helo=flump.de; envelope-from=gerion.entrup@flump.de; receiver= Received: from flump.de (flump.de [185.163.118.210]) (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 157E0483E8B for ; Mon, 24 Jun 2024 19:19:54 +0200 (CEST) Received: from falbala.localnet (ip4d1692dd.dynamic.kabel-deutschland.de [77.22.146.221]) by flump.de (Postfix) with ESMTPSA id F3D65111A36E for ; Mon, 24 Jun 2024 19:19:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=flump.de; s=mail; t=1719249593; bh=WWP0NiXaEZWOAO5dZGN+HHQlsfVPCA9vs9XQ3iCcMgA=; h=From:To:Subject:Date; b=PKsxWHOZqZGP2gs8+HBJ3Gp2RupohZMEMFrymVv416Xe7/9IcKQQnKPvkDBC6wLw7 BoquUhI1YgpMs7vO0wI1gIbROeoiOmbK9Odz1HDTw/usZkmx0lxR3Ffb2NQtVTgVwL 39I/fXLCbW2Cg3MQYC2YSQsmvATEUDjvheMEQ4pM= From: Gerion Entrup To: ntg-context@ntg.nl Date: Mon, 24 Jun 2024 19:19:52 +0200 Message-ID: <6962468.BEx9A2HvPv@falbala> MIME-Version: 1.0 Message-ID-Hash: VIU3C7WLDSKDANSNJX226BOCTDF6GJMK X-Message-ID-Hash: VIU3C7WLDSKDANSNJX226BOCTDF6GJMK X-MailFrom: gerion.entrup@flump.de 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] Use headcommand in \definedescription together with \definehighlight List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============4745664419438517622==" --===============4745664419438517622== Content-Type: multipart/signed; boundary="nextPart19367835.tv2OnDr8pf"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart19367835.tv2OnDr8pf Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Gerion Entrup To: ntg-context@ntg.nl Date: Mon, 24 Jun 2024 19:19:52 +0200 Message-ID: <6962468.BEx9A2HvPv@falbala> MIME-Version: 1.0 Hi, I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. Do you know, if this is possible? Here is a MWE: ``` \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] \definedescription[category][ alternative=top, headstyle=bold, width=broad, ] \definedescription[desc][ width=broad, distance={\widthofstring{~}}, headcommand={\groupedcommand{\hl}{:}}, % headcommand={\groupedcommand{}{:}}, % this compiles but the highlight is lost % headcommand={\groupedcommand{\starthl}{\stophl :}}, % this does not compile headstyle=, before={\startpacked}, after={\stoppacked}, alternative=hanging, ] \starttext This is a \hl{highlight}. Some listings \startcategory{Itemize} \startitemize[packed] \item \hl{first}: one \item \hl{second}: two \stopitemize \stopcategory Now the same as desc: \startcategory{Desc} \startdesc{first} one \stopdesc \startdesc{second} two \stopdesc \stopcategory \stoptext ``` The itemize looks like it should look (except of the dots). Best, Gerion --nextPart19367835.tv2OnDr8pf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEM/tVN9WpYYHnPZHxloeAdSYJHeoFAmZ5qrgACgkQloeAdSYJ Heo9VwwAkoagszeW7dPO4N2H7DRvEBxc4fhrYmbZk+Afea7RqN1tR9/mK6jPuWGO 1S705gPACeAx4Nu4+k+TdPeNuaXiuZ2to0It77hfktMcBqsHwBHZY49IdSOFBOJe lockcH9i3ZYdef37G/xXe9qHNebc2dn1IiUDVcdLTA7z6x8OkP/93HaUs6bh+IDU Im+VJsG/RRPnLrS9kE/i23X5MJ0KhOBAdtikBJ7JanzJLKwpuWUSNb1ZxyUVrDlN YKKJIcuMcyFRZFhtMrkr7ldR+XdEOuiM1QQUg6qGiUw78ndPGP5Msa+TLq1v3Cdt YVfMgPFMI+ic+eVIpV7H7kie5lIYRiw2b6iYCCDzqNghWfnGoz2szFTSdzzryhrA QbY5QiSpe5zRzcS0xcHSAszf00fyFJwrHzco4w545QSETsMlt2h0AHcUJPxzr5BR c8ZnqEvcwk68xS2x5l+RjfE5jr8ALLAnvRmBVmX9TsCBRFqg/VeZguxLEiYxSq52 H2gCM7aQ =9Jgc -----END PGP SIGNATURE----- --nextPart19367835.tv2OnDr8pf-- --===============4745664419438517622== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============4745664419438517622==--