From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47160 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Serializing nodes Date: Tue, 3 Feb 2009 12:01:18 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0012300311==" X-Trace: ger.gmane.org 1233659391 14902 80.91.229.12 (3 Feb 2009 11:09:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 11:09:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 03 12:11:05 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 1LUJ9c-0004L0-I4 for gctc-ntg-context-518@m.gmane.org; Tue, 03 Feb 2009 12:09:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C6CAB1FBD0; Tue, 3 Feb 2009 12:07:59 +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 04290-02-2; Tue, 3 Feb 2009 12:06:30 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8C08E1FB89; Tue, 3 Feb 2009 12:06:30 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2D28C1FB71 for ; Tue, 3 Feb 2009 12:06:28 +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 04290-02 for ; Tue, 3 Feb 2009 12:05:46 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by ronja.ntg.nl (Postfix) with ESMTP id EDAD71FB89 for ; Tue, 3 Feb 2009 12:05:45 +0100 (CET) Original-Received: from mail-bw0-f16.google.com (mail-bw0-f16.google.com [209.85.218.16]) by filter4-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n13B5iC8008897 for ; Tue, 3 Feb 2009 12:05:45 +0100 Original-Received: by bwz9 with SMTP id 9so1785351bwz.2 for ; Tue, 03 Feb 2009 03:05:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=3yH2aUModEWLeh0NNRMoYYcWrnsEuX6DZ9el7hjzoMI=; b=Rrfr3GUuSTNGG1kdF3G0yaWUODR4FJv/fRVwB90VCINM/8NVYbgZAltNYtSM5o18Oy 8GTnRaFYEhyXUrivua4QYH+SHiO/8q72XBzA0TfadUM3xkJB854PBaHJiVVI0oSmRcqy +TYeUaXfA4CQv1OMfL12/GM4SX/V37/Flovrw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=AggCg67FtX2t2JSp8bRBj5rO7J2+BTF3rFbPrgMH6FsLyeB7XzaGKUpTbHCxk3hggh m/14GZjFKCoG0bLNHyd9b3Og+2tvRfX2S/rmyj2AbW7bbDNKhzS52Vnz6jKD1KWykN/p f3F8aZwf3Hlq9sjAkFeRougFXqqTy8eno+JJI= Original-Received: by 10.181.199.6 with SMTP id b6mr2044712bkq.68.1233658878555; Tue, 03 Feb 2009 03:01:18 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.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: 174204089 - 8b64d9103c5e X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 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:47160 Archived-At: --===============0012300311== Content-Type: multipart/alternative; boundary=001636c5a2673af6ff0462019716 --001636c5a2673af6ff0462019716 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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) -- luigi --001636c5a2673af6ff0462019716 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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=\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)


--
luigi

--001636c5a2673af6ff0462019716-- --===============0012300311== 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 ___________________________________________________________________________________ --===============0012300311==--