OK, expansion is not encoding, but expansion in this place here is not a problem (I suppose). The section head is good, but the TOC entry not. So the inner expansion (or conversion or detokenization or so) around writetolist is probably affected by something, what now I cannot handle. And what is strange -- Hans did not reproduce the behaviour (as he wrote), so I am asking a trying to find the problem on my side (or lucky thougth :-)... Thank for your ideas and help, Martin -----Original Message----- From: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl]On Behalf Of Mojca Miklavec Sent: Monday, April 03, 2006 4:25 PM To: martin.kolarik@email.cz; mailing list for ConTeXt users Subject: Re: [NTG-context] Problem with encoding, XML and writetolist... On 2/28/06, Martin Kolařík wrote:
Hi all,
I have problem with chars encoding now; I have updated ConTeXt sometimes in January; before the time I was using old (year) version. In this prehistorical version the problem was not present.
What is the stuff? The following code generates content with titles without spaces -- accented characters are replaced with \char XXX variant, so during reading TUI line TeX gobbles a space after XXX as a part of <number> syntax rule.
Can I do something? With encoding? With XML?
Encoding has "nothing" to do with it. I don't really understand the \[un]expanded commands in TeX, but this part could theoretically be problematic: {\expanded {\section{\XMLflush{title}}}} Consider the following (encoding-independent) minimal example, just in case that this can help any of the gurus to understand the problem: \defineXMLenvironment [chapter] {\defineXMLsave[title]} {\expanded {\section{\XMLflush{title}}}} \starttext \startbuffer <chapter> <title>$a+b$</title> </chapter> \stopbuffer \processXMLbuffer \placecontent[criterium=all] \stoptext The entry in TOC is different from the title (one is in math mode and the other one writen with dollars - literally). Mojca
Thank you very much, have a nice day, Martin
Code:
\defineXMLenvironment [chapter] {\defineXMLsave[title]} {\expanded {\chapter\XMLflush{title}}}
\starttext
\startbuffer
<chapter> <title>Ahojá hojč kuna</title> </chapter>
\stopbuffer
\processXMLbuffer
\completecontent[criterium=all]
\stoptext
ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context