ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Nikolai Weibull <context-list@pcppopper.org>
Subject: Re: Wrapping \type{}
Date: Tue, 1 Jun 2004 23:24:23 +0200	[thread overview]
Message-ID: <20040601212422.GA2739@puritan.pcp.ath.cx> (raw)
In-Reply-To: <6.1.1.1.2.20040601203125.07daf140@server-1>

* 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);}

  reply	other threads:[~2004-06-01 21:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-29 23:20 Nikolai Weibull
2004-06-01 18:33 ` Hans Hagen
2004-06-01 21:24   ` Nikolai Weibull [this message]
2004-06-23 11:40     ` Patrick Gundlach
2004-06-23 18:15       ` Nikolai Weibull
2004-12-02 14:27         ` BNF module (was: Wrapping \type{}) Patrick Gundlach
2004-12-02 14:43           ` Nikolai Weibull
2004-12-02 14:55             ` BNF module Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040601212422.GA2739@puritan.pcp.ath.cx \
    --to=context-list@pcppopper.org \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).