From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/32261 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Making a verbatim file for another language Date: Mon, 25 Dec 2006 11:38:44 +0100 Message-ID: <458FAA34.7030507@elvenkind.com> References: <58E326FC-9E9E-487E-A9D4-2CCA840F0E4D@mac.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167043142 28932 80.91.229.10 (25 Dec 2006 10:39:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2006 10:39:02 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 25 11:39:00 2006 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 dough.gmane.org with esmtp (Exim 4.50) id 1GynES-0000sn-Da for gctc-ntg-context-518@m.gmane.org; Mon, 25 Dec 2006 11:39:00 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1BDAF2009C; Mon, 25 Dec 2006 11:37:23 +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 08858-02-5; Mon, 25 Dec 2006 11:37:18 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 38FE32004A; Mon, 25 Dec 2006 11:37:18 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0E5D20056 for ; Mon, 25 Dec 2006 11:37:15 +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 08858-02-4 for ; Mon, 25 Dec 2006 11:37:08 +0100 (CET) Original-Received: from post-25.mail.nl.demon.net (post-25.mail.nl.demon.net [194.159.73.195]) by ronja.ntg.nl (Postfix) with SMTP id 749C820009 for ; Mon, 25 Dec 2006 11:37:08 +0100 (CET) Original-Received: from boo.demon.nl ([82.161.175.147]:38496 helo=[10.10.0.3]) by post-25.mail.nl.demon.net with esmtp (Exim 4.51) id 1GynEC-000BZX-JF for ntg-context@ntg.nl; Mon, 25 Dec 2006 10:38:44 +0000 User-Agent: Mozilla Thunderbird 1.0.6-7.6.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <58E326FC-9E9E-487E-A9D4-2CCA840F0E4D@mac.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:32261 Archived-At: cormullion@mac.com wrote: > I'm going to try to make a 'verbatim- module' (don't know what the > right word is) for another language. I've found: > > /usr/local/teTeX/share/texmf.tetex/tex/context/base/verb-pl.tex The syntax of your intended language is indeed similar to perl? There a few definition files already there, and you should start from the one that is closest to the language you want to define (especially wrt comment and string syntax). verb-c C verb-eif Eiffel verb-js JavaScript verb-jv Java verb-mp MetaPost & MetaFont verb-pas Pascal & Modula verb-pl Perl 5 verb-sql SQL verb-tex TeX verb-xml XML > and can probably have a go at making a version of this. Some > questions occur: > > 1: where should i put my file? Possibly the best place is: in the context distribution, but that depends a bit on what language it is, precisely (you can email me the completed file, in that case). Second best place: http://modules.contextgarden.net, so it can be included in cont-ext.zip (third-party addons that are distributed by Pragma-Ade alongside the normal distribution). Third best: The directory <$HOME/texmf/tex/context/base> (the place where your TeX installation finds local files, I do not immediately recall the name gwTeX uses). Final option: Same directory as the file to be processed > 2: do I have to do anything else to get Context to recognise and use it? Your file has to have a name like verb-xxxx.tex, with xxxx a lowercase short identifier (example: verb-php.tex), and then you have to use one or two commands to make ConTeXt use the file. First: \installprettytype [PHP] [PHP] This maps the command \starttyping[option=PHP] to verb-php.tex. The first argument is the option as passed to \starttyping, the second argument is an uppercase version of xxxx (thus allowing context to find the file), And you probably also want: \definetyping[PHP] [option=PHP] Because that allows \startPHP ... \stopPHP as a shortcut to \setuptyping[option=PHP] Good luck, Taco