From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51361 Path: news.gmane.org!not-for-mail From: "Kevin D. Robbins" Newsgroups: gmane.comp.tex.context Subject: Example of passing unexpanded text between \startfoo ... \stopfoo into Lua? Date: Thu, 18 Jun 2009 10:21:18 -0600 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1118418396==" X-Trace: ger.gmane.org 1245342167 19168 80.91.229.12 (18 Jun 2009 16:22:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2009 16:22:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 18 18:22:44 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 1MHKNt-0007dB-AF for gctc-ntg-context-518@m.gmane.org; Thu, 18 Jun 2009 18:22:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 375FF1FBF1; Thu, 18 Jun 2009 18:22:40 +0200 (CEST) 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 20633-04-5; Thu, 18 Jun 2009 18:21:36 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BB8631FB82; Thu, 18 Jun 2009 18:21:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 417571FB82 for ; Thu, 18 Jun 2009 18:21:34 +0200 (CEST) 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 13082-03-3 for ; Thu, 18 Jun 2009 18:21:19 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by ronja.ntg.nl (Postfix) with ESMTP id 9DAA41FB5B for ; Thu, 18 Jun 2009 18:21:19 +0200 (CEST) Original-Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by filter3-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n5IGLIN3003591 for ; Thu, 18 Jun 2009 18:21:19 +0200 Original-Received: by fxm9 with SMTP id 9so1412912fxm.2 for ; Thu, 18 Jun 2009 09:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=EuSaAJp/rt64qkyYRqmXe7ph+vHGheUgBU7w8IVbxKE=; b=mG6e4E9DZJUNlLe3HyMiod9A+U8C6mh99xNbqTZNyDIDKk7nYxzUl57Qkw2/LaqLKZ JWZflveFLc+r/itrwp9R6nFecwTd0TzQu2Ly6idNhV+PJq4Z//v8yz+uOOtvN1iWMw2E JvvnwJl067DRpl379iId4ERizF46oys3fyZx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=FwAbJeYnPDdUeu/THkcaWkoafe7URjwOQm43CmSwVoKSNFW9hy/m2Xh7TXQgvQKz6D DnGoHfQQsxP8MvY8v7BsfehOgWKkokAfu+qqF1Prs0fT8OC9KQm+Hqc5EIZMNmifWV7m QV3H3Nsf0CwoDvcy39CT5v7UgO2x+ZQThWtus= Original-Received: by 10.204.97.140 with SMTP id l12mr1493942bkn.133.1245342078483; Thu, 18 Jun 2009 09:21:18 -0700 (PDT) X-Google-Sender-Auth: e8fdfa9e738d32d0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.213; 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: 245686915 - 5204a681f61d - 20090618 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:51361 Archived-At: --===============1118418396== Content-Type: multipart/alternative; boundary=0016363b9922363e83046ca1ccd3 --0016363b9922363e83046ca1ccd3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Hans and others, I've been searching the mailing list and source code for one or more examples of passing unexpanded text appearing between a \startfoo ... \stopfoo block into Lua, but without luck. Is there such an example you could point me to? A colleague and I are experimenting with strategies to implement a literate programming module for ConTeXt, and we'd like to have something like \startcodeblock[language=c,file=foo.c, etc.][blockname] // This is the main routine... int main() { return 0; } \stopcodeblock We would appreciate any thoughts you have about how to implement such a module. Thanks, Kevin --0016363b9922363e83046ca1ccd3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Hans and others,

I've been searching the mailing list and sou= rce code for one or more examples of passing unexpanded text appearing betw= een a \startfoo ... \stopfoo block into Lua, but without luck. Is there suc= h an example you could point me to?

A colleague and I are experimenting with strategies to implement a lite= rate programming module for ConTeXt, and we'd like to have something li= ke

\startcodeblock[language=3Dc,file=3Dfoo.c, etc.][blockname]
//= This is the main routine...
int main()
{
=C2=A0=C2=A0 return 0;
}
\stopcodeblock

We = would appreciate any thoughts you have about how to implement such a module= .

Thanks,

Kevin
--0016363b9922363e83046ca1ccd3-- --===============1118418396== 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 ___________________________________________________________________________________ --===============1118418396==--