Matthijs Kooijman wrote:
Hi all,
according to the wiki, and the current code, the arguments to \installprettytype should be uppercased. E.g.:
because want uppercase \startTEX \stopTEX \startMP \stopMP \startLUA \stopLUA
\installprettytype [PHP] [PHP]
Referring to them should be uppercased as well: \definetyping[PHP] [option=PHP]
defining indeed, as it is an instance, but option also accepts lowercase
However, the filename should be lowercase, e.g. pret-php.lua and the pretty printer should register itself in lowercase as well: buffers.newvisualizer("lua"). The first thing that happens to the arguments of installprettytype is to lowercase them, and every option= argument that points to a pretty printer is lowercased by setvisualizer in lua before being used.
indeed. as i don't like casing in filenames, and function names
If everything is lowercased, why do we still recommend the arguments to \installprettytype and option= to be uppercase? IMHO this makes things confusing when trying to understand which PHP refers to which php or PHP in the greater picture of things.
because they generate commands and it's quite valid to say \definetyping[myphp] etc
Why not recommend people to use lowercase identifiers instead, since we're changing everything into lowercase anyway? Or perhaps go a bit further and remove the lowercasing code alltogether, since I don't see any real gain. If the strings / filenames should just match exactly, things will get a lot more predictable?
actually, the advice is that user definitions use uppercase \definehead[MySection][section] etc, just to avoid clashes with built in commands Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------