From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66344 Path: news.gmane.org!not-for-mail From: Daniel Lyons Newsgroups: gmane.comp.tex.context Subject: Re: TaBlE from Lua Date: Wed, 23 Feb 2011 23:48:45 -0700 Message-ID: <999FA2A6-E728-4A38-A508-E5164EF176DF@storytotell.org> References: <20110223230738.GD9491@clanspum.net> <20110224011613.GA5149@orcus> <330D6A41-0B03-4ECF-917E-6A50064375B5@storytotell.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298530174 3292 80.91.229.12 (24 Feb 2011 06:49:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Feb 2011 06:49:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 24 07:49:30 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 1PsV0x-0007sM-IJ for gctc-ntg-context-518@m.gmane.org; Thu, 24 Feb 2011 07:49:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1D7B0CAA67; Thu, 24 Feb 2011 07:49:27 +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 iby8bxocnVre; Thu, 24 Feb 2011 07:49:26 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AF85DCAA5E; Thu, 24 Feb 2011 07:49:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 115B8CAA5E for ; Thu, 24 Feb 2011 07:49:13 +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 nABTTz+hGoOk for ; Thu, 24 Feb 2011 07:48:52 +0100 (CET) Original-Received: from filter1-nij.mf.surf.net (filter1-nij.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 26A6ACAA4F for ; Thu, 24 Feb 2011 07:48:52 +0100 (CET) Original-Received: from mail.clanspum.net (twopir-2-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:1b9::2]) by filter1-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p1O6mmJ4019362 for ; Thu, 24 Feb 2011 07:48:50 +0100 Original-Received: from [192.168.2.5] (71-37-159-72.albq.qwest.net [71.37.159.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.clanspum.net (Postfix) with ESMTPSA id A56EB17C2CF for ; Thu, 24 Feb 2011 00:50:16 -0600 (CST) In-Reply-To: X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: No geolocation information available for 2001:470:1f10:1b9::2 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07EbGMMlW - a1c33c8eebb5 - 20110224 X-Scanned-By: CanIt (www . roaringpenguin . com) on IPv6:2001:610:0:800e:195:169:124:152 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:66344 Archived-At: On Feb 23, 2011, at 11:35 PM, luigi scarso wrote: > On Thu, Feb 24, 2011 at 2:45 AM, Daniel Lyons wr= ote: >> = >> On Feb 23, 2011, at 6:16 PM, Philipp Gesang wrote: >> = >>> On 2011-02-23 <17:07:38>, Daniel Lyons wrote: >>>> Is there a convenient way to create TaBlE tables from Lua? If so, >>>> where can I read about it? >>> = >>> Good evening, Daniel! >>> = >>> [-1] Isn=92t TaBlE deprecated? >> = >> I didn't know that! >> = >>> [0] If you aim for convenience, wouldn=92t you rather want to >>> switch to \[start|stop]tabulate? Its syntax is very similar >>> and there are a few examples to learn from in the context >>> source code. >> = >> My particular situation is a bit more involved. I want to put SQL in my = ConTeXt source and have it run it against my database and format the result= nicely in my document. I think I see how to do it, I just need to be able = to take the parsed output and make the visually appealing table. > Have a look at > http://robitex.wordpress.com/2011/02/22/postgresql-gestisce-i-dati-lualat= ex-li-stampa/ > It's in italian & latex & postgres, but pretty clear. This is gorgeous, and I'm sure it will come in handy, thanks! I'm glad to k= now I'm not alone in trying this. My particular situation is a bit different though, I need to be able to do = something along the lines of: \startSQLinteraction SELECT * FROM foo; \stopSQLinteraction and have it produce something like this (possibly): SELECT * FROM mailinglists; Listing 6.1 +-------------------+------------------------+ | mailing list name | email address | +-------------------+------------------------+ | ConTeXt | ntg-context@ntg.nl | | Snap Framework | snap@snapframework.com | +-------------------+------------------------+ Output of Listing 6.1 My inspiration here is the Real World Haskell book, which ran the snippets = in the book during rendering, ensuring both that the snippets actually work= and that their output was faithful to the input. I don't mind having one c= onnection as a constant. =97 = Daniel Lyons ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________