ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: h h extern <pragma@wxs.nl>
Subject: Re: XML & <formula>s
Date: Fri, 10 Dec 2004 22:38:27 +0100	[thread overview]
Message-ID: <41BA1753.9080206@wxs.nl> (raw)
In-Reply-To: <20041209211043.6911@news.comp.lancs.ac.uk>

Adam Lindsay wrote:
> Hi all.
> 
> I want to use XML, but in a non-doctrinaire way: I much prefer TeX
> formula writing to mathml by hand. 
> 
> I looked at xtag-mml, and the \defineXMLenvironment [formula] looked like
> just what I wanted. However, when trying it, the XML catcode regime was
> still in effect, and the backslashes were printed, and didn't act as escapes.
> 
> Am I missing something in the correct usage, or is support "incomplete"?
> 
> 
> This is a sample file, showing how I've been trying to use it:
> 
> \useXMLfilter[mml]
> \starttext
> \startXMLdata
> <formula>
> t+3+x+t\neq m\alpha\frac\theta\hbar
> </formula>
> \stopXMLdata
> \stoptext

\starttext

\unprotected \def\XMLtex#1%
   {\begingroup
    \disableXML
    \scantokens\@EA\@EA\@EA{\csname\@@XMLdata:#1\endcsname}%
    \endgroup}

\defineXMLenvironmentsave
   [formula]
   {}
   {\XMLtex{formula}}

\input bryson

\startXMLdata
<formula>
t+3+x+t\neq m\alpha\frac\theta\hbar
</formula>
\stopXMLdata

\input thuan

\stoptext

> Also, what's the status of contml? I like the idea of it as a simple,
> structural, basic markup that ConTeXt handles with zero effort, but is
> anyone actually using it?

we sometimes mix it into other xml docs; i have no problem with extending it; 
actualy, (see mag-0008.pdf), i want to map most context directly onto xml so 
that we have a rather complete xml input syntax

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

  reply	other threads:[~2004-12-10 21:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-09 21:10 Adam Lindsay
2004-12-10 21:38 ` h h extern [this message]
2004-12-10 23:02   ` Adam Lindsay
2004-12-12 21:34     ` h h extern
2004-12-13 18:02   ` mag-0008 (was: XML & <formula>s) Adam Lindsay
2004-12-13 21:23     ` Bruce D'Arcus
2004-12-15 17:16       ` mag-0008 Hans Hagen
2004-12-15 17:53         ` mag-0008 Bruce D'Arcus
2004-12-15 17:14     ` mag-0008 Hans Hagen

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=41BA1753.9080206@wxs.nl \
    --to=pragma@wxs.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).