From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100441 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Questions about \starttext Date: Mon, 02 Apr 2018 20:39:32 +0200 Message-ID: <5AC278E4.5090802@gmail.com> References: <20180320113810.GA11776@akela.mendelu.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0762073353795546545==" X-Trace: blaine.gmane.org 1522694283 17653 195.159.176.226 (2 Apr 2018 18:38:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 18:38:03 +0000 (UTC) User-Agent: Postbox 5.0.24 (Macintosh/20180302) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 02 20:37:59 2018 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 1f34L9-0004Uu-BD for gctc-ntg-context-518@m.gmane.org; Mon, 02 Apr 2018 20:37:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id AB9F15C95B8; Mon, 2 Apr 2018 20:39:47 +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 6wuThMNgrnUa; Mon, 2 Apr 2018 20:39:46 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E22B55C9578; Mon, 2 Apr 2018 20:39:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 62CA55C9578 for ; Mon, 2 Apr 2018 20:39:46 +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 FfWHYoUjwQpX for ; Mon, 2 Apr 2018 20:39:45 +0200 (CEST) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (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 DDC975C934F for ; Mon, 2 Apr 2018 20:39:35 +0200 (CEST) Original-Received: by mail-wm0-f48.google.com with SMTP id f125so29103878wme.4 for ; Mon, 02 Apr 2018 11:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to; bh=RQShMj/PAS2ju0TaQj2kkeBY1OqLVuCndaNi6reGo80=; b=WbtIajwT6jbTRYX+dVMipVXJshYn09frvBMtB6+pXJLDRk+nmFwHTmTHq1qLFdndrw pAfTsEqa2kVWyEAnYWab79U030RslGA+2+kWkFN1/T0O6YF9eEvas4FeLx2mPl8JPEvN 20DepZwncPh6gqvLFHnQlMDb3DA5p1ED+ta4dHyRDcr7QL5rJfyylAeoy+cc/q9tanFi /x0O28cX50EDkMYUNUNj7i+xOIfRzQAyFlUKNpQeztoYgVREPzsgVpf6trHz/zI3qW+f 0cZ6FtlJzJrqWLbPfm2LzRd8zaojjGETILIIcKmuEDsJaQ293MgBDL3Wavqfg1+sO/iJ arzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to; bh=RQShMj/PAS2ju0TaQj2kkeBY1OqLVuCndaNi6reGo80=; b=rdH5WeVDGxZmTj1t70KwNNk6mC3OrX2ethCAa38Vols0N9phwINuPtlHr2MYqlPW0L CbDYICt6jVhJvP9iSXyB/FWIFhfCi5A2FBwNMzuyfyzl54a5vozKDmf4tVjhCI90Xo+x tBe3qx8omOFfuleOQD09QIyFKH1ZyfDvEVM3YCUhvGtz2SmWFIsGJ12Kb8qlBrVs+9xc GgJ5qK81rvYkpBtC6CS9+EUVuve0P9fqZ40ISeGTKCXM5xTlZ21ib4YXfMVuPGv9QtVC KZ8/RVvpXZH7WZQf5V6rKMJs2Ml3WQkew+DTehXzUWNHm7neJVb3mVHpDuQlbzLc6bkW yP7Q== X-Gm-Message-State: AElRT7GjO4zZ1a8g40EA431QXK+rkDu/UmOaDIQoe8J5E3d5ljJAdh/Q z2SW3JMZ7rIa22FPZj49Jk690UN0 X-Google-Smtp-Source: AIpwx4+Ej9PzSSl+bw/5Kl8sOUnRdjg4Dnd0+VBzmMwq6eONYcN5ciLc2d87xcTAKyu5ESoysD/DiQ== X-Received: by 10.80.135.202 with SMTP id 10mr13689681edz.1.1522694375219; Mon, 02 Apr 2018 11:39:35 -0700 (PDT) Original-Received: from [192.168.1.11] (x4dbe3d32.dyn.telefonica.de. [77.190.61.50]) by smtp.gmail.com with ESMTPSA id j36sm646715ede.97.2018.04.02.11.39.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 11:39:34 -0700 (PDT) In-Reply-To: <20180320113810.GA11776@akela.mendelu.cz> 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:100441 Archived-At: This is a multi-part message in MIME format. --===============0762073353795546545== Content-Type: multipart/alternative; boundary="------------090709080904010306030504" This is a multi-part message in MIME format. --------------090709080904010306030504 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Tomas Hala > 20. März 2018 um 12:43 > Hi all, > > doing some tests I discovered two interesting facts. > > The first is that commands \starttext and \stoptext do not behave as a > group. > > Minimal example (tested on TL2015, TL2016, TL2017, current CTX from > the Garden): > > \starttext > text > \starttext > \bf text > \stoptext > text % this text is in bold, too. > \stoptext > > Is this the expected behaviour, or not? Opening a group with \starttext makes no sense because there is nothing after \stoptext. The possibility to nest \starttext is necessary when you \startproduct etc. where components can be be documents on its own and this means \startcomponent includes \starttext in its definition. > The second interesting thing is that the unbalanced document is > compiled without protests: > > Minimal example #1 (tested on TL2015, TL2016, TL2017, current CTX from > the Garden): > > \starttext > text % in this case, the "text" is shipped out Take a look at the command line when you process a file and you should see something like this: mtx-context | run 1: luatex --fmt="[...]/cont-en" --jobname="test" [...] --c:input="./test.tex" [...] "cont-yes.mkiv" As you can see the luatex engine processes the file cont-yes.mkiv and not your document which put as argument to context. Your document is just read by cont-yes.mkiv and at the end of the document ConTeXt inserts an extra \stoptext which is ignored when your document is valid (equal number of \starttext and \stoptext). > Minimal example #2 (tested on TL2015, TL2016, TL2017, current CTX from > the Garden): > > text % in this case, the "text" is not shipped out > \stoptext The reason why no text appears is that ConTeXt doesn’t load the default fonts untill \starttext. The reason for this is to is a gain in speed and you save resources. You can test this by adding \setupbodyfont[modern] at the begin of your example. Wolfgang --------------090709080904010306030504 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

20. März 2018 um 12:43
Hi all,

doing some tests I discovered two interesting facts.

The first is that commands \starttext and \stoptext do not behave as a group.

Minimal example (tested on TL2015, TL2016, TL2017, current CTX from the Garden):

\starttext
text
\starttext
\bf text
\stoptext
text % this text is in bold, too.
\stoptext

Is this the expected behaviour, or not?

Opening a group with \starttext makes no sense because there is nothing after \stoptext.

The possibility to nest \starttext is necessary when you \startproduct etc. where components
can be be documents on its own and this means \startcomponent includes \starttext in its
definition.

The second interesting thing is that the unbalanced document is compiled without protests:

Minimal example #1 (tested on TL2015, TL2016, TL2017, current CTX from the Garden):

\starttext
text % in this case, the "text" is shipped out

Take a look at the command line when you process a file and you should see something like this:

mtx-context     | run 1: luatex --fmt="[...]/cont-en" --jobname="test" [...] --c:input="./test.tex" [...] "cont-yes.mkiv"


As you can see the luatex engine processes the file cont-yes.mkiv and not your document
which put as argument to context. Your document is just read by cont-yes.mkiv and at the
end of the document ConTeXt inserts an extra \stoptext which is ignored when your document
is valid (equal number of \starttext and \stoptext).

Minimal example #2 (tested on TL2015, TL2016, TL2017, current CTX from the Garden):

text % in this case, the "text" is not shipped out
\stoptext

The reason why no text appears is that ConTeXt doesn’t load the default fonts
untill \starttext. The reason for this is to is a gain in speed and you save resources.

You can test this by adding \setupbodyfont[modern] at the begin of your example.


Wolfgang
--------------090709080904010306030504-- --===============0762073353795546545== 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 --===============0762073353795546545==--