ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mapper and xml
@ 2008-05-27 15:43 luigi scarso
  2008-05-27 16:33 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: luigi scarso @ 2008-05-27 15:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

hi,
from mail "Greek in luatex" (Date: 2007-09-13 19:24:15 GMT )
following snippet
works good,
but I'm not able to make it  work under xml processing
with
\startxmlsetups mynode
....
\stopxmlsetups


In particulary, I have \u2022 unicode char  utf-8 encoding
which I would like to map to \item.
Replacing \u2022 with \item in xml source
cause a literal \item to appear in text node,
and hence in pdf output.
Using mapper above produce only a literal \stopbabelgreek
with no text at all.

Thanks in advance



\defineremapper[babelgreek]

\remapcharacter[babelgreek][`a]{\alpha}
\remapcharacter[babelgreek][`b]{\beta}
\remapcharacter[babelgreek][`c]{\gamma}
\remapcharacter[babelgreek][`d]{OEPS}

\starttext

[\startbabelgreek
a b c some stuff here \blank[big] oeps b d
\stopbabelgreek]

[\babelgreek{some stuff here}]

\stoptext


-- 
luigi
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mapper and xml
  2008-05-27 15:43 mapper and xml luigi scarso
@ 2008-05-27 16:33 ` Hans Hagen
  2008-05-28  9:08   ` luigi scarso
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2008-05-27 16:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

luigi scarso wrote:
> hi,
> from mail "Greek in luatex" (Date: 2007-09-13 19:24:15 GMT )
> following snippet
> works good,
> but I'm not able to make it  work under xml processing
> with

something

  \startxmlsetups mynode
	\ctxlua{collectors.remapper.convert("babelgreek",[[\xmlflush{#1}]])
  \stopxmlsetups

but untestedand that kind of stuff is pretty low on my agenda now that 
we have utf; best convert you rsource using mtxrun --script babel

Hans


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mapper and xml
  2008-05-27 16:33 ` Hans Hagen
@ 2008-05-28  9:08   ` luigi scarso
  0 siblings, 0 replies; 3+ messages in thread
From: luigi scarso @ 2008-05-28  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> something
>
>  \startxmlsetups mynode
>        \ctxlua{collectors.remapper.convert("babelgreek",[[\xmlflush{#1}]])
>  \stopxmlsetups
(with a final } )
! LuaTeX error ./toks-ini.lua:291: attempt to index local 'tok' (a nil value).

> but untestedand that kind of stuff is pretty low on my agenda now that
> we have utf; best convert you rsource using mtxrun --script babel
ok  (to study mtx-babel.lua) ,
but I didn't want to convert my xml source for only fews chars
(in the end, I will do it because it's semantically wrong) .
Token remapping should be a quick way to fix this kind of problem .
it works, but not under \startxmlsetups ...\stopxmlsetups





-- 
luigi
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-28  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-27 15:43 mapper and xml luigi scarso
2008-05-27 16:33 ` Hans Hagen
2008-05-28  9:08   ` luigi scarso

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).