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 2417D264D4 for ; Mon, 20 May 2024 16:58:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 330134844DE for ; Mon, 20 May 2024 16:58:03 +0200 (CEST) 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 l-70kpbRH6gB for ; Mon, 20 May 2024 16:58:02 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A942F48435F for ; Mon, 20 May 2024 16:57:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A4B6A484065 for ; Mon, 20 May 2024 16:57:29 +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 8hEmYVDoiK_V for ; Mon, 20 May 2024 16:57:29 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.121.94.167; helo=ewsoutbound.kpnmail.nl; envelope-from=j.hagen@xs4all.nl; receiver= Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.167]) (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 530E6484063 for ; Mon, 20 May 2024 16:57:29 +0200 (CEST) X-KPN-MessageId: 40218188-16b9-11ef-93a8-005056abbe64 Received: from smtp.kpnmail.nl (unknown [10.31.155.40]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 40218188-16b9-11ef-93a8-005056abbe64; Mon, 20 May 2024 16:57:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=content-type:from:to:subject:mime-version:date:message-id; bh=5hqxvQ1tDonYF7KdVKD4WecvE3E2wHnVNeVgRi7iFVs=; b=sRh3G9REpgQRXEgEdd5eUhe2qpdOFhu5mmWPH7mdp80XQTlEsNeB85NNQ6YOw+syvP9W7eaN4mC+O jXSUa9XFu/WTrfjGWasAsN4eSvTws15KsYt3lJ+L9aeJXnEDUiHeHOu8D6tpXQaRT7CYmPIqD+dQ+r vF3nzsHEepY8njCJ6r/8vf5px/ClH+x/aB0s5C1eVBzv78y3zMwvO/1+txyQpzWE+OqCpQot342fpi HtzY5DpFZgVkJopk73z/BnaGWBuv13YvtaATc9iMCN2ZAAakbfM7iHxK/Uo++LHdFytnkHyDXGbb+u WYA9ycmBouPcDqgQ5vG6uaLaynSvvzg== X-KPN-MID: 33|zX/KyXCpm0VPFe1yh2871tdSzSPnwRXObgBjmaOfPjMo0wFa6CnXK7Xvp0cavV8 qal7QUOPg3IDch3s0d3+B6izWWNbkNJNJfsW7ruZ01XA= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|4b1AOsLvtn05FAzocQH2f99Lv+eWDJi3ZL1KE3YzpqCznb67qACblJ8/re1qYE7 +VaeioYyVgbQE+UKCzpKghQ== 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 46edf56e-16b9-11ef-9fd1-005056ab7584; Mon, 20 May 2024 16:57:28 +0200 (CEST) Message-ID: Date: Mon, 20 May 2024 16:57:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ntg-context@ntg.nl References: <573802ae-4aab-4321-afb5-811a16e13c83@xs4all.nl> <171618491505.1996.2365276090642094609@cgl.ntg.nl> From: Hans Hagen In-Reply-To: <171618491505.1996.2365276090642094609@cgl.ntg.nl> Message-ID-Hash: IO2CZU37VPR6LUKP45UFCKZMVS4RESOP X-Message-ID-Hash: IO2CZU37VPR6LUKP45UFCKZMVS4RESOP 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.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: defining hashtag simulator 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 On 5/20/2024 8:01 AM, seyal.zavira@gmail.com wrote: > Thanks. > > What if we want the text to be copied when it is clicked? > I found these link on the stack site for this > https://tex.stackexchange.com/questions/174637/copy-to-clipboard-feature-in-pdf-output/545107#545107 > > also i defined this: > \def\Hashtag#1{ > \hbox{\tfa\ctxlua{ > str = "#1" > replacespace = string.gsub(str," ","_") > > context.letterhash() > context(replacespace) > } > } > } > \starttext > \Hashtag{hello} > \stoptext > > i used hbox for making phrase unbreakable. > > How can you put all the code in the one Lua function and not need to put hbox or goto function outside of Lua? In the next upload you can do this: \protected\def\Hashtag#1% {\begingroup \nohyphens \spacechar\underscoreasciicode \nospaces\plusthree \letterhash#1% \endgroup} (was an easy extension given what we already have) Hans ----------------------------------------------------------------- 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 ___________________________________________________________________________________