ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* buffers and mathml
@ 2005-06-02 12:02 jimarin
  2005-06-02 15:20 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: jimarin @ 2005-06-02 12:02 UTC (permalink / raw)


Hi all,

I hope not to be posing a silly question.

I am trying something like:

usemodule[mathml]
\starttext

\def\open
{<}

\def\close
{>}

\startbuffer
\open math display="block"\close
\open apply\close \open sin/\close \open apply\close \open plus/\close
\open cn\close 2 \open /cn\close \open ci\close a \open /ci\close
\open /apply\close \open /apply\close
\open /math\close
\stopbuffer

\processXMLbuffer

\stoptext

But this does not pass to \processXMLbuffer the result of substituting
commands \open and \close...

how could this be achieved...?

I know that I could have used myself the < and >'s instead of the ugly open
and close but that is not my requirement.

I tried defining a command

\def\Wea
{
\open math display="block"\close
\open apply\close \open sin/\close \open apply\close \open plus/\close
\open cn\close 2 \open /cn\close \open ci\close a \open /ci\close
\open /apply\close \open /apply\close
\open /math\close
}

and then...

\startbuffer
\Wea
\stopbuffer

but that is plain wrong...



thanks

jima
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 2004/11/01

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: buffers and mathml
  2005-06-02 12:02 buffers and mathml jimarin
@ 2005-06-02 15:20 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2005-06-02 15:20 UTC (permalink / raw)


> I tried defining a command
> 
> [...]
> 
> but that is plain wrong...

You are quite close. This works:

   \edef\Wea { .. }

(note the \edef)

and then:

   \expandafter
   \startbuffer
   \Wea
   \stopbuffer

The added \expandafter expands \Wea before \startbuffer comes into
play. I am puzzled as to why you want this weird input syntax.


Taco

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-02 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-02 12:02 buffers and mathml jimarin
2005-06-02 15:20 ` Taco Hoekwater

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).