ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: <denis.maier@ub.unibe.ch>
To: <ntg-context@ntg.nl>, <j.hagen@xs4all.nl>
Subject: Re: arbitrary context commands in xml file
Date: Mon, 8 Mar 2021 13:39:20 +0000	[thread overview]
Message-ID: <41fc41e24d954bd69e7f5e215d37a03e@ub.unibe.ch> (raw)
In-Reply-To: <CAN8fp9XrPe=7=S7mFAny6SgyJE7Zb_-dC-nrx-ry0amVDHp_gw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1058 bytes --]

Indeed. That's very useful. Thanks!

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Duncan Hothersall
Gesendet: Montag, 8. März 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<mailto:j.hagen@xs4all.nl>> 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 <?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 \inframed{xxx} ?>
         <?context-directive tex command \page ?>

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

Aha. Useful, thanks!

[-- Attachment #1.2: Type: text/html, Size: 3575 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2021-03-08 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 14:39 denis.maier
2021-03-05 14:53 ` denis.maier
2021-03-05 15:01   ` Wolfgang Schuster
2021-03-05 15:26     ` denis.maier
2021-03-05 21:27       ` denis.maier
2021-03-05 22:17         ` Hans Hagen
2021-03-08 10:20           ` denis.maier
2021-03-08 11:48             ` Duncan Hothersall
2021-03-08 12:46               ` Hans Hagen
2021-03-08 13:05                 ` Duncan Hothersall
2021-03-08 13:39                   ` denis.maier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41fc41e24d954bd69e7f5e215d37a03e@ub.unibe.ch \
    --to=denis.maier@ub.unibe.ch \
    --cc=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).