From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75151 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: OT: Problem with writing macros into variables in LuaTeX Date: Sun, 18 Mar 2012 11:53:54 +0100 Message-ID: <55678723-48C9-4CAE-B726-8DA75E52A625@googlemail.com> References: <4F65B813.7080902@gyza.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1332068092 21600 80.91.229.3 (18 Mar 2012 10:54:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Mar 2012 10:54:52 +0000 (UTC) To: hajtmar@gyza.cz, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 18 11:54:51 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S9Dl9-00029S-1L for gctc-ntg-context-518@m.gmane.org; Sun, 18 Mar 2012 11:54:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D4BB21021F; Sun, 18 Mar 2012 11:54:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nMGit5NUiFnq; Sun, 18 Mar 2012 11:54:44 +0100 (CET) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3E28F10211; Sun, 18 Mar 2012 11:54:44 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 374F910211 for ; Sun, 18 Mar 2012 11:54:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vBn2okP6s6dq for ; Sun, 18 Mar 2012 11:54:42 +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 37E6B10194 for ; Sun, 18 Mar 2012 11:54:42 +0100 (CET) Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q2IAsfYl008532 for ; Sun, 18 Mar 2012 11:54:41 +0100 Original-Received: by wgbds10 with SMTP id ds10so486264wgb.2 for ; Sun, 18 Mar 2012 03:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=zPPjNDPJ9NJQY8jfC2EdV0C1mogRbzpO9W2vQKbJ6t4=; b=jT/jHiZKoD8ysf7Xuz6VskpUvbDTPIOo983VGjptQhRwDlfmsTB/cbHgt0xp2DLrnc HiuxuJpKNcBZSIXI+wpFwXvrVJcLPAJIjkO9mDp8TVPxkIdLgAipXISQaUDmjTbHqiUE 0rcdvOoEfd3ku9Vgyags1XELiLGjaEE6oManmWWOuDFodmGsDyK5zhaYUAZEWeK/1CuD WzT/RdtTEVD3XqnEo/rHAIwF5gpFGAPt6eBOIFCk5u72KBi6oPlSoO9P6GRZ69Csm4fv ELs96wuI2cfOGryDbqoLNtaUauvQsaAfxSHUi4sPbAgiEEfw10gjq8v94+N7NplfeFCK bVDg== Original-Received: by 10.180.78.225 with SMTP id e1mr11762720wix.0.1332068081100; Sun, 18 Mar 2012 03:54:41 -0700 (PDT) Original-Received: from [192.168.2.36] (p57AFCBAD.dip.t-dialin.net. [87.175.203.173]) by mx.google.com with ESMTPS id fn2sm12213552wib.0.2012.03.18.03.54.24 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Mar 2012 03:54:40 -0700 (PDT) In-Reply-To: <4F65B813.7080902@gyza.cz> X-Mailer: Apple Mail (2.1257) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QGKWSFXg - a350925b8766 - 20120318 (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.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:75151 Archived-At: Am 18.03.2012 um 11:25 schrieb Jaroslav Hajtmar: > Hello Gurus. > Sorry for OT, but I solve one problem in parallel in ConTeXt and pure LuaTeX too and I got into trouble. > I have a problem in LuaTEX with putting macro name into global variables and their re-listing. In ConTeXt, the problem is not with it. > > Here is my minimal LuaTeX example: > > \directlua{function put2globvar(parameter) globvar=parameter end} > \directlua{function getglobvar() tex.print(globvar) end} > > \def\puttoglobvar#1{\directlua{put2globvar('#1')}} Untested: \def\puttglobvar#1{\directlua{put2globvar([==[\detokenize{#1}]==])} You can also try to replace \detokenize with \unexpanded (in ConTeXt \normalunexpanded). 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 ___________________________________________________________________________________