[NTG-context] doifnextcharelse

2016-01-24 Thread dr. Hans van der Meer
I would like to differentiate on the following character being one of X or not X. But cannot get it right in \doifnextcharelse. For example \def\mynextchar{\doifnextcharelse{X}{\def\Next{Y}}{\def\Next{Z}}\Next} delivers: ZX ZQ then input: \mynextchar X \mynextchar Q I hoped for YX ZQ, but it

Re: [NTG-context] doifnextcharelse

2016-01-24 Thread Pablo Rodriguez
On 01/24/2016 02:30 PM, dr. Hans van der Meer wrote: > I would like to differentiate on the following character being one of X or > not X. > But cannot get it right in \doifnextcharelse. > > For example > \def\mynextchar{\doifnextcharelse{X}{\def\Next{Y}}{\def\Next{Z}}\Next} > delivers: ZX ZQ

Re: [NTG-context] doifnextcharelse

2016-01-24 Thread Meer, Hans van der
Yes this works. But alas, the ultimate goal is to test against several characters and that seems impossible to do with standard ConTeXt api-macros.Let alone when these characters are . or . or ) etc. Hans van der Meer met vriendelijke groet Hans van der Meer > On 24 Jan 2016, at 15:13,

Re: [NTG-context] doifnextcharelse

2016-01-24 Thread Meer, Hans van der
Is it impossible to test on a blank with something alike \doifnextcharelse ? The implementation in the source skips blanks, but what if that is one doesn't want? For example to distinguish between "\abc \def" and \abc\def"? Hans van der Meer

Re: [NTG-context] doifnextcharelse

2016-01-24 Thread Wolfgang Schuster
Meer, Hans van der 24. Januar 2016 um 15:58 Yes this works. But alas, the ultimate goal is to test against several characters and that seems impossible to do with standard ConTeXt api-macros.Let alone when these characters are . or . or ) etc. \startluacode

Re: [NTG-context] \doifnextcharelse problem

2004-02-27 Thread Hans Hagen
At 20:05 26/02/2004, you wrote: commands CamelCased? For third party extensions: - low level: \BNFsomething - high level: whatever you want (often the start/setup will not clash that much, maybe we need to setup a registration system) for macros in documents: - \CamelCased is fine

Re: [NTG-context] \doifnextcharelse problem

2004-02-26 Thread Hans Hagen
At 17:38 26/02/2004, you wrote: which case the first character in the body of the command is checked \doifnextcharelse[... which thus fails but in some manner eats it (even tricky indeed (will think about it) go the etex way: \definecomplexorsimpleempty\startbnfgrammar

Re: [NTG-context] \doifnextcharelse problem

2004-02-26 Thread Nikolai Weibull
* Hans Hagen [EMAIL PROTECTED] [Feb 26, 2004 19:10]: go the etex way: great! thanks, that worked. no % are needed after a \cs: hm, OK. This is a good reason why it would be good to have a tex programming reference, so that one'd know when it's necessary and when it's not. I assume that