Changes
Jump to navigation
Jump to search
Talk:Getting Started with XML and ConTeXt using TEXML (view source)
Revision as of 19:28, 5 March 2005
, 19:28, 5 March 2005TeXML author's comments
Thank you a lot for the article! I'm happy to see that TeXML becomes popular, and not only because I'm the author, but also because I really believe in the benefits of TeXML. Here are some comments on the article.
-------
I've released a new version of TeXML (1.23.devel) with ConTeXt support. Instead of the environment variable hack to activate the TeXML mode, you use the command line flag:
<pre>
$ ./texml.py -e utf8 -c in_file.texml out_file.tex
or
$ ./texml.py -e utf8 --context in_file.texml out_file.tex
</pre>
----
There is no need to use a lot of "TeXML" elements. It is required only as the root and for text translation tweeking. So instead of
<pre>
<?xml version="1.0"?>
<TeXML>
<env name="text">
<TeXML>Hello World</TeXML>
</env>
</TeXML>
</pre>
you'd better use
<pre>
<?xml version="1.0"?>
<TeXML>
<env name="text">
Hello World
</env>
</TeXML>
</pre>
---------
Please note that the example documents are not equivalent. If you convert "simple_page.texml" to ConTeXt, you don't get "simple_page.tex".
------
On tweeking of layout of results. TeXML
<pre>
<TeXML>
<cmd name="enableregime">
<opt>utf</opt>
</cmd>
<cmd name="setuppagenumbering">
<opt>state=stop</opt>
</cmd>
</TeXML>
</pre>
produces
<pre>
\enableregime[utf] \setuppagenumbering[state=stop]
</pre>
(all in one line). So I'd recommend using an attribute "nlX":
<pre>
<TeXML>
<cmd name="enableregime" nl2="1">
<opt>utf</opt>
</cmd>
<cmd name="setuppagenumbering">
<opt>state=stop</opt>
</cmd>
</TeXML>
</pre>
The result is better:
<pre>
\enableregime[utf]
\setuppagenumbering[state=stop]
</pre>
-------
I've released a new version of TeXML (1.23.devel) with ConTeXt support. Instead of the environment variable hack to activate the TeXML mode, you use the command line flag:
<pre>
$ ./texml.py -e utf8 -c in_file.texml out_file.tex
or
$ ./texml.py -e utf8 --context in_file.texml out_file.tex
</pre>
----
There is no need to use a lot of "TeXML" elements. It is required only as the root and for text translation tweeking. So instead of
<pre>
<?xml version="1.0"?>
<TeXML>
<env name="text">
<TeXML>Hello World</TeXML>
</env>
</TeXML>
</pre>
you'd better use
<pre>
<?xml version="1.0"?>
<TeXML>
<env name="text">
Hello World
</env>
</TeXML>
</pre>
---------
Please note that the example documents are not equivalent. If you convert "simple_page.texml" to ConTeXt, you don't get "simple_page.tex".
------
On tweeking of layout of results. TeXML
<pre>
<TeXML>
<cmd name="enableregime">
<opt>utf</opt>
</cmd>
<cmd name="setuppagenumbering">
<opt>state=stop</opt>
</cmd>
</TeXML>
</pre>
produces
<pre>
\enableregime[utf] \setuppagenumbering[state=stop]
</pre>
(all in one line). So I'd recommend using an attribute "nlX":
<pre>
<TeXML>
<cmd name="enableregime" nl2="1">
<opt>utf</opt>
</cmd>
<cmd name="setuppagenumbering">
<opt>state=stop</opt>
</cmd>
</TeXML>
</pre>
The result is better:
<pre>
\enableregime[utf]
\setuppagenumbering[state=stop]
</pre>