From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51376 Path: news.gmane.org!not-for-mail From: Matthijs Kooijman Newsgroups: gmane.comp.tex.context Subject: Re: Example of passing unexpanded text between \startfoo ... \stopfoo into Lua? Date: Fri, 19 Jun 2009 11:49:12 +0200 Message-ID: <20090619094912.GN1611@katherina.student.utwente.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0516477891==" X-Trace: ger.gmane.org 1245405014 30361 80.91.229.12 (19 Jun 2009 09:50:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jun 2009 09:50:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 19 11:50:12 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 1MHajb-0004t0-Gc for gctc-ntg-context-518@m.gmane.org; Fri, 19 Jun 2009 11:50:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4EAD91FB7E; Fri, 19 Jun 2009 11:50:08 +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 12593-04; Fri, 19 Jun 2009 11:49:26 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE2C61FB39; Fri, 19 Jun 2009 11:49:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0DA8D1FB39 for ; Fri, 19 Jun 2009 11:49:24 +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 10348-07-2 for ; Fri, 19 Jun 2009 11:49:13 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id C92CB1FB1D for ; Fri, 19 Jun 2009 11:49:13 +0200 (CEST) Original-Received: from katherina.student.utwente.nl (katherina.student.utwente.nl [130.89.168.160]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-5) with ESMTP id n5J9nDfj018426 for ; Fri, 19 Jun 2009 11:49:13 +0200 Original-Received: from matthijs by katherina.student.utwente.nl with local (Exim 4.69) (envelope-from ) id 1MHaie-0007jz-KD for ntg-context@ntg.nl; Fri, 19 Jun 2009 11:49:12 +0200 Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: X-PGP-Fingerprint: 7F6A 9F44 2820 18E2 18DE 24AA CF49 D0E6 8A2F AFBC X-PGP-Key: http://katherina.student.utwente.nl/~matthijs/gpg_pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=130.89.168.160; country=NL; region=15; city=Enschede; latitude=52.2167; longitude=6.9000; http://maps.google.com/maps?q=52.2167,6.9000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 246081646 - 4a33c75fb05d - 20090619 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:51376 Archived-At: --===============0516477891== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jIHsHaVgx5AQzhyz" Content-Disposition: inline --jIHsHaVgx5AQzhyz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Kevin, > A colleague and I are experimenting with strategies to implement a literate > programming module for ConTeXt, and we'd like to have something like Im not exactly sure what you're trying to achieve, but perhaps you could do this using a prettyprinter? A pretty printer gets passed each line in the \startfoo \stopfoo block and can change the line in any way it wants (including removing it). IIRC there is some minimal general preprocessing done, something with whitespace I think. > \startcodeblock[language=c,file=foo.c, etc.][blockname] > // This is the main routine... > int main() > { > return 0; > } > \stopcodeblock Perhaps you could say a bit about what the above should output? Gr. Matthijs --jIHsHaVgx5AQzhyz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAko7XxgACgkQz0nQ5oovr7wedwCZAei/RBocOnmSUdFACNA+qMlU yvYAoKl/dtAEsa5ZF7S5dl/h6mQxS/kh =nPdm -----END PGP SIGNATURE----- --jIHsHaVgx5AQzhyz-- --===============0516477891== 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 ___________________________________________________________________________________ --===============0516477891==--