Am 07.03.10 17:59, schrieb Philipp Gesang:
* It is common in ConTeXt to also provide a \starttransliteration
... \stoptransliteration pair (but there is no requirement).

I noticed that and of course I would like to provide an environment but
until now I had no luck implementing it; I'm stuck at the following:

\def\starttransliterate {%
   \bgroup\dostarttransliterate%
}

\def\stoptransliterate {%
   \egroup
   \transliterate{%
     \getbuffer[trl]%
   }%
}

\def\dostarttransliterate{%
   \dostartbuffer[trl][starttransliterate][stoptransliterate]%
}

and the buffer content isn't expanded before it is passed to lua; adding
\...@ea at various places has no effect either.

\def\starttransliterate
  {\bgroup
   \dosingleempty\dostarttransliterate}

\long\def\dostarttransliterate[#1]#2\stoptransliterate
  {\iffirstargument
     \setuptransliterate[#1]%
   \fi
   \translate[\TRLhyphenate]%
   \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}%
   \egroup}

Wolfgang

___________________________________________________________________________________
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 via email to