From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72941 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Passing TeX parameters to the lua functions Date: Mon, 5 Dec 2011 21:33:14 +0100 Message-ID: References: <4EDD280D.1050107@gyza.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1323117220 9769 80.91.229.12 (5 Dec 2011 20:33:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2011 20:33:40 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 05 21:33:35 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 1RXfEF-0007CW-HK for gctc-ntg-context-518@m.gmane.org; Mon, 05 Dec 2011 21:33:35 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A101CCB133; Mon, 5 Dec 2011 21:33:34 +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 x55fnuCbrE40; Mon, 5 Dec 2011 21:33:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C4ACCCB12A; Mon, 5 Dec 2011 21:33:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 43613CB12A for ; Mon, 5 Dec 2011 21:33:30 +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 ChTlCzKCzMmD for ; Mon, 5 Dec 2011 21:33:19 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 2B331CB111 for ; Mon, 5 Dec 2011 21:33:19 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pB5KXI8e021906 for ; Mon, 5 Dec 2011 21:33:18 +0100 Original-Received: by bkbzt12 with SMTP id zt12so5416954bkb.14 for ; Mon, 05 Dec 2011 12:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=iQrZqoVubJKtsaUdFK/pqe98NL4C54pPV5awPuUoUvw=; b=NpaT2NvTwuZuanDEb1fWxiI5r4l6mrAC4h07J2+A/ZQeGOoo2Vb9vWCXth6cEaoetL jILcrfmcOXyJp4jWso5Vz68l0d6HX5+AN2sM1bBfpLohdW2ad90vig7fmidoTCMX7OLn C05GOnQ05eMANT6FmQCHlk7YgGsQJQd/1EniU= Original-Received: by 10.216.131.222 with SMTP id m72mr2187158wei.49.1323117198158; Mon, 05 Dec 2011 12:33:18 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFAE25.dip.t-dialin.net. [87.175.174.37]) by mx.google.com with ESMTPS id fw16sm29757953wbb.13.2011.12.05.12.33.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 12:33:17 -0800 (PST) In-Reply-To: <4EDD280D.1050107@gyza.cz> X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cG5wxix8 - 8a03197f773a - 20111205 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:72941 Archived-At: Am 05.12.2011 um 21:22 schrieb Jaroslav Hajtmar: > Hello ConTeXist. > Sorry for the beginner question, more for Lua(TeX) experts. > Can somehow be achieved that the parameter of TeX macro get to luafunction unchanged? > In the debug.txt file is the result obtained. > > Thanx Jaroslav > > \startluacode > debug=io.open("debug.txt","w+") > > function testfun(param) Use the thirddata or userdata namespace for for functions. > debug:write(param) > -- tex.print(param) > end > > \stopluacode > > > \def\testmac#1{\directlua{testfun('#1')}} \unprotect \def\testmac#1{\ctxlua{testfun(\!!bs\detokenize{#1}\!!es)}} \protect 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________