From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46572 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Problem Passing \starttabulate into Lua Date: Tue, 30 Dec 2008 10:06:40 +0100 Message-ID: <999ECAF9-30AE-4EA6-B21E-FF629FD09EA0@gmail.com> References: <49560F83.3080706@cyberdude.com>, <68E5AC30CE6FA94DB0C3B4E3294B5D3103754222EA@ES01SNLNT.srn.sandia.gov> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230631173 25787 80.91.229.12 (30 Dec 2008 09:59:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2008 09:59:33 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 30 11:00:40 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 1LHbOx-0002gG-Rv for gctc-ntg-context-518@m.gmane.org; Tue, 30 Dec 2008 11:00:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A9E921FC39; Tue, 30 Dec 2008 10:59:21 +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 28470-02-6; Tue, 30 Dec 2008 10:58:34 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 536A41FC71; Tue, 30 Dec 2008 10:07:29 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 73C5E1FC71 for ; Tue, 30 Dec 2008 10:07:23 +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 22655-02-5 for ; Tue, 30 Dec 2008 10:06:43 +0100 (CET) Original-Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by ronja.ntg.nl (Postfix) with ESMTP id 44F231FC67 for ; Tue, 30 Dec 2008 10:06:43 +0100 (CET) Original-Received: by bwz13 with SMTP id 13so12860582bwz.2 for ; Tue, 30 Dec 2008 01:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:to:in-reply-to :content-type:content-transfer-encoding:mime-version:subject:date :references:x-mailer:from; bh=epw3a8ui0/xOzKLmVGWS8TvLlmmG+tfpZXhR9R89XBw=; b=vlBxqe2VigXXWsej7dccCW0FOgL7TtKmfDYTVs2+5zYhvhJWMk2STIYJ1riG4wWYxO +FncRyf/h1lIpDWFgeZ59rCziGp9FqVeJd1Rdiv8rIAMYyGJHixKIUeeCPLLPOfmiv50 qVISHEdlQYB2+qXRK9oATRfgzyuBgaVHA4CII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:to:in-reply-to:content-type:content-transfer-encoding :mime-version:subject:date:references:x-mailer:from; b=Oi/XkGPzcZkEZdZfuW8cCsYMoxM6OV7xklyrJENphH3x5nibzRgSn9m+59eBig2/ja z0epZ5th1kYtHpYCkPHezFdWBdMabYbl5bST5PBkfLWAXmpGNMgG/oN/E6yvB4ydiL5D JTTwXyEJh8sVjSEBSM8t6M4OkXloR890dX2Ec= Original-Received: by 10.223.109.84 with SMTP id i20mr10529196fap.42.1230628002930; Tue, 30 Dec 2008 01:06:42 -0800 (PST) Original-Received: from ?192.168.2.23? (p5B295ACD.dip.t-dialin.net [91.41.90.205]) by mx.google.com with ESMTPS id 12sm20433184fks.13.2008.12.30.01.06.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Dec 2008 01:06:42 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.930.3) 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:46572 Archived-At: Am 29.12.2008 um 14:28 schrieb Wolfgang Schuster: >> When I changed '\starttabulate' to '\starttabulate[|l|p|]' in your >> solution above, it broke. > > Try to escape the |, it's a active character in ConTeXt but this > could work (untested): > > \def\testmacro > {\bgroup > \catcode`\\=12 > \catcode`\|=12 > \dotestmacro} And now with a catcode table. % redefined version of \startcatcodetable \long\def\startcatcodetable#1#2\stopcatcodetable {\bgroup %\catcodetable\scratchcatcodetable \the\setdefaultcatcodes #2% \savecatcodetable#1\relax \egroup} % the new catcode table \newcatcodetable \testcatcodes \startcatcodetable \testcatcodes \catcode`\\ = 12 \catcode`\| = 12 \stopcatcodetable \def\testmacro {\bgroup \setcatcodetable\testcatcodes \dotestmacro} \def\dotestmacro#1% {\ctxlua{d='\luaescapestring{#1}'} \egroup} \starttext \testmacro{\starttabulate[|l|p|] \NC knuth \NC \input knuth \NC\NR \stoptabulate} \ctxlua{tex.sprint(d)} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________