From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47170 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: Serializing nodes Date: Tue, 3 Feb 2009 17:34:12 +0100 Message-ID: References: <4988704A.4090408@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0158190287==" X-Trace: ger.gmane.org 1233679066 19565 80.91.229.12 (3 Feb 2009 16:37:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 16:37:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 03 17:39:00 2009 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 1LUOIa-0000TA-Ei for gctc-ntg-context-518@m.gmane.org; Tue, 03 Feb 2009 17:38:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FEC11FC24; Tue, 3 Feb 2009 17:37:35 +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 31332-01; Tue, 3 Feb 2009 17:36:13 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5C3E31FBBD; Tue, 3 Feb 2009 17:36:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9DD521FBBD for ; Tue, 3 Feb 2009 17:36:10 +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 29667-02 for ; Tue, 3 Feb 2009 17:35:33 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by ronja.ntg.nl (Postfix) with ESMTP id 788F21FB49 for ; Tue, 3 Feb 2009 17:35:33 +0100 (CET) Original-Received: from mail-fx0-f16.google.com (mail-fx0-f16.google.com [209.85.220.16]) by filter1-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n13GZW2N011424 for ; Tue, 3 Feb 2009 17:35:32 +0100 Original-Received: by fxm9 with SMTP id 9so2263700fxm.2 for ; Tue, 03 Feb 2009 08:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=tTX/fgkbgJgr5oO77R5P+7uPzaZ5U+JP4gsjhr6dnkk=; b=pi9u/usPzgT9htMWxGjLJZQb2lpHVJI2yR+tB25YJfvCQYbTxN9/44vIEm0himJrLW IzpY82QenNrojCzaXiSuo5tmhIo5r90xm74bzkwMVO5nyfKHBpzH5fZsFGxC8nBWFMvT pfFzZCkHIg4gewXiByab6EJeC4PTq2icAw6vE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=NQbYuIMdqhW1HlBwvqWg2WAWpcNh5fltTZXGfXhFw3gegOHq+U01vPccXoxPvJ4KEo wWG16m5ovm/8sK9EAhjLV0h6fhZCBMR19YvxVj8rofnShC245dYI5BA6x3TLrWg3/2/2 NR9BOTu2YnoAjjJgZp30GD36T1VzLenYfbyb4= Original-Received: by 10.181.48.13 with SMTP id a13mr1592267bkk.97.1233678852523; Tue, 03 Feb 2009 08:34:12 -0800 (PST) In-Reply-To: <4988704A.4090408@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.16; 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: 174468209 - 5eff5835308c X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.152 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:47170 Archived-At: --===============0158190287== Content-Type: multipart/alternative; boundary=001485f91c30c588570462063da4 --001485f91c30c588570462063da4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Tue, Feb 3, 2009 at 5:26 PM, Hans Hagen wrote: > luigi scarso wrote: > >> While grepping, I've found >> in base/node-ini.lua >> ..... >> --[[ldx-- >>

Serializing nodes can be handy for tracing. Also, saving and >> loading node lists can come in handy as soon we are going to >> use external applications to process node lists.

>> --ldx]]-- >> ..... >> >> >> \starttext >> \setbox100=\vbox{Hi} >> \ctxlua{io.savedata('vbox.hi',nodes.serializebox(100,true, true))} >> Box reuse:\blank >> \box100 >> \blank >> \ctxlua{initt=loadfile('vbox.hi');initt();tex.box[100] = >> nodes.FromTableToNodeButItnotExists(t)} >> %%actually an empty box, of course >> \box100 >> \stoptext >> >> I was not able to find a "table2node" function ie >> nodes.FromTableToNodeButItnotExists(t) >> > > indeed, that has a low priority > > ok , no problem at all. I doesn't seem very difficult, probably I will give it a try. -- luigi --001485f91c30c588570462063da4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Tue, Feb 3, 2009 at 5:26 PM, Hans Hag= en <pragma@wxs.nl= > wrote:
luigi scarso wrote:
While grepping, I've found
in  base/node-ini.lua
.....
--[[ldx--
<p>Serializing nodes can be handy for tracing. Also, saving and
loading node lists can come in handy as soon we are going to
use external applications to process node lists.</p>
--ldx]]--
.....


\starttext
\setbox100=3D\vbox{Hi}
\ctxlua{io.savedata('vbox.hi',nodes.serializebox(100,true, true))}<= br> Box reuse:\blank
\box100
\blank
\ctxlua{initt=3Dloadfile('vbox.hi');initt();tex.box[100] =3D
nodes.FromTableToNodeButItnotExists(t)}
%%actually an empty box, of course
\box100
\stoptext

I was not able to find a "table2node" function ie
nodes.FromTableToNodeButItnotExists(t)

indeed, that has a low priority

ok , no problem at all.
I doesn't seem very diffic= ult, probably I will give it a try.


--
luigi
=
--001485f91c30c588570462063da4-- --===============0158190287== 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 ___________________________________________________________________________________ --===============0158190287==--