From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65290 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \e!start in lua Date: Sun, 16 Jan 2011 11:27:15 -0500 (EST) Message-ID: References: <8D05D89F-60BF-47E6-A9FE-EA88398C79DB@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1503595863-1295195247=:12968" X-Trace: dough.gmane.org 1295195270 7700 80.91.229.12 (16 Jan 2011 16:27:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 Jan 2011 16:27:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 16 17:27:42 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PeVS5-0007Tx-Qa for gctc-ntg-context-518@m.gmane.org; Sun, 16 Jan 2011 17:27:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 43AB1CAA3A; Sun, 16 Jan 2011 17:27: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 T8z+ooqwuIFZ; Sun, 16 Jan 2011 17:27:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C42BACA96D; Sun, 16 Jan 2011 17:27:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 559BBCA96D for ; Sun, 16 Jan 2011 17:27:33 +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 Eih0OSoBzuJ6 for ; Sun, 16 Jan 2011 17:27:31 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 31927CA92B for ; Sun, 16 Jan 2011 17:27:31 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0GGRSOI024572 for ; Sun, 16 Jan 2011 17:27:30 +0100 Original-Received: FROM adi-netbook (Mismatch [65.94.14.230]) By hackers.mr.itd.umich.edu ID 4D331C6E.E4983.26318 ; Authuser adityam; 16 Jan 2011 11:27:27 EST In-Reply-To: <8D05D89F-60BF-47E6-A9FE-EA88398C79DB@gmail.com> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05DUgrsor - 4de2431623da - 20110116 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:65290 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1503595863-1295195247=:12968 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 16 Jan 2011, Wolfgang Schuster wrote: > > Am 15.01.2011 um 23:57 schrieb Aditya Mahajan: > >> What is the best way to define the equivalent of >> >> \setvalue{\e!start\NAME}{...} >> >> in lua. >> >> e_start =3D ?? >> context.setvalue(e_start .. name, "...") > > \startluacode > context.setvalue("foo","\\framedtext") > context.setvalue(table.concat({"start","foo"}),"\\startframedtext") > context.setvalue(table.concat({"stop" ,"foo"}),"\\stopframedtext" ) > \stopluacode > > \starttext > \foo{foo} > \startfoo bar\stopfoo > \stoptext > This would just create \startfoo. \setvalue{\e!start foo} creates a=20 interface specific command. The code that Hans posted does that. I am=20 sorry that this was not clear in the question. > You can also write =93context.setvalue("start".."foo","=85")=94 but table= =2Econcat > looks better OK. > but the question is why don=92t you use just tex > to create the start/stop commands. Because I find it much easier to understand expansion at lua level than at= =20 TeX level. Thanks, Aditya --8323328-1503595863-1295195247=:12968 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-1503595863-1295195247=:12968--