From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/103549 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: Re: Modes and conditional part of the source Date: Fri, 1 Mar 2019 09:35:05 +0100 Message-ID: <44B5EF09-F0BD-4AA1-8030-2160A4D51D04@ziggo.nl> References: <236ff066-108c-273f-3ddc-8582fe57aa48@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: multipart/mixed; boundary="===============6405875012162857853==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="60052"; mail-complaints-to="usenet@blaine.gmane.org" To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 01 09:35:40 2019 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 esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gzddq-000FU3-1I for gctc-ntg-context-518@m.gmane.org; Fri, 01 Mar 2019 09:35:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 31DB2F6D6E; Fri, 1 Mar 2019 09:35:10 +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 cXFZKCbNefbW; Fri, 1 Mar 2019 09:35:08 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 61C81F6D70; Fri, 1 Mar 2019 09:35:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 33ECAF6D6E for ; Fri, 1 Mar 2019 09:35:07 +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 8qS8H1zkWE4C for ; Fri, 1 Mar 2019 09:35:06 +0100 (CET) Original-Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) (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 5BF5AF6D6C for ; Fri, 1 Mar 2019 09:35:06 +0100 (CET) Original-Received: from [212.54.42.137] (helo=smtp6.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1gzddK-0001Gm-4n; Fri, 01 Mar 2019 09:35:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=ziggo.nl; s=201809corplgsmtpnl; h=To:Subject:Date:Mime-Version:Message-Id:From; bh=DXquUJP0yy6QxAWUP886EZJTOB9a6lBb9peaRM/p7+Y=; b=EVdvAbYlK/exqVGWZL4pm0Lmjj VJoYc42c1kD9mD2VDQw6Ah6L9JeuDwEk0bHLb8KM2BOlqN9cSO4+QsOB92gl291Ii9DDo4ySIefr0 HCekc5b5WgMCMPbZJySsXmk9c6M4ahZ7RsiWF3xdtlrp5yvWPrKACk9gX6P8YfuEgRP8pxnYdO1Xk ZfONUcIOjOrG7JhvQ/rCQBTwkyNy4LKijn7MhLQMIJMp3xliT1+ty6/XOg2RrsoSqbith+h6kBl+C Nv7Dk7uXqs/WjOEUAZEl+y3yyF9mR+CcxbAhc5/kDGYUPZ0M2VE67BUBJcfk7L2PQ8niC03NHV/K5 Vug7h1ig==; Original-Received: from 546a86c8.cm-12-3c.dynamic.ziggo.nl ([84.106.134.200] helo=[192.168.178.21]) by smtp6.tb.mail.iss.as9143.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1gzddK-0000lj-2A; Fri, 01 Mar 2019 09:35:06 +0100 In-Reply-To: <236ff066-108c-273f-3ddc-8582fe57aa48@xs4all.nl> X-Mailer: Apple Mail (2.3445.102.3) X-SourceIP: 84.106.134.200 X-Authenticated-Sender: havdmeer@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.3 cv=ENp4LGRC c=1 sm=1 tr=0 a=wCstmS+ZHA3zSJXjQC+ubA==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=NTGMnVQrEZIA:10 a=YEMqx4UAAAAA:8 a=Uows8UApAAAA:8 a=MiNTnEJAAAAA:8 a=ACQCx6kCAAAA:8 a=xtERp6CFAAAA:8 a=a3nu-2BBAAAA:8 a=iQq6F1q9DeHyWcY51jQA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=QEXdDO2ut3YA:10 a=taxF_qHP1M6HT1qW0M4A:9 a=dmYyZRv4D6uHbj5q:21 a=_W_S_7VecoQA:10 a=V0662LiR8DSfwiDagK97:22 a=oX0v64vK4IwbpfTCMRm2:22 a=LmrbSfiT3hecnSZifb5M:22 a=Sab0UneHBzlWrQDlOuxD:22 a=ekCXXmE-vB8RPiJ3MEZb:22 X-Ziggo-Spam-Status: No X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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:103549 Archived-At: --===============6405875012162857853== Content-Type: multipart/alternative; boundary="Apple-Mail=_9CC3B713-D2E1-4FBD-9A0F-7916CA39A7AA" --Apple-Mail=_9CC3B713-D2E1-4FBD-9A0F-7916CA39A7AA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I used \doifmode and friends for selection of mode dependent code. dr. Hans van der Meer > On 1 Mar 2019, at 01:24, Hans Hagen wrote: >=20 > On 2/28/2019 11:29 AM, Proch=C3=A1zka Luk=C3=A1=C5=A1 Ing. wrote: >> Hello, >> I'm struggling with using modes to make a part of the text = conditional. >> Here is my code: >> ---- >> \def\b#1{\startmode[#1]} >> \def\e{\stopmode} >> % \enablemode[100] % For optional usage >> \starttext >> A >> \b{100} % Should be start of some conditional text from here ... >> B >> \e % ... to here >> \stoptext >> ---- >> Compilation fails with: >> " >> tex error > tex error on line 0 in file : ! Emergency stop >> <*> cont-yes.mkiv >> >> *** (job aborted, no legal \end found) >> " >> How to make the sample work? > modes are like buffers ... don't wrap them in macros >=20 > (using names like \b \e is a bad idea anyway) >=20 > Hans >=20 >=20 > ----------------------------------------------------------------- > 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! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_9CC3B713-D2E1-4FBD-9A0F-7916CA39A7AA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I = used  \doifmode and friends for selection of mode dependent = code.

dr. Hans van der Meer


On 1 Mar 2019, at 01:24, Hans Hagen <j.hagen@xs4all.nl> = wrote:

On 2/28/2019 11:29 AM, Proch=C3=A1zka Luk=C3=A1=C5=A1 Ing. = wrote:
Hello,
I'm struggling with using modes to make a part of the text = conditional.
Here is my code:
----
\def\b#1{\startmode[#1]}
\def\e{\stopmode}
% \enablemode[100] % For optional usage
\starttext
  A
  = \b{100} % Should be start of some conditional text from here ...
    B
  \e % ... to = here
\stoptext
----
Compilation = fails with:
"
tex = error       > tex error on line 0 in = file : ! Emergency stop
<*> cont-yes.mkiv
<empty file>
*** (job aborted, no legal = \end found)
"
How to make the sample = work?
modes are like buffers ... don't wrap = them in macros

(using names like \b \e is a = bad idea anyway)

Hans


---------------------------------------------------------------= --
=             &n= bsp;           &nbs= p;            =     Hans Hagen | PRAGMA ADE
=             &n= bsp;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
_______________________________________________________________= ____________________

= --Apple-Mail=_9CC3B713-D2E1-4FBD-9A0F-7916CA39A7AA-- --===============6405875012162857853== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6405875012162857853==--