From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46560 Path: news.gmane.org!not-for-mail From: "Ashlock, Tad A" Newsgroups: gmane.comp.tex.context Subject: Re: Problem Passing \starttabulate into Lua Date: Mon, 29 Dec 2008 05:56:12 -0700 Message-ID: <68E5AC30CE6FA94DB0C3B4E3294B5D3103754222EA@ES01SNLNT.srn.sandia.gov> References: <49560F83.3080706@cyberdude.com>, Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230557175 6627 80.91.229.12 (29 Dec 2008 13:26:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2008 13:26:15 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 29 14:27:22 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LHI9Q-00036S-H5 for gctc-ntg-context-518@m.gmane.org; Mon, 29 Dec 2008 14:27:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DA7611FCD0; Mon, 29 Dec 2008 14:26:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27744-01; Mon, 29 Dec 2008 14:25:10 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EF2A41FC84; Mon, 29 Dec 2008 13:57:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5CC541FC74 for ; Mon, 29 Dec 2008 13:57:03 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22546-04-22 for ; Mon, 29 Dec 2008 13:56:26 +0100 (CET) Original-Received: from sentry.sandia.gov (sentry.sandia.gov [132.175.109.21]) by ronja.ntg.nl (Postfix) with ESMTP id 87F591FB82 for ; Mon, 29 Dec 2008 13:56:26 +0100 (CET) Original-Received: from [134.253.165.160] by sentry.sandia.gov with ESMTP (SMTP Relay 01 (Email Firewall v6.3.2)); Mon, 29 Dec 2008 05:56:13 -0700 X-Server-Uuid: 6BFC7783-7E22-49B4-B610-66D6BE496C0E Original-Received: from ES01SNLNT.srn.sandia.gov ([134.253.165.191]) by Cas2.srn.sandia.gov ([134.253.165.160]) with mapi; Mon, 29 Dec 2008 05:56:13 -0700 Thread-Topic: [NTG-context] Problem Passing \starttabulate into Lua Thread-Index: AclpPKjYZN6dDazZR72ey5WMprdUlAAdb2I3 In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US x-snlorgflag: True X-TMWD-Spam-Summary: TS=20081229125616; ID=1; SEV=2.3.1; DFV=B2008122911; IFV=NA; AIF=B2008122911; RPD=5.03.0010; ENG=NA; RPDID=7374723D303030312E30413031303230372E34393538433846312E303032392C73733D312C6667733D30; CAT=NONE; CON=NONE; SIG=AAAAAAAAAAAAAAAAAAAAAAAAfQ== X-MMS-Spam-Filter-ID: B2008122911_5.03.0010 X-WSS-ID: 654617672CG57850-01-01 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:46560 Archived-At: On 2008-12-28 at 15:33, Wolfgang Schuster wrote: >Am 27.12.2008 um 12:20 schrieb Tad Ashlock: >> I'm trying to create a ConTeXt macro (mkiv) that will manipulate the >> macro argument's text with Lua and then feed it back into ConTeXt >> with tex.print(). My approach worked correctly until I called the >> macro with \starttabulate ... \stoptabulate in the macro's >> argument. So I started reducing the problem down to a minimum >> example which surprisingly turned out to have nothing to do with the >> manipulations I was performing. [snip] > >\def\testmacro > {\bgroup > \catcode`\\=12 > \dotestmacro} > >\def\dotestmacro#1 > {\ctxlua{d='\luaescapestring{#1}'}% > \egroup} > >\starttext > >\testmacro{\starttabulate \NC text \NC text \NC\NR \stoptabulate} > >%\ctxlua{tex.sprint(d)} > >\stoptext > >Wolfgang Thank you Wolfgang! That's certainly a step in the right direction. But what I (and others?) really need is a way of passing any chunk of ConTeXt code into Lua. When I changed '\starttabulate' to '\starttabulate[|l|p|]' in your solution above, it broke. Thanks again, Tad ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________