From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110806 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: Re: arbitrary context commands in xml file Date: Mon, 8 Mar 2021 13:39:20 +0000 Message-ID: <41fc41e24d954bd69e7f5e215d37a03e@ub.unibe.ch> References: <4589b684d40e4e4c9ce7634187c310f4@ub.unibe.ch> <425d284dcd0e414aaec4a8ef72d928a2@ub.unibe.ch> <9c7c4e6468f0457b8dddcfc491971e9c@ub.unibe.ch> <98438acc-41a9-7159-fc83-fdae27cf473c@xs4all.nl> <1331e059-d397-ae66-b556-33554d28bd45@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0448538269229341947==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13344"; mail-complaints-to="usenet@ciao.gmane.io" To: , Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 08 14:39:55 2021 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 1lJG71-0003Md-J5 for gctc-ntg-context-518@m.gmane-mx.org; Mon, 08 Mar 2021 14:39:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C2BE328147D; Mon, 8 Mar 2021 14:39:25 +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 zJ1NqZJm6QzM; Mon, 8 Mar 2021 14:39:24 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DDE022814AC; Mon, 8 Mar 2021 14:39:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 25FA7281490 for ; Mon, 8 Mar 2021 14:39: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 qr5rkOvot4iX for ; Mon, 8 Mar 2021 14:39:23 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=130.92.0.84; helo=mailhub-lb3.unibe.ch; envelope-from=denis.maier@ub.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 37A0228147D for ; Mon, 8 Mar 2021 14:39:23 +0100 (CET) X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-03.campus.unibe.ch [130.92.13.18]) (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 CF8B65000B6; Mon, 8 Mar 2021 14:39:21 +0100 (CET) Thread-Topic: [NTG-context] arbitrary context commands in xml file Thread-Index: AQHXEc1XwAE0NRaj0U6oBNF/EmEMkKp1euTX///xkICAABaZa4AAXqFggAAEmACAA/8REIAACFGAgAAQGQCAAAVmAIAAGhBg In-Reply-To: Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [130.92.13.161] 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:110806 Archived-At: --===============0448538269229341947== Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_41fc41e24d954bd69e7f5e215d37a03eubunibech_" --_000_41fc41e24d954bd69e7f5e215d37a03eubunibech_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Indeed. That's very useful. Thanks! Von: ntg-context Im Auftrag von Duncan Hothers= all Gesendet: Montag, 8. M=E4rz 2021 14:06 An: Hans Hagen Cc: mailing list for ConTeXt users Betreff: Re: [NTG-context] arbitrary context commands in xml file On Mon, 8 Mar 2021 at 12:46, Hans Hagen > wrote: > I'd like to second Denis' request for support for XML processing > instructions to execute ConTeXt code, rather than elements which can > cause big problems if one is working to a fixed schema. It would be a > boon to be able to drop in in an XML source. one of the things that can already be done ... \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} \xmlinstalldirective{tex}{xmltexdirective} (the #2 is something without spaces btu one can work around that) Aha. Useful, thanks! --_000_41fc41e24d954bd69e7f5e215d37a03eubunibech_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Indeed. That’s very useful. Thanks!

 

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Duncan Hothersall
Gesendet: Montag, 8. M=E4rz 2021 14:06
An: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Betreff: Re: [NTG-context] arbitrary context commands in xml file

 

 

 

On Mon, 8 Mar 2021 at 12:46, Hans Hagen <j.hagen@xs4all.nl> wrote:

> I'd like to second Denis' request for support f= or XML processing
> instructions to execute ConTeXt code, rather than elements which can <= br> > cause big problems if one is working to a fixed schema. It would be a =
> boon to be able to drop in <?context \whatever{fdfd}?> in an XML= source.
one of the things that can already be done ...

\def\xmltexdirective#1#2{\doif{#1}{command}{#2}}

\xmlinstalldirective{tex}{xmltexdirective}

         <?context-directive tex command \infra= med{xxx} ?>
         <?context-directive tex command \page = ?>

(the #2 is something without spaces btu one can work around that)

 

Aha. Useful, thanks!

--_000_41fc41e24d954bd69e7f5e215d37a03eubunibech_-- --===============0448538269229341947== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============0448538269229341947==--