From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96836 Path: news.gmane.org!.POSTED!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Re: Nested modes and itemizations Date: Fri, 18 Nov 2016 07:33:29 +0000 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8807223140051886834==" X-Trace: blaine.gmane.org 1479454442 7281 195.159.176.226 (18 Nov 2016 07:34:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 07:34:02 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 18 08:33:58 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7dgL-0001T5-Vx for gctc-ntg-context-518@m.gmane.org; Fri, 18 Nov 2016 08:33:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7CAF41E7EB; Fri, 18 Nov 2016 08:33:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Gghpw7Bxtah; Fri, 18 Nov 2016 08:33:52 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id B77C11E7EF; Fri, 18 Nov 2016 08:33:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1E19C1E7EB for ; Fri, 18 Nov 2016 08:33:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6OQyMFSmd2Ec for ; Fri, 18 Nov 2016 08:33:51 +0100 (CET) Original-Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id F2F8E1E7EA for ; Fri, 18 Nov 2016 08:33:40 +0100 (CET) Original-Received: by mail-wm0-f53.google.com with SMTP id a197so19777666wmd.0 for ; Thu, 17 Nov 2016 23:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=nSm0ckQe8wjOa9bmzGLkFTB71g1Vln82cMuvAYTUwg0=; b=s7o9Qy1LgCoUVJF7j+IYmghgFtQLlJ21PCKLUt1b7Tk+vpZ+OuyyUe7LCQu5sgD2hM E4Wj4TyhuU5fEfGgBskT+N7MxekDCh8uBKMsaMFPCw5adOGUvfZAnbS4sCdIkSBH98Dv vUbAjdIz0E/+SdEDSefqtUgU1w+LcwcdxkAennon0TkF6BSlZBvIm7FfTHwI6Xv5Qweu Z0HYVbKZ8UEpUnomlQvSSMk+jteVajMyUjxpFjEDhhQkOCnCmdiMXEYC9BPG4dWDTlAA UsKj8syS6BmM6K6SJGWR3EOiZem3hujzEzJJc6KtGbTtODz7d2pZFHWXiPQdiql6CDn7 k1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=nSm0ckQe8wjOa9bmzGLkFTB71g1Vln82cMuvAYTUwg0=; b=aJ7yJKKzJv9kXoViBD2NIJqqSWMojh/PzsRhpNKE7CKywC4oRs6SN53Rc5qlfLH/6i xVPVWX42YCqZKlE4uQU3nyXwtGlUM28OWzbCCOSM1vw84dFH5KIU9ji27wW5FupoFMSC 8hsh1EN+XxPQ+hB2gJY8anFzpgGKJMQV5tQlghniAJhWk/01Hv74Fxi+HyVmytYzbqjI Xyv6EsdACCpT3kZ918CCBu52aP1fQrOzhCpoMFhBfLx4uYJFV2AII4vFhFhSekqJyaqZ 2buY8m5nDcTRgWybkAEEAloOiBCbH9bJFMlG7s+aU82xg1tbWe5vTmhwdcUZHmoeQ6Hm orzg== X-Gm-Message-State: ABUngvekK7i4W9kFLllYltgltpiHZlgHWe8MuyGes2uoILHlNBwCpPuqzjK6k57ZTC81JZtK6OmR3C6W7njjRA== X-Received: by 10.28.111.138 with SMTP id c10mr19891547wmi.135.1479454420391; Thu, 17 Nov 2016 23:33:40 -0800 (PST) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:96836 Archived-At: --===============8807223140051886834== Content-Type: multipart/alternative; boundary=001a1147cdf4305bed05418e53d6 --001a1147cdf4305bed05418e53d6 Content-Type: text/plain; charset=UTF-8 On Thu, Nov 17, 2016 at 13:14:49 +0100 Hans Hagen 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 --001a1147cdf4305bed05418e53d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu= , Nov 17, 2016 at 13:14:49 +0100=C2=A0Hans Hagen <pragma@wxs.nl>=C2= =A0wrote:

On 11/17/2016 11:21 AM, Christoph Reller wrote:
> Hi,
>
> I have the following minimal not-working example:
>
> \starttext
> \startitemize
> \item One
>=C2=A0 =C2=A0\startmode[modeA]
>=C2=A0 =C2=A0\item Two
>=C2=A0 =C2=A0 =C2=A0\startitemize
>=C2=A0 =C2=A0 =C2=A0 =C2=A0\startmode[modeB] % <- this
>=C2=A0 =C2=A0 =C2=A0 =C2=A0\item Two A=C2=A0 =C2=A0 =C2=A0 =C2=A0% <= - does
>=C2=A0 =C2=A0 =C2=A0 =C2=A0\stopmode=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0%= <- not work
>=C2=A0 =C2=A0 =C2=A0 =C2=A0% \doifmode{modeB}{\item Two A} % <- this= works
>=C2=A0 =C2=A0 =C2=A0\item Two B
>=C2=A0 =C2=A0 =C2=A0\stopitemize
>=C2=A0 =C2=A0\stopmode
> \stopitemize
> \stoptext
>
> Note that both modeA and modeB are not defined and hence not enabled.<= br class=3D"gmail_msg"> > When compiled with the latest version of ConTeXt MkIV, I get: Missing<= br class=3D"gmail_msg"> > 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.

=C2=A0
Oh, of cours= e! Thank you and sorry for the noise.
Christoph
--001a1147cdf4305bed05418e53d6-- --===============8807223140051886834== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8807223140051886834==--