ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: About Thomas Schmitz My Way
Date: Wed, 10 Mar 2010 13:50:31 +0100	[thread overview]
Message-ID: <EEF419F5-C264-4374-951F-B16F5FEE9985@uni-bonn.de> (raw)
In-Reply-To: <9C435CBB-F03C-4ED2-ADF6-7720E0BB9BA9@gmail.com>

Hi Otared,

thanks for the feedback and the kind words!

On Mar 10, 2010, at 12:54 PM, Otared Kavian wrote:
> 
> Regarding the tutorial you have written, although the typo may be corrected by any cautious reader, I think that, on page 2, lines 5 and 6 of your My Way it should be
> </body>
> </html>
> 

Of course! Thanks for spotting this.

> I don't know whether the following observation is correct or not: I had to add at the beginning of the file « ourenvironment.tex » which must contain the xml setups, the command 
> \startenvironment ourenvironment
> 
> and at the end of that file:
> \stopenvironment
> 
> before being able to get what you describe. The curious thing is that even when I didn't add
> \startenvironment ourenvironment 
> but I did add 
> \stopenvironment
> the xml file was processed by ConTeXt. For beginners like me, I think this should be said clearly somewhere.
> 

Really? No, I don't think you need to have this. When I process

context --environment=ourenvironment ourfile.xml

it gets processed even without the \start \stop pair you describe.

> Also, in order to have a better PDF in your examples, at some point I understood that in order to have appropriate white space between paragraphs and tables one could, or should, add the tag for preformatted text:
> <pre>
> 
> </pre>
> 
> and transform it into \blank by ConTeXt. To this end one has to add the tag  pre to \xmlsetup:
> \xmlsetsetup{\xmldocument}{html|body|h1|h2|p|em|q|b|table|tr|th|td|pre}{xml:*}
> 
> and then
> \startxmlsetups xml:pre 
> 	\xmlflush{#1}\blank[big]
> \stopxmlsetups
> 
> to the environment.
> 
Yes, I was bothered by the lack of whitespace too, but I wanted to keep it simple. adding <pre> would be one way; another way would be to add something like \blank[line]\par at the end of the setup commands. But I wasn't sure what would be more confusing to beginners: the somewhat ugly output or these additions.

> Finally a qusetion: is there a way to obtain an xml file from a rather simple TeX source, written with ConTeXt commands? Here by simple I mean something which contains text and math formulas, such as a list of problems and exercises.
> 
That's a very interesting question. Hans has this intriguing paragraph in the older manual, example.pdf: "In ConTEXt we use a strange but charming way to handle this conversion: we simply typeset xml. The typeset document (with lots of angle brackets) is then converted into raw text. A complication is math, but given that you can embed MathML in your document, this can be passed on directly." The question how this can be done has been asked several time on the list, but so far, I haven't seen an answer. Maybe you need to buy Hans lots of beer at the next ConTeXt meeting, and he will finally fess up!

Thanks, and best wishes

Thomas
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-03-10 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 11:54 Otared Kavian
2010-03-10 12:50 ` Thomas A. Schmitz [this message]
2010-03-10 17:21   ` Hans Hagen
2010-03-10 17:36     ` R. Bastian
2010-03-10 18:42       ` Fernan Aguero

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=EEF419F5-C264-4374-951F-B16F5FEE9985@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).