From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107656 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jan Willem Flamma Newsgroups: gmane.comp.tex.context Subject: Re: start/stop executed conditionally on mode ? Date: Wed, 10 Jun 2020 08:42:56 +0200 Message-ID: References: , Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0076583190458472355==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21333"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jun 10 08:43:33 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jiuSS-0005Rv-Un for gctc-ntg-context-518@m.gmane-mx.org; Wed, 10 Jun 2020 08:43:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 46F5C184A1A; Wed, 10 Jun 2020 08:43:00 +0200 (CEST) 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 Zr53eOG62QCm; Wed, 10 Jun 2020 08:42:59 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5EA56184A93; Wed, 10 Jun 2020 08:42:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3FC2C184A68 for ; Wed, 10 Jun 2020 08:42:58 +0200 (CEST) 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 5TCbfU7fqulZ for ; Wed, 10 Jun 2020 08:42:57 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.46; helo=mail-ed1-f46.google.com; envelope-from=register12c@gmail.com; receiver= Original-Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 58119184A1A for ; Wed, 10 Jun 2020 08:42:57 +0200 (CEST) Original-Received: by mail-ed1-f46.google.com with SMTP id k8so574311edq.4 for ; Tue, 09 Jun 2020 23:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:from:subject:thread-topic:in-reply-to:message-id :references:to:content-transfer-encoding; bh=UXkJyp0ugQApmozRTEiAMs1Y9tbL5CF0m6dQzMXik2I=; b=hQL0XuUom14gUo1MsDttHY4Fi9yITEV+i4xnc9NjZZ2t1vBSOUN0kgIlp+ud1YI4jr xbNpLHN39D7zo0w8euPog21yY1JhX8qGhKZwH8AveEPePnCnbK+tOOrrrJZ4CXvekFws Ps5Qbw/lTfDgTDXCI7ejtfwQYfXMmVgDGNxpo3Vi9JU0U/Ojv83AsoPXDHf1dF4r+cut fql9NPJ3WhXVwvuWxU9WZIejTwL5V0LVxHsVPnbb3B87PlsOHHZfTkwwlc20Rw2bz5lB VxQOtooMVIndna5XH1Jnls1+kffMaC9M6WsqGd/xhBZK3u8rlkMvLOzsUgXvme9qBCji fl0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:from:subject:thread-topic :in-reply-to:message-id:references:to:content-transfer-encoding; bh=UXkJyp0ugQApmozRTEiAMs1Y9tbL5CF0m6dQzMXik2I=; b=eB5KdmQ2QpoiZ51LLb8hzFwQ8IAMfifn7efAmgXBTuPho0D+28dYaMu8wcO87JtOpZ zsiTwR94S6/usjZtN4pyIbu3boyShL+OMPAV3JKMr23HZKps7dI1wug+m8TOskSBaFlQ IjxRkMH5LzCe+JenMS4t+LCatjEjNTzUaiTLt5igBzUrhVouwPUqFHa17VT1lPmutM6z +H4XZhvlM1XZ1JBaceCt9FE8Qhno+aNShxOe4A1ecCGNuYE8UVLMZVyTwzMw9kMcJaIc 8Vu/Mfz828dlTIYIdOPC3t7COVpvowCuoZcgA8MgGKqsL3PQvKXITdfkOqoso13q2W6L eQzA== X-Gm-Message-State: AOAM530K8uovpCQbtsb6TubsYvMdoMxXJeIJb43tf2evr7xP/XfuS3OU HI065CiP3VCj+PVPnFiCvRNWFE/TSAU= X-Google-Smtp-Source: ABdhPJwTMPDAZJRP1x6SYmMny1TJrif3BIWHpZW//f/IFvlhtxbHxrfPJuRSfkRddL6/kBYneuOdIw== X-Received: by 2002:a50:fe0d:: with SMTP id f13mr1261755edt.204.1591771376606; Tue, 09 Jun 2020 23:42:56 -0700 (PDT) Original-Received: from smtp.gmail.com ([2001:984:3852:1:50f9:dba:9d6f:7053]) by smtp.gmail.com with ESMTPSA id j16sm16596573edp.35.2020.06.09.23.42.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2020 23:42:56 -0700 (PDT) Thread-Topic: RE: [NTG-context] start/stop executed conditionally on mode ? In-Reply-To: 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.io gmane.comp.tex.context:107656 Archived-At: --===============0076583190458472355== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Dear list,

 

I have seen the use of bloc= ks mechanism with and without a start/stop combination.

 

It is not clear to me in which cases it = is required to also include a start/stop combination in this mechanism.

 =

\beginquestion

\startquestion

Question A<= /span>

\stopquestion<= /span>

\endquestion

\beginanswer

\startanswer

Answer A

\stopanswer

=

\endanswer

 

Regards,

Jan Willem Flamma

 

 

From: Hans Ha= gen
Sent: Tuesday, 9 June 2020 09:37
To: mailing list for ConTeXt users; Fabrice L
Subject: Re: [NTG-c= ontext] start/stop executed conditionally on mode ?

 

On 6/8/2020 9:53 PM, Fabri= ce L wrote:

>

>

=

>> Le 7 juin 2020 =C3=A0 23:19, Aditya Mahajan &= lt;adityam@umich.edu

>> <mailto:adityam@u= mich.edu>> a =C3=A9crit :

>> =

>> On Sun, 7 Jun 2020, Fabrice L wrote= :

>> 

>>> Dear List,

>>> 

>>> I would like to insert a page usin= g (ideally) start/stop

>>> instructions. = The problem is that this page should be inserted only

>>> in a certain mode. Consulting the mailing list, I thought = the

>>> following code was working, but i= t=E2=80=99s not ! The code is executed in

>>= > the mode as expected, but the following instructions ("Some other=

>>> text... =C2=BB in the exemple) is no= t typeset.

>>> 

>>> Here is a minimal (not working!) example:

>>> 

>= ;>> % =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94

>>> \= unexpanded\def\StartQuestionsList{

>>> \st= artmode[ClassRoom]  \page[yes] Here are some questions: \blank

>>> }

>>> \unexp= anded\def\StopQuestionsList{

>>> \page[yes= ] \stopmode

>>> }

= >>> \definestartstop[Questions][

>>&= gt; before=3D\StartQuestionsList,

>>> afte= r=3D\StopQuestionsList

>>> ]

>>> 

>>= > 

>>> \startQuestions<= /p>

>>> Question A=E2=80=A6.

>>> Question B=E2=80=A6.

>>&g= t; \stopQuestions

>>> 

=

>>> Some other text...

>>> % =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94

One of t= he oldest mechanism available ... blocks:

&nbs= p;

\enablemode[classroom] % comment this

<= p class=3DMsoNormal> 

\defineblock[= Question]

 

\doifmode {classroom} {

=C2=A0=C2=A0=C2=A0=C2=A0 \= keepblocks[Question]

}

 

\starttext

 

=C2=A0=C2=A0=C2=A0=C2=A0 Text A

=

 

=C2=A0=C2=A0= =C2=A0=C2=A0 \beginQuestion

=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 Question A=E2=80=A6.

= =C2=A0=C2=A0=C2=A0=C2=A0 \endQuestion

 

=C2=A0 =C2=A0=C2=A0=C2=A0Text B

 

=C2=A0=C2=A0=C2=A0=C2= =A0 \beginQuestion

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 Question B=E2=80=A6.

=C2=A0=C2= =A0=C2=A0=C2=A0 \endQuestion

 

<= p class=3DMsoNormal>=C2=A0=C2=A0=C2=A0=C2=A0 \page

=  

=C2=A0=C2=A0=C2=A0=C2=A0 \doifnot= mode {classroom} {

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \useblocks[Question]

=C2=A0=C2= =A0=C2=A0=C2=A0 }

 

\stoptext

 

-----------------------------------------------------------------=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Hans Hagen | PRAGMA = ADE

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Ridderstraat 27 | 8061 GH Hasselt |= The Netherlands

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

---------------------------------------------------------= --------

__________________________________________= _________________________________________

If your q= uestion is of interest to others as well, please add an entry to the Wiki!<= /p>

 

maillist = : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context

webpage=C2=A0 : http://www.pragma-ade.nl / http://contex= t.aanhet.net

archive=C2=A0 : https://bitbucket.org/= phg/context-mirror/commits/

wiki=C2=A0=C2=A0=C2=A0= =C2=A0 : http://contextgarden.net

_________________= __________________________________________________________________

 

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