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