Re: [NTG-context] xml and buffers

2006-01-20 Thread Junod Antoine
On Thu, Jan 19, 2006 at 05:55:22PM +0100, Hans Hagen wrote:
> Junod Antoine wrote:
> 
> >Hello gurus, 
> >
> >I'm a bit into trouble wih buffers and xml parsing. Here is my problem:
> >[...]
>
> \defineXMLsingular
>  [meta]
>  [name=,content=]
>  {\setevariables[document:meta][\XMLop{name}=\XMLop{content}]}

It works fine for all "normal" characters but not for accented
characters. Is there a workaround?

I'm using the ConTeXt version of the 16 of this month and the latest
stable version of pdftex.

The .log of the compilation is available here:

 http://zapata.tots-ns.net/analysis.log

The parsed .xhtml is here:

 http://zapata.tots-ns.net/analysis.xhtml

and the .tex is there:

 http://zapata.tots-ns.net/analysis.tex

One more time, thanks a lot for all your help.
Have a nice week-end
-AJ
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] xml and buffers

2006-01-19 Thread Junod Antoine
Thanks a lot!!!
-AJ


On Thu, Jan 19, 2006 at 05:55:22PM +0100, Hans Hagen wrote:
> Junod Antoine wrote:
> 
> >Hello gurus, 
> >
> >I'm a bit into trouble wih buffers and xml parsing. Here is my problem:
> >
> >I've got a .xhtml with the following lines:
> >
> >[...]
> >
> >
> >[...]
> >Auction: document d'analyse
> >[...]
> >
> >I'm trying to store the content of the meta tag in a buffer, one per
> >meta tag, (ie "G�nie Logiciel" in buffer course_name, "23 d�cembre
> >2005" in buffer date) to use these buffers when I meet the title tag:
> >
> >\XMLifequalelse{meta}{name}{course_name}
> > {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}{}
> >\XMLifequalelse{meta}{name}{date}
> > {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{}
> >\defineXMLenvironment [title] {\startstandardmakeup
> >   \getbuffer[course_name]
> >   \getbuffer[date]}{\stopstandardmakeup}
> >
> >But it does not print anything else than the title.
> > 
> >
> buffers serve a different purpose and are part if a text flow 
> 
> \starttext
> 
> \defineXMLsingular
>  [meta]
>  [name=,content=]
>  {\setevariables[document:meta][\XMLop{name}=\XMLop{content}]}
> 
> \defineXMLenvironment
>  [title]
>  {}
>  {\startstandardmakeup
>   \getvariable{document:meta}{course_name} \endgraf
>   \getvariable{document:meta}{date} \endgraf
>   \stopstandardmakeup}
> 
> \startXMLdata
> 
> 
> 
> 
> \stopXMLdata
> 
> With a little extension (i'll add it) we can prevent unwanted expansion: 
> 
> \unprotected \def\setvalueXMLpar#1#2#3%
> [EMAIL PROTECTED]@EA\endcsname
>\csname\ifcsname\@@XMLvariable:#2:#3\endcsname
>  \@@XMLvariable:#2:#3\else\s!empty\fi\endcsname}
> 
> \defineXMLsingular
>  [meta]
>  [name=,content=]
>  {\setvalueXMLpar{document:meta:\XMLop{name}}{meta}{content}}
> 
> \defineXMLenvironment
>  [title]
>  {}
>  {\startstandardmakeup
>   \getvalue{document:meta:course_name} \endgraf
>   \getvalue{document:meta:date} \endgraf
>   \stopstandardmakeup}
> 
> \startXMLdata
> 
> 
> 
> 
> \stopXMLdata
> 
> 
> \stoptext
> 
> 
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] xml and buffers

2006-01-19 Thread Junod Antoine
Hello gurus, 

I'm a bit into trouble wih buffers and xml parsing. Here is my problem:

I've got a .xhtml with the following lines:

 [...]
 
 
 [...]
 Auction: document d'analyse
 [...]

I'm trying to store the content of the meta tag in a buffer, one per
meta tag, (ie "Génie Logiciel" in buffer course_name, "23 décembre
2005" in buffer date) to use these buffers when I meet the title tag:

 \XMLifequalelse{meta}{name}{course_name}
  {\startbuffer[course_name]\XMLpar{meta}{content}{}\stopbuffer}{}
 \XMLifequalelse{meta}{name}{date}
  {\startbuffer[date]\XMLpar{meta}{content}{}\stopbuffer}{}
 \defineXMLenvironment [title] {\startstandardmakeup
\getbuffer[course_name]
\getbuffer[date]}{\stopstandardmakeup}

But it does not print anything else than the title.

Any idea?

Thanks a lot for you help!
-AJ 
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] cyrillic font

2006-01-13 Thread Junod Antoine
Hello list,
 
> if you are able to typeset in cyrillic, it implies that you have *at
> lease some* cyrillic fonts installed. :-) Could you please post here
> the error messages from the log (of some of your unsuccessful
> attempts) so we could see what happened?

In the .log file i've a warning:
Warning: pdfetex (file larm1000): Font larm1000 at 720 not found

And when I'm trying to open the .pdf, acroread says me "Could not find
a font in the Resources dictionary, using Helvetica instead." and then
"Cannot find or create the font 'Helvetica' [...]".

Where could I find other error messages if it's not enough?

My source file is:
\setupoutput[pdf]
\enableregime[utf]
\useencoding[cyr]

\definetypeface [russian]
  [rm] [serif] [computer-modern] [default] [encoding=t2a]

\setupbodyfont[russian]
\starttext
Мама и Папа % Some Russian characters
\stoptext

Thanks a lot for your help
-AJ 

> From: Junod Antoine [mailto:[EMAIL PROTECTED]
> To: ntg-context@ntg.nl
> Sent: Fri, 13 Jan 2006 14:59:56 +0100
> Subject: [NTG-context] cyrillic font
> 
> Hello list,
> 
> I'm trying to write down some Russian-French vocabulary without any
> success.
> 
> I've read the page about Russian in the wiki
> (http://wiki.contextgarden.net/Russian). The examples are not working
> for me and that's certainly a font problem (acroread say that to me).
> 
> How to know if the cm-super fonts are installed on my computer? I'm
> using a tetex distribution (2.0.2). For information, I'm able to
> output cyrillic with latex.
> 
> Thanks a lot for your help.
> -AJ


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


[NTG-context] cyrillic font

2006-01-13 Thread Junod Antoine
Hello list,

I'm trying to write down some Russian-French vocabulary without any
success.

I've read the page about Russian in the wiki
(http://wiki.contextgarden.net/Russian). The examples are not working
for me and that's certainly a font problem (acroread say that to me).

How to know if the cm-super fonts are installed on my computer? I'm
using a tetex distribution (2.0.2). For information, I'm able to
output cyrillic with latex.

Thanks a lot for your help.
-AJ
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context