From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100442 Path: news.gmane.org!.POSTED!not-for-mail From: "John Culleton" Newsgroups: gmane.comp.tex.context Subject: Re: Questions about \starttext Date: Mon, 2 Apr 2018 15:02:09 -0700 Message-ID: References: <20180320113810.GA11776@akela.mendelu.cz> <5AC278E4.5090802@gmail.com> Reply-To: sales@wexfordpress.com, mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8206301696474323385==" X-Trace: blaine.gmane.org 1522706458 2609 195.159.176.226 (2 Apr 2018 22:00:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 22:00:58 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 03 00:00:54 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 1f37VV-0000We-6B for gctc-ntg-context-518@m.gmane.org; Tue, 03 Apr 2018 00:00:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6E8355C9C94; Tue, 3 Apr 2018 00:02:41 +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 RKCpjj6UZ_Au; Tue, 3 Apr 2018 00:02:40 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id CBC295C9C97; Tue, 3 Apr 2018 00:02:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D73AD5C9C97 for ; Tue, 3 Apr 2018 00:02:37 +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 kyz3sbMbiEiB for ; Tue, 3 Apr 2018 00:02:36 +0200 (CEST) Original-Received: from dpmailmta01.doteasy.com (dpmailmta01-28.doteasy.com [65.61.219.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 533925C9C94 for ; Tue, 3 Apr 2018 00:02:25 +0200 (CEST) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=192.168.101.83; Original-Received: from dpmailrp03.doteasy.com (unverified [192.168.101.83]) by dpmailmta01.doteasy.com (DEO) with ESMTP id 26173701-1394429 for ; Mon, 02 Apr 2018 15:02:23 -0700 Original-Received: from dpsmartmail45.doteasy.com (dpsmartmail45.doteasy.com [192.168.101.45]) by dpmailrp03.doteasy.com (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id w32M2MPx006348 for ; Mon, 2 Apr 2018 15:02:23 -0700 X-SmarterMail-Authenticated-As: sales@wexfordpress.com Original-Received: by dpmail104.doteasy.com via HTTP; Mon, 2 Apr 2018 15:02:09 -0700 X-X-Originating-IP: [69.143.255.9] In-Reply-To: <5AC278E4.5090802@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: base:default, @@RPTN) X-CanIt-Geo: No geolocation information available for 192.168.101.45 X-CanItPRO-Stream: base:default X-Canit-Stats-ID: 01Vty2mw9 - 5fc010a7e110 - 20180402 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.168.101.83 X-Originating-IP: 192.168.101.83 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:100442 Archived-At: This is a multipart message in MIME format. --===============8206301696474323385== Content-Type: multipart/alternative; boundary=09bcf9667d8c43fb83a852c4db9ec973 This is a multipart message in MIME format. --09bcf9667d8c43fb83a852c4db9ec973 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable A reasonable approach to a Context file includes preliminary information be= fore the first printed page. My basic master file looks like this : \input variables.tex\relax \input layout.tex\relax \input macros.tex\relax \input fonts.tex\relax \starttext\relax %\showlayout \startfrontmatter \input half.tex\relax \startstandardmakeup \null \stopstandardmakeup \input title.tex\relax \input copy.tex\relax \input ded.tex\relax \input contents.tex\relax \input preface.tex\relax %\startstandardmakeup \relax %\null \relax %\stopstandardmakeup \relax \stopfrontmatter \startbodymatter \input body3.tex\relax \stopbodymatter\relax \startbackmatter\relax \input bib.tex\relax \input notes.tex \input index.tex \stopbackmatter \stoptext\relax By loading my usual macros in the macros file, standard items like author'= s name in a variables file and so on I save much time, typing and errors. ---------------------------------------- From: "Wolfgang Schuster" Sent: Monday, April 2, 2018 2:41 PM To: "mailing list for ConTeXt users" Subject: Re: [NTG-context] Questions about \starttext Tomas Hala 20. M=E4rz 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 grou= p. Minimal example (tested on TL2015, TL2016, TL2017, current CTX from the Gar= den): \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 aft= er \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 \sta= rttext in its definition. The second interesting thing is that the unbalanced document is compile= d 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=3D"[...]/cont-en" --jobname=3D"test" = [...] --c:input=3D"./test.tex" [...] "cont-yes.mkiv" As you can see the luatex engine processes the file cont-yes.mkiv and not y= our document which put as argument to context. Your document is just read by cont-yes.mk= iv and at the end of the document ConTeXt inserts an extra \stoptext which is ignored whe= n 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 fon= ts untill \starttext. The reason for this is to is a gain in speed and you sav= e resources. You can test this by adding \setupbodyfont[modern] at the begin of your exa= mple. Wolfgang --09bcf9667d8c43fb83a852c4db9ec973 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =
A reasonable approach to a Context file includes preliminary informati= on before the first printed page. My basic master file looks like this :
 
 
 
\input variables.tex\relax
\input layout.tex\relax
\input macros.tex\relax
\input fonts.tex\relax
\starttext\relax
%\showlayout
\startfrontmatter
\input half.tex\relax
\startstandardmakeup
\null
\stopstandardmakeup
\input title.tex\relax
\input copy.tex\relax
\input ded.tex\relax
\input contents.tex\relax
\input preface.tex\relax
%\startstandardmakeup \relax
%\null           &nb= sp;     \relax
%\stopstandardmakeup  \relax
\stopfrontmatter
\startbodymatter
\input body3.tex\relax
\stopbodymatter\relax
\startbackmatter\relax
\input bib.tex\relax
\input notes.tex
\input index.tex
\stopbackmatter
\stoptext\relax
 
 
By loading my usual macros in the macros file, standard items like aut= hor's name in a variables file and so on I save much time,
typing and errors.
 
 
 
 

From: "Wolfgang Schuster" <schuster.wolfgang@gmail.com= >
Sent: Monday, April 2, 2018 2:41 PM
To: "mailing list for ConTeXt users" <ntg-context@ntg.n= l>
Subject: Re: [NTG-context] Questions about \starttext
 
 
20. M&aum= l;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 grou= p.

Minimal example (tested on TL2015, TL2016, TL2017, current CTX from the Gar= den):

\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 aft= er \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 \sta= rttext in its
definition.
 
The second interesting thing is that the unbalanced document is compil= ed 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=3D"[...]/con= t-en" --jobname=3D"test" [...] --c:input=3D"./test.tex&= quot; [...] "cont-yes.mkiv"


As you can see the luatex engine processes the file cont-yes.mkiv and not y= our document
which put as argument to context. Your document is just read by cont-yes.mk= iv and at the
end of the document ConTeXt inserts an extra \stoptext which is ignored whe= n 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 defau= lt fonts
untill \starttext. The reason for this is to is a gain in speed and you sav= e resources.

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


Wolfgang
 
--09bcf9667d8c43fb83a852c4db9ec973-- --===============8206301696474323385== 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 --===============8206301696474323385==--