From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86688 Path: news.gmane.org!not-for-mail From: Pablo Rodriguez Newsgroups: gmane.comp.tex.context Subject: Re: issue with \processaction Date: Tue, 18 Mar 2014 23:04:25 +0100 Message-ID: <5328C2E9.50002@gmx.es> References: <5328894F.1040208@gmx.es> <532896B1.2040502@wxs.nl> <5328B601.908@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1395180274 20263 80.91.229.3 (18 Mar 2014 22:04:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2014 22:04:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 18 23:04:42 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQ27l-0001uM-Jq for gctc-ntg-context-518@m.gmane.org; Tue, 18 Mar 2014 23:04:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D43B8101EB; Tue, 18 Mar 2014 23:04:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id si1D-5MgOxA7; Tue, 18 Mar 2014 23:04:39 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3815D101E8; Tue, 18 Mar 2014 23:04:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D41EF101E8 for ; Tue, 18 Mar 2014 23:04:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6Oh9uY1mIqD1 for ; Tue, 18 Mar 2014 23:04:36 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 69BC3101E1 for ; Tue, 18 Mar 2014 23:04:31 +0100 (CET) Original-Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s2IM4U1C016400 for ; Tue, 18 Mar 2014 23:04:30 +0100 Original-Received: from [192.168.1.33] ([88.9.249.119]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M9s2y-1WF4on26LA-00B24n for ; Tue, 18 Mar 2014 23:04:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-Provags-ID: V03:K0:M/lSLpxObqrfg6xsGQrVEv6O6CvUUTYp8LRTQynQ+wQ/IMfNJm1 CG6QxA7GNXdKmhHqefPd3+9bBnWaMpy0a+dIWN9jquxx/AySJmlWYRsRxYJFZNmjnmd5L51 sbwbbZMI6OHlf/zW4vIBd+JPkzpiN+FisYBHeCK+KVUCGj0pQUMM6eTxxPJxKih10IPuYAX XW4P68CUKqNwNzdfn6Z8A== X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=212.227.17.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QLDa4uWa - 464399d68a10 - 20140318 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86688 Archived-At: On 03/18/2014 10:40 PM, Wolfgang Schuster wrote: > Am 18.03.2014 um 22:09 schrieb Pablo Rodriguez: >> On 03/18/2014 07:55 PM, Hans Hagen wrote: >>> [...] >>> = >>> you output vrbcatcodes strings while you test using ctx catcodesn >>> >>> of course i'd use lua for all of it: >>> [...] >> I=92m afraid that the user doesn=92t get recognized (I corrected the user >> name above). > = > The same applies to your examples because your test won=92t work on > our machines ;) You=92re right, Wolfgang, I chose the wrong sample. The next one (AFAIK) should work on every OS: \startluacode local user =3D "" local users =3D { ["ousia"] =3D 1, } function document.CheckUser() user =3D os.resultof("echo ousia") context.verbatim(user) end function document.UserNumber(name) context.verbatim(users[name or user] or 0) end \stopluacode \def\CheckUser {\ctxlua{document.CheckUser ()}} \def\UserNumber{\ctxlua{document.UserNumber()}} \starttext This is user \CheckUser with number \UserNumber. \stoptext >> Is there no way to do it with \processaction? > = > Only when you ensure the text you get from Lua has the normal cathode > regime and when you special characters like \ in the result you have > to convert them to \letterbackslash etc. which isn=92t simpler than > Hans solution. The advantage of Hans solution is that you don=92t have > to care about expansion. The solution from Hans is great. The only issue there is that it is much harder to understand for me. Since this is a minimal part in a way more complex implementation (at least for me), I really need to use commands that I know what they do. Pure Lua code is totally unknown to me. I don=92t have any background in programming. This is the reason why I asked about \processaction. Many thanks for your reply, Pablo -- = http://www.ousia.tk ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________