Paul Tremblay wrote:
On Wed, Feb 23, 2005 at 09:33:40AM +0100, Hans Hagen wrote:

The mapping variant discussed in the magazine can be seen as a future xml based layer around the context tex core; a kind xml based typesetting engine so that one can do without tex programming and stick to xml tools (which some prefer)

Hans



But my unerstanding is that the mapping technique does not take care of
white space. So if I have:

<p>Some paragrah in XmL

with

space
</p>

This could get converted as:

Some paragrah in XmL

with

space
\par

Which would produce 3 paragrahs.

There is actually a nice small tool TeXML (at sourceforge) that takes
care of this problem. It allows you to use an XML to issue TeX commands,
and then converts those commands into TeX (or LaTeX or ConText). It
takes care of white space.

I am one of those people who likes to stick to XML tools, who likes to
convert a tree to a tree. I was wondering the best way to do this. It
seems that using TeXML is the best way. I just wanted to make sure there
was not a more direct way in ConTeXt.

\starttext

\unprotected \defineXMLenvironment
  [p]
  
{\bgroup\def\obeyedspace{\removeunwantedspaces\space\ignorespaces}\ignorelines}
  {\egroup}


\startbuffer <p>test

  test
test
  test</p>
\stopbuffer

\processXMLbuffer

\stoptext
-----------------------------------------------------------------
                                          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
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to