From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107891 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Re: Commands with arguments before in ConTeXt Date: Mon, 29 Jun 2020 08:48:53 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6621426510746136890==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="91899"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users , Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 29 15:49:27 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpuA2-000Nnd-OX for gctc-ntg-context-518@m.gmane-mx.org; Mon, 29 Jun 2020 15:49:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 72DC018535A; Mon, 29 Jun 2020 15:49:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 rXa9uJqZTuM5; Mon, 29 Jun 2020 15:49:08 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 835EC185363; Mon, 29 Jun 2020 15:49:08 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B93E6185363 for ; Mon, 29 Jun 2020 15:49:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 ZT-kc7GA3uJO for ; Mon, 29 Jun 2020 15:49:05 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.50; helo=mail-wm1-f50.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 782F818535A for ; Mon, 29 Jun 2020 15:49:05 +0200 (CEST) Original-Received: by mail-wm1-f50.google.com with SMTP id w3so3731270wmi.4 for ; Mon, 29 Jun 2020 06:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+kIeP5tQ5riIZi3G21HoEE1xh88jm3o6HtfJP6LbSzY=; b=eIk5vRSY/COaDOInUUx+pDAIY3RVSH0sbW6cApOjLoALVwBps7n9MWsyWH0K4u8qi8 gXM67i+BQMY6LD8q5CZAxkEy3+KK/kZal62kULM4IiV+dDrgO9QDwjH5BvzFNtqck2wN mVMSkUEXDEOXV0UmHH5PQVsEVsaz7Wdtv5JINgRdtyD8pINgBERwEo01OcJMJDC/qdEq fiHEaPAS8M8f+PvQBPQLqTjWQtaDRi8iy8EBqngyDvuqvrf95U+h14Qo0jF/If56MLzw TbtHOUpFAQMKz0lEWMq3Ajpv86vsH1Mn0Wojdrs2aV2j/E7hqJXwyWUuA3V5v+7v+rdi PFUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+kIeP5tQ5riIZi3G21HoEE1xh88jm3o6HtfJP6LbSzY=; b=PCzRUZZlSaVZ6jGiJvZCYfkDXaTkMUmSxmBq3W8rOMG9FXLS+QpQX/DqacDpLXTbLe e+a9eEiGQPxHsNKq47fZeliAiB5qn8yXOZJ9jNenAxV/xcmhywcjU1Rpm6Ch3jbhGZ8S MNnCiz9SMpGuGKbCSwDpqAJQsbGUzQ2zMfuZpW3PPf8bUUKu9LV/oNzfDn1AMfw5YcVR 4YI+dU36taWYW/AIMoZqBluGrBDOmP0/QcI4wtGyFFrQM7NhiQ+fwiRoY1ALbaXkqnKH /01zqe+noI9OH/IwF1nO+lfIEL6PJc4J1+WJHUiKJYPuVzjW9GM2EuVwiltU1buGjUGv bXwQ== X-Gm-Message-State: AOAM533m5C6nckcC9QDCf6mCGm2ZFJ54GtoKEkSZvHjhsM9LulDL3fhv WfotrK+iXYtsL/GdA9iQgnn1SEHmq0kbATwBk7eZtdL/pMI= X-Google-Smtp-Source: ABdhPJyZ0zmlZ80yP4crDHgCw2Kz+elUMHTHXZdwjyjYIDIdGCJYeygFfnZpXD45b2lRPBp5F/sCCGTcrWZt7RtuSKI= X-Received: by 2002:a1c:790c:: with SMTP id l12mr16436424wme.50.1593438544948; Mon, 29 Jun 2020 06:49:04 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107891 Archived-At: --===============6621426510746136890== Content-Type: multipart/alternative; boundary="00000000000071729a05a93952ec" --00000000000071729a05a93952ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oh, I was just asking about luatexbase.add_to_callback("process_input_buffer", blabla, "blabla" ) and luatexbase.remove_from_callback("process_input_buffer", "blabla" ) LuaLaTeX users do that way and I want to be sure it won't interfere with ConTeXt way of doing things so I can play with the suggestion made by Luigi. Regards, Jairo :) El lun., 29 de jun. de 2020 a la(s) 08:27, Hans Hagen (j.hagen@xs4all.nl) escribi=C3=B3: > On 6/29/2020 12:21 PM, Jairo A. del Rio wrote: > > Wouldn't it be slow for larger documents? I will try anyway. By the way= , > > I've seen Lua(La)TeX users recurring to callbacks (process input buffer= ) > > to make string replacements and I've done so myself sometimes. Does > > ConTeXt do preprocessing the same way or is a better alternative > > possible? Thank you very much. > You mean "Does context use callbacks?" You can bet on that. It is how we > came to implementing callbacks (over a decade ago now, Taco and I spend > quite some time exploring all these things in the process of luatex dev > ... fond memories and so). > > I don't know what latex does but context doesn't do much input > processing apart from some unicode related juggling. There are plenty of > ways to hook in additional processing but there are multiple ways to > solve problems. Most of these mechanism in context are already pretty > old and hardly change. > > 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 / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --00000000000071729a05a93952ec Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=
Oh, I was just asking about

luatexbase.add_to_callback
("process_input_bu= ffer", blabla, "blabla" )


and
=

luatexbase.remove_from_callback
<= span class=3D"gmail-pun">("process_in= put_buffer", "blabla" )
=
LuaLaTeX users do that way=
 and I want to be sure it won't interfere with ConTeXt way of doing thi=
ngs so I can play with the suggestion made by Luigi.

<= /pre>
Regards,

Jairo :) 

El lun., 29 de jun. de 202= 0 a la(s) 08:27, Hans Hagen (j.hagen@x= s4all.nl) escribi=C3=B3:
On 6/29/2020 12:21 PM, Jairo A. del Rio wrote:
> Wouldn't it be slow for larger documents? I will try anyway. By th= e way,
> I've seen Lua(La)TeX users recurring to callbacks (process input b= uffer)
> to make string replacements and I've done so myself sometimes. Doe= s
> ConTeXt do preprocessing the same way or is a better alternative
> possible? Thank you very much.
You mean "Does context use callbacks?" You can bet on that. It is= how we
came to implementing callbacks (over a decade ago now, Taco and I spend quite some time exploring all these things in the process of luatex dev ... fond memories and so).

I don't know what latex does but context doesn't do much input
processing apart from some unicode related juggling. There are plenty of ways to hook in additional processing but there are multiple ways to
solve problems. Most of these mechanism in context are already pretty
old and hardly change.

Hans

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 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 t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000071729a05a93952ec-- --===============6621426510746136890== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6621426510746136890==--