From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116469 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Denis Maier via ntg-context Newsgroups: gmane.comp.tex.context Subject: Do environment files add implicit \starttext ... \stopttext Date: Tue, 15 Nov 2022 12:22:06 +0000 Message-ID: <406fe736fe764a359a33ea605652b8cb@unibe.ch> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3672666294163911406==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11025"; mail-complaints-to="usenet@ciao.gmane.io" Cc: denis.maier@unibe.ch To: Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 15 13:23:00 2022 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 1ouuxu-0002bJ-05 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 15 Nov 2022 13:22:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F073F2A46BB; Tue, 15 Nov 2022 13:22:12 +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 FjLcRJ1JTs4z; Tue, 15 Nov 2022 13:22:10 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 80A702A4AD7; Tue, 15 Nov 2022 13:22:10 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7F2F72A4ACE for ; Tue, 15 Nov 2022 13:22:09 +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 tw8eHeWBZU24 for ; Tue, 15 Nov 2022 13:22:08 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=130.92.0.84; helo=mailhub-lb3.unibe.ch; envelope-from=denis.maier@unibe.ch; receiver= Original-Received: from mailhub-lb3.unibe.ch (mailhub-lb3.unibe.ch [130.92.0.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 716DD2A46BB for ; Tue, 15 Nov 2022 13:22:08 +0100 (CET) X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-01.campus.unibe.ch [130.92.13.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb3.unibe.ch (Postfix) with ESMTPS id D11D7500091 for ; Tue, 15 Nov 2022 13:22:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unibe.ch; s=mgwsel1; t=1668514926; bh=l7YN+kGLsxKVOEUnHewUPcZkGhCKTV8Eea37yvuOrrM=; h=From:To:Subject:Date:From; b=GSYfOtE40e2Th/8f+f29havK7lAKVvB7uUO4kn7gCXQrY7w4ZSgmJX0FItaNHks41 jJasRn96v9KOg2oPkZlb67ET2ylTz53reN0eag8vq4smK3YdNifGeqXAuviPWBYVPe QEf77HIi7VrfMBl3UcFFr6h2vNF5V0ENqNdiJdZqfzx8lQ5yZql01667pF/Qi4075r 8xtRXWb7a3XDuBf3q0FsYOa7EbnzWUxDRMzAIpahiSdzcqtnIxUQxE6MomJNFF+ACY n162OtSblyNlpsESQqYVUtli57HBvSq9SKLXKV8VfHnsZIv7ZzibYtG2x7zKNCqVKn cpCAMzu1l6J2w== Original-Received: from aai-mail-03.campus.unibe.ch (130.92.13.41) by AAI-EDGE-01.campus.unibe.ch (130.92.13.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.1.2507.16; Tue, 15 Nov 2022 13:21:59 +0100 Original-Received: from aai-mail-03.campus.unibe.ch (130.92.13.41) by aai-mail-03.campus.unibe.ch (130.92.13.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.1.2507.16; Tue, 15 Nov 2022 13:22:06 +0100 Original-Received: from aai-mail-03.campus.unibe.ch ([172.18.73.17]) by aai-mail-03.campus.unibe.ch ([172.18.73.17]) with mapi id 15.01.2507.016; Tue, 15 Nov 2022 13:22:06 +0100 Thread-Topic: Do environment files add implicit \starttext ... \stopttext Thread-Index: Adj465/b8T12r3RFQauo1YRFDOiWMg== Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [172.18.72.2] 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:116469 Archived-At: --===============3672666294163911406== Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_406fe736fe764a359a33ea605652b8cbunibech_" --_000_406fe736fe764a359a33ea605652b8cbunibech_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, if I process an XML buffer, I've noticed I need to wrap the \xmlprocessbuff= er in a \starttext ... \stoptext pair. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \startbuffer[test]

a paragraph of text

another paragraph of text

\stopbuffer \startxmlsetups xml:demo \xmlsetsetup{\xmldocument}{document|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:demo} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\endgraf \stopxmlsetups \starttext \xmlprocessbuffer{test}{test}{} \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% However, if I have the XML and the setups in dedicated files, there seems t= o be no need for \starttext ... \stoptext. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% text.xml

a paragraph of text

another paragraph of text

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setups.tex \startxmlsetups xml:demo \xmlsetsetup{\xmldocument}{document|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:demo} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\endgraf \stopxmlsetups %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Running context text.xml -environment=3Dsetups.tex gives me a proper PDF without errors. Therefore my question: Does the use -environment automatically wrap the processed file in \startte= xt ... stoptext ? If not, what's the reason for this behaviour? Am I missing something? Best, Denis --_000_406fe736fe764a359a33ea605652b8cbunibech_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

if I process an XML buffer, I’ve noticed I nee= d to wrap the \xmlprocessbuffer in a \starttext ... \stoptext pair.

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%

\startbuffer[test]

<?xml version=3D'1.0' standa= lone=3D'yes?>

<document>

<p>a paragraph of text<= ;/p>

<p>another paragraph of text</p>

</document>

\stopbuffer

 

\startxmlsetups xml:demo

\xmlsetsetup{\xmldocument}{document|p}{xml:*}

\stopxmlsetups

 

\xmlregistersetup{xml:demo}

 

\startxmlsetups xml:document

  \xmlflush{#1}

\stopxmlsetups

 

\startxmlsetups xml:p

  \xmlflush{#1}\endgraf

\stopxmlsetups

 

\starttext

  \xmlprocessbuffer{test}{test}{}

\stoptext

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%

 

However, if I have the XML and the setups in dedicat= ed files, there seems to be no need for \starttext ... \stoptext.

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%% text.xml

<?xml version=3D'1.0' standa= lone=3D'yes?>

<document>

<p>a paragraph of text<= ;/p>

<p>another paragraph of text</p>

</document>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setups.tex<= /o:p>

\startxmlsetups xml:demo

\xmlsetsetup{\xmldocument}{document|p}{xml:*}

\stopxmlsetups

 

\xmlregistersetup{xml:demo}

 

\startxmlsetups xml:document

  \xmlflush{#1}

\stopxmlsetups

 

\startxmlsetups xml:p

  \xmlflush{#1}\endgraf

\stopxmlsetups

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

Running

context text.xml –environ= ment=3Dsetups.tex

gives me a proper PDF without e= rrors.

 

Therefore my question:

Does the use –environment= automatically wrap the processed file in \starttext ... stoptext ?

 

If not, what’s the reason for this behaviour? = Am I missing something?

 

Best,

Denis

--_000_406fe736fe764a359a33ea605652b8cbunibech_-- --===============3672666294163911406== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3672666294163911406==--