Re: [NTG-context] Nested modes and itemizations
On Thu, Nov 17, 2016 at 13:14:49 +0100 Hans Hagenwrote: > > On 11/17/2016 11:21 AM, Christoph Reller wrote: > > Hi, > > > > I have the following minimal not-working example: > > > > \starttext > > \startitemize > > \item One > > \startmode[modeA] > > \item Two > > \startitemize > > \startmode[modeB] % <- this > > \item Two A % <- does > > \stopmode % <- not work > > % \doifmode{modeB}{\item Two A} % <- this works > > \item Two B > > \stopitemize > > \stopmode > > \stopitemize > > \stoptext > > > > Note that both modeA and modeB are not defined and hence not enabled. > > When compiled with the latest version of ConTeXt MkIV, I get: Missing > > number, treated as zero. > > However, If I use the inline version \doifmode instead of the > > environment version \startmode \stopmode, then the example compiles > > without problem. > > > > I am afraid but this may be a bug. > > No, just the way tex parses, \stopmode is a delimiter so the inner > \stopmode ends the outer \startmode. > > Using the \doif variable doesn't have that problem. > > Oh, of course! Thank you and sorry for the noise. Christoph ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested modes and itemizations
On 11/17/2016 11:21 AM, Christoph Reller wrote: Hi, I have the following minimal not-working example: \starttext \startitemize \item One \startmode[modeA] \item Two \startitemize \startmode[modeB] % <- this \item Two A % <- does \stopmode % <- not work % \doifmode{modeB}{\item Two A} % <- this works \item Two B \stopitemize \stopmode \stopitemize \stoptext Note that both modeA and modeB are not defined and hence not enabled. When compiled with the latest version of ConTeXt MkIV, I get: Missing number, treated as zero. However, If I use the inline version \doifmode instead of the environment version \startmode \stopmode, then the example compiles without problem. I am afraid but this may be a bug. No, just the way tex parses, \stopmode is a delimiter so the inner \stopmode ends the outer \startmode. Using the \doif variable doesn't have that problem. - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] nested modes
Peter Münster wrote: Hello, Here is a problem with nested modes: \starttext no mode \startmode[mode1] mode1a \startmode[mode2] mode2 \stopmode mode1b % this is printed, but it should not \stopmode no mode \stoptext indeed, will never work, when nested use \startlocalmode or \doifmodeelse - 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___