From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116481 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Do environment files add implicit \starttext ... \stopttext Date: Wed, 16 Nov 2022 18:45:15 +0100 Message-ID: <7df97c4c-5c69-0754-cd03-896b6638381a@gmail.com> References: <406fe736fe764a359a33ea605652b8cb@unibe.ch> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7596298456173422702==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="847"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.58 Cc: Wolfgang Schuster To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 16 18:45:55 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 1ovMTy-000AYs-RQ for gctc-ntg-context-518@m.gmane-mx.org; Wed, 16 Nov 2022 18:45:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1E98E2A4C14; Wed, 16 Nov 2022 18:45:24 +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 jVHwDTGRRx79; Wed, 16 Nov 2022 18:45:21 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B6A362A4BDE; Wed, 16 Nov 2022 18:45:21 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5C0B12A4C13 for ; Wed, 16 Nov 2022 18:45:20 +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 OTOXQzUsQ914 for ; Wed, 16 Nov 2022 18:45:19 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.42; helo=mail-ej1-f42.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 DC2382A4BDE for ; Wed, 16 Nov 2022 18:45:18 +0100 (CET) Original-Received: by mail-ej1-f42.google.com with SMTP id t25so45885432ejb.8 for ; Wed, 16 Nov 2022 09:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:from:to:cc:subject:date :message-id:reply-to; bh=+ENVv80DeWYcRCq5XorvIGtCEKVqalpHhY7WDSGfD/k=; b=Gt3hNzGW67a7Wv9MaHNslf77QCYmGBlZ6IQl0iusvV8dO/eXvdlauuza5yi5SD4xoN eDf/KYxOHlQicmJ+L+74dbOxL6NFxdnNN7MU7rGhxMmXK3XYJiWmpxTUDGNonwhxxujG i25UEoPxScvsobVDecfXikgjlADq1UmMrC/gs4m6JKYOZs4RQjix4wtmmYOFqK8Cyi3S muy8hN9wuhzPNJIPcP8ol2Vk1AaK9XuBUcyFG9NNqXSZaJ4PfsUy3mDT47HpXLjVeWp+ 0r54VKWR14W9LQJmGlPk9Y19/0twa3NtEQt/a77QtYYey+Y9pwifkA4xvrYjqvlzTCxd IY1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+ENVv80DeWYcRCq5XorvIGtCEKVqalpHhY7WDSGfD/k=; b=ghIOWLqTUgQnJFZm01Wvl3T1hG77cSSo3xtpOjazXIRrM22ZWI4dxbSb8a9piyPrQy xAb5fKO4LXtW35yNaTjFR8cvh2LKYGIxk05k9lMSWftCyp/ydwh0cUCZu+7jkppQd0zU LiiTcjrNV7OpUGDSGU+J7uezdbBdsgJFxT2D7XF9WVib02ckuWjHhHJ908OZrgL6XkUR i7btyXd3RmHoMJu4RIvUH5yW+syx9hCK17D51/Hv1UcvSlXNkTcNvcjiCgArTvivm4A8 dHJr8eXvtZOhGJshoSRNeJh2SS8FWKKQ/3JFvjPMbeiXDMm3ksjxDKY9LKkQ+UfkWmYi eS5Q== X-Gm-Message-State: ANoB5pnhw3tDg47p0HPoZePxjQIuuEnLpRUAw8uiYPm1xutXOzLfZ9XQ L1Y/CvmxYFq4DIKybF3GzWXc2RGiNt0= X-Google-Smtp-Source: AA0mqf7xMwkKNP7JYcM9FqHKBFhq0Mm8R9c7Jcr0BdjeYIOVHO2C/j5i0BU5lPOYT8i4zqjqk0RiSw== X-Received: by 2002:a17:906:495:b0:7ae:9188:ddc2 with SMTP id f21-20020a170906049500b007ae9188ddc2mr18687478eja.647.1668620718569; Wed, 16 Nov 2022 09:45:18 -0800 (PST) Original-Received: from ?IPv6:2a02:810d:a8bf:fe08:9031:d000:bde6:7a1d? ([2a02:810d:a8bf:fe08:9031:d000:bde6:7a1d]) by smtp.gmail.com with ESMTPSA id p30-20020a056402501e00b004615f7495e0sm7869055eda.8.2022.11.16.09.45.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2022 09:45:18 -0800 (PST) In-Reply-To: <406fe736fe764a359a33ea605652b8cb@unibe.ch> Content-Language: en-US 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:116481 Archived-At: This is a multi-part message in MIME format. --===============7596298456173422702== Content-Type: multipart/alternative; boundary="------------64794B0580FE8D79FAA096BD" Content-Language: en-US This is a multi-part message in MIME format. --------------64794B0580FE8D79FAA096BD Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Denis Maier via ntg-context schrieb am 15.11.2022 um 13:22: > > Hi, > > if I process an XML buffer, I’ve noticed I need to wrap the > \xmlprocessbuffer in a \starttext ... \stoptext pair. > > [...] > > However, if I have the XML and the setups in dedicated files, there > seems to be no need for \starttext ... \stoptext. > > [...] > > Running > > context text.xml –environment=setups.tex > > gives me a proper PDF without errors. > > 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? > ConTeXt uses the file extension to decide who it should handle document, in your case the extension is xml and the file is processed as \starttext \xmlprocess{main}{...}{} \stoptext The same thing happens when you have CLD document and use cld as file extension. For more details you can look at the processjob function in cont-run.lmt. Wolfgang --------------64794B0580FE8D79FAA096BD Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Denis Maier via ntg-context schrieb am 15.11.2022 um 13:22:

Hi,

 

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

 

[...]

 

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

 

[...]

 

Running

context text.xml –environment=setups.tex

gives me a proper PDF without errors.

 

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?


ConTeXt uses the file extension to decide who it should handle document,
in your case the extension is xml and the file is processed as

\starttext
\xmlprocess{main}{...}{}
\stoptext

The same thing happens when you have CLD document and use cld as file extension.

For more details you can look at the processjob function in cont-run.lmt.

Wolfgang

--------------64794B0580FE8D79FAA096BD-- --===============7596298456173422702== 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== --===============7596298456173422702==--