From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 7236A27FEF for ; Tue, 4 Jun 2024 21:28:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 76470484D5A for ; Tue, 4 Jun 2024 21:28:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=edenhauser.net Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mtcbeFdZhFsK for ; Tue, 4 Jun 2024 21:28:13 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 7C8314849B8 for ; Tue, 4 Jun 2024 21:27:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id AA3944848CB for ; Tue, 4 Jun 2024 21:27:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qyzw2rVhVW4u for ; Tue, 4 Jun 2024 21:27:35 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=83.223.78.233; helo=mailout2.hostsharing.net; envelope-from=info@edenhauser.net; receiver= X-Greylist: delayed 384 seconds by postgrey-1.36 at cgl.ntg.nl; Tue, 04 Jun 2024 21:27:35 CEST Received: from mailout2.hostsharing.net (mailout2.hostsharing.net [83.223.78.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 42FB54848C9 for ; Tue, 4 Jun 2024 21:27:35 +0200 (CEST) Received: from h02.hostsharing.net (h02.hostsharing.net [83.223.95.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by mailout2.hostsharing.net (Postfix) with ESMTPS id 93AE510189E0A for ; Tue, 4 Jun 2024 21:21:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=edenhauser.net; s=default; t=1717528869; bh=TpfYOBnk8VL2L/sbGXvG4qe0q11zgw94Xs9tT/dbPio=; h=Date:Subject:To:References:From:In-Reply-To:From; b=KuD3mLhHV9ILE2y6Zi56uBhgtOYQ8XLfHiefGaLsbP5Oc7HH1yanuwFwkebpuXEPe UyVOi9Gx8OaCUOOaovNwQicEZiXEunbcM3NzpxoLtkct9/GC9leePmxJHqbimrT5C/ cb7bkGXpuhanWVwxk3h9OL5u+OpFOo/55o49c91ZcPfPqiDKWWNCpD865R+ki3qaHX fk1JYSEkMI8ZXhERH0diS8ppVfDlOH4bdyXeM4TZwkZI+1PFLmQTWUWLEyTovH4oGf /Fl+h9NiFjlQh9onhbuEZuOEhZCQbKn2ddYQxA3tb9DEaeCg4GWMx6DRrAQH+6gkx+ k+4J4H8oxscZg== Received: from [172.20.10.2] (178.115.37.252.wireless.dyn.drei.com [178.115.37.252]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by h02.hostsharing.net (Postfix) with ESMTPSA id C5209603DB61 for ; Tue, 4 Jun 2024 21:21:08 +0200 (CEST) Message-ID: <05f81be3-911e-4faa-9158-0b3ba26e4e1c@edenhauser.net> Date: Tue, 4 Jun 2024 21:21:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Pablo Rodriguez via ntg-context References: <9ec847c8-d48f-4a4a-bf32-de940af93934@edenhauser.net> <25ded686-f033-4a9e-a657-26abbb2bcfe7@gmx.es> From: Christoph Edenhauser In-Reply-To: <25ded686-f033-4a9e-a657-26abbb2bcfe7@gmx.es> Message-ID-Hash: LFW4ZO6UKWV5MR42WUFGBKHG5FUF2BLL X-Message-ID-Hash: LFW4ZO6UKWV5MR42WUFGBKHG5FUF2BLL X-MailFrom: info@edenhauser.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: ConTeXt source from XML List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============0093401609508409410==" This is a multi-part message in MIME format. --===============0093401609508409410== Content-Type: multipart/alternative; boundary="------------AjbB0wuyUx4p2c0MG1qg0htr" This is a multi-part message in MIME format. --------------AjbB0wuyUx4p2c0MG1qg0htr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Pablo, dear list That's great, thank you very much for your suggestion. That seems to me to be a very elegant solution to the next two problems that were actually still ahead of me. And now to my initial question, which I didn't specify precisely enough. I have the following workflow in mind: 1. I have an XML file (TEI-XML), 2. then, following your brilliant suggestion, I will create an xml-analyze-template.tex file and customise it. 3. As you suggest, now one would actually use     context --environment xml-analyze-template.tex file.xml     to typeset in a pdf file. But I would like to convert all the XML nodes into the ConTeXt typesetting language, and then edit/correct the text and maybe some structure in this *.tex file. And here comes my question: Can I use context to convert my XML-file 'file.xml' into a ConTeXt-file 'file.tex' instead of typesetting it as a 'file.pdf'. Best regards, Christoph Am 04.06.24 um 17:21 schrieb Pablo Rodriguez via ntg-context: > Hi Christoph, > > not clear to me whether you meant an environment (a format file) with > the ConTeXt generated file. > > In that case, this might help: > > context --extra=xml --analyze --template your-file.xml > > With that template, you may run: > > context --environment=xml-analyze-template.tex your-file.xml > > BTW, there are two typos in xml-analyze-template.tex (lines 8-9): > > - \startxmlsetup should read \startxmlsetups. > - \xmlsetsetups should read \xmlsetsetup. > > But consider that this only flushes text with no formatting (you will > have all text in a single paragraph. > > If this is not what you need, a more detailed (or simply more verbose) > explanation) might help. > > Just in case it might help, > > Pablo --------------AjbB0wuyUx4p2c0MG1qg0htr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Dear Pablo, dear list

That's great, thank you very much for your suggestion.
That seems to me to be a very elegant solution to the next two problems that were actually still ahead of me.

And now to my initial question, which I didn't specify precisely enough.

I have the following workflow in mind:
1. I have an XML file (TEI-XML),
2. then, following your brilliant suggestion, I will create an xml-analyze-template.tex file and customise it.
3. As you suggest, now one would actually use
    context --environment xml-analyze-template.tex file.xml
    to typeset in a pdf file.
But I would like to convert all the XML nodes into the ConTeXt typesetting language, and then edit/correct the text and maybe some structure in this *.tex file.

And here comes my question: Can I use context to convert my XML-file 'file.xml' into a ConTeXt-file 'file.tex' instead of typesetting it as a 'file.pdf'.

Best regards, Christoph

Am 04.06.24 um 17:21 schrieb Pablo Rodriguez via ntg-context:
Hi Christoph,

not clear to me whether you meant an environment (a format file) with
the ConTeXt generated file.

In that case, this might help:

  context --extra=xml --analyze --template your-file.xml

With that template, you may run:

  context --environment=xml-analyze-template.tex your-file.xml

BTW, there are two typos in xml-analyze-template.tex (lines 8-9):

  - \startxmlsetup should read \startxmlsetups.
  - \xmlsetsetups should read \xmlsetsetup.

But consider that this only flushes text with no formatting (you will
have all text in a single paragraph.

If this is not what you need, a more detailed (or simply more verbose)
explanation) might help.

Just in case it might help,

Pablo




--------------AjbB0wuyUx4p2c0MG1qg0htr-- --===============0093401609508409410== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============0093401609508409410==--