[NTG-context] Re: Wrapping \type{}
Nikolai Weibull
ntg-context@ntg.nl
Tue, 1 Jun 2004 23:24:23 +0200
* Hans Hagen <pragma@wxs.nl> [Jun 01, 2004 21:20]:
> \definestartstop[BNF][before=\startlines\setups{myBNF},after=\stoplines]
>
> \startsetups[myBNF]
> \defineactivecharacter "
> {\bgroup\tttf\setupinlineverbatim\defineactivecharacter " {\egroup}}
> \defineactivecharacter < {\mathematics{\string<}}
> \defineactivecharacter > {\mathematics{\string>}}
> \stopsetups
>
> \starttext
>
> \startBNF
> <regex>: <branch> ; <branch>, "|", <regex>.
> \stopBNF
>
> \stoptext
>
> (cross your fingers that this does not interfere with reading files, but
> normally < > " are taken care of)
It actually worked! Thank you so much for the example. I'll probably
rewrite my module a bit to work more like your example above actually,
but it even worked in the context of my module. Wow, this really saved
my ass.
> an alternative is to write a plugin forthe verbatim environment (see
> verb-ini to get an idea of what nasty things are involved with catcode
> changes).
Yeah, I was thinking of that actually, but didn't realize it as a
possibility until I'd written a lot of code...guess I should rethink
now.
Thank you Hans,
nikolai
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}