From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62052 Path: news.gmane.org!not-for-mail From: Stefan =?iso-8859-1?q?M=FCller?= Newsgroups: gmane.comp.tex.context Subject: Re: Custom lua script (updating and debugging) Date: Tue, 28 Sep 2010 23:53:40 +0200 Message-ID: <201009282353.40541.warrence.stm@gmx.de> References: <201009281608.24932.alan.braslau@cea.fr> <4CA25BB3.4060808@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1285710944 14722 80.91.229.12 (28 Sep 2010 21:55:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Sep 2010 21:55:44 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 28 23:55:42 2010 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 1P0i9C-0007EF-Va for gctc-ntg-context-518@m.gmane.org; Tue, 28 Sep 2010 23:55:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 22479CA72D; Tue, 28 Sep 2010 23:55:38 +0200 (CEST) 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 9VLP0oErGnJc; Tue, 28 Sep 2010 23:55:35 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 27A14CA6E0; Tue, 28 Sep 2010 23:55:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B04BECA6E0 for ; Tue, 28 Sep 2010 23:55:33 +0200 (CEST) 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 W+ESD4gk1FQ5 for ; Tue, 28 Sep 2010 23:55:31 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 43835CA6BD for ; Tue, 28 Sep 2010 23:55:31 +0200 (CEST) Original-Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id o8SLtU93002982 for ; Tue, 28 Sep 2010 23:55:30 +0200 Original-Received: (qmail invoked by alias); 28 Sep 2010 21:54:30 -0000 Original-Received: from 77-64-199-171.dynamic.primacom.net (EHLO bragi.localnet) [77.64.199.171] by mail.gmx.net (mp046) with SMTP; 28 Sep 2010 23:54:30 +0200 X-Authenticated: #11064435 X-Provags-ID: V01U2FsdGVkX18TYnIqbRMT9syMigK3KloQOPOblc5ARwMb6EEm93 gGdVkNjliAEwYk User-Agent: KMail/1.13.5 (Linux/2.6.34.6-54.fc13.i686; KDE/4.4.5; i686; ; ) In-Reply-To: <4CA25BB3.4060808@wxs.nl> X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.23; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eDclTuG1 - 0b62115f5fd3 - 20100928 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:62052 Archived-At: Hi, thanks for the fast reply Mojca! Unfortunately it is still not working. Here is what I did. I'm afraid it has possibly more to do with pretty printers in particular (than lua scripts in general), but actually I have no idea. I took the file MyConTeXtDir/tex/texmf-context/tex/context/base/pret-lua.lua and copied it to MyConTeXtDir/tex/texmf-local/tex/context/user/pret-pas.lua Next I replaced every occurance of "lua" in this new file by "pas" (so this changed the name of one function and renamed the visualizer itself). Then I ran "context --generate". My testfile is added below. The "end" is typeset as if pret-pas.lua wouldn't exist. If I change "option=PAS" to "option=LUA" it works as intended ("end" is green). What is going on here? Any help is appreciated. \installprettytype[PAS][PAS] \setupcolors[state=start] \setuptyping[option=color] \definetyping[PAS][option=PAS, escape=yes, tab=4, numbering=line] \starttext \startPAS end \stopPAS \stoptext Thanks in advance, Stefan. PS: Additional question: Is it possible to integrate "option=color" into the "\definetyping[PAS]"? option={PAS,color}? ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________