From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/52261 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: =?utf-8?q?loop_textext_and_=5CMPstring=7B=E2=80=A6?= =?utf-8?q?=7D?= Date: Wed, 12 Aug 2009 23:00:04 -0400 (EDT) Message-ID: References: <4409ACEE-4337-45DC-8DC2-9EEC858B8C5C@uni-koblenz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1225836772-1250132405=:26461" X-Trace: ger.gmane.org 1250132450 31628 80.91.229.12 (13 Aug 2009 03:00:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 03:00:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 13 05:00:43 2009 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.50) id 1MbQYT-0001jg-UO for gctc-ntg-context-518@m.gmane.org; Thu, 13 Aug 2009 05:00:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 29811C9A90; Thu, 13 Aug 2009 05:00:39 +0200 (CEST) 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 p+ugyyZAyb8q; Thu, 13 Aug 2009 05:00:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9904AC9A77; Thu, 13 Aug 2009 05:00:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EB8E8C9A77 for ; Thu, 13 Aug 2009 05:00:34 +0200 (CEST) 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 0mqjnJbd67Qk for ; Thu, 13 Aug 2009 05:00:20 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by balder.ntg.nl (Postfix) with ESMTP id 2A663C9A4A for ; Thu, 13 Aug 2009 05:00:19 +0200 (CEST) Original-Received: FROM wireless-165-124-139-37.nuwlan.northwestern.edu (wireless-165-124-139-37.nuwlan.northwestern.edu [165.124.139.37]) By hellskitchen.mr.itd.umich.edu ID 4A8381C2.8CAD0.2397 ; Authuser adityam; 12 Aug 2009 23:00:18 EDT In-Reply-To: <4409ACEE-4337-45DC-8DC2-9EEC858B8C5C@uni-koblenz.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) 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:52261 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-1225836772-1250132405=:26461 Content-Type: TEXT/PLAIN; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 12 Aug 2009, Andreas Harder wrote: > In the "real world=93 I've stripped quotes form another document and stor= ed=20 > them in buffer-environments (attachment). Save them as lua tables. Much easier to manipulate than tex objects. > With your solution I've no idea how=20 > to incorporate them in a "automatic" manner. You just need to work a little harder. \startbuffer[1] This is a test \stopbuffer \startbuffer[2] Another test \stopbuffer \startbuffer[3] And again \stopbuffer \startluacode userdata =3D userdata or {} function userdata.shift(i) return "(" .. i .. "cm ," .. i .. "cm )" end function userdata.buffers(i) local idx =3D string.format("%s",i) local b =3D buffers.data[idx] if b then if type(b) =3D=3D "table" then return table.concat(b) else return b end else return "unknown" end end function userdata.draw_buffer(i) return "draw btex " .. userdata.buffers(i) .. " etex shifted "..=20 userdata.shift(i) .. ";" end \stopluacode \starttext \startluacode context.startMPpage({offset =3D "1ex", width =3D [[\paperwidth]], height= =3D=20 [[\paperheight]]}) for i =3D 1,3 do context(userdata.draw_buffer(i)) end context.stopMPpage() \stopluacode \stoptext Aditya --8323328-1225836772-1250132405=:26461 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-1225836772-1250132405=:26461--