ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Nested modes and itemizations
@ 2016-11-17 10:21 Christoph Reller
  2016-11-17 12:14 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Reller @ 2016-11-17 10:21 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]

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.

Cheers,
Christoph

[-- Attachment #1.2: Type: text/html, Size: 1118 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Nested modes and itemizations
  2016-11-17 10:21 Nested modes and itemizations Christoph Reller
@ 2016-11-17 12:14 ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2016-11-17 12:14 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Nested modes and itemizations
       [not found] <mailman.434.1479412367.2018.ntg-context@ntg.nl>
@ 2016-11-18  7:33 ` Christoph Reller
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Reller @ 2016-11-18  7:33 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1182 bytes --]

On Thu, Nov 17, 2016 at 13:14:49 +0100 Hans Hagen <pragma@wxs.nl> wrote:

>
> 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

[-- Attachment #1.2: Type: text/html, Size: 2386 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-18  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-17 10:21 Nested modes and itemizations Christoph Reller
2016-11-17 12:14 ` Hans Hagen
     [not found] <mailman.434.1479412367.2018.ntg-context@ntg.nl>
2016-11-18  7:33 ` Christoph Reller

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).