From de7913532bd56d8d7d88ac1ef522e18157eaac17 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 16 Mar 2010 13:04:51 +0100 Subject: Works in footnotes now. (All credits to Wolfgang.) --- .../third/transliterator/t-transliterator.mkiv | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tex/context/third/transliterator/t-transliterator.mkiv b/tex/context/third/transliterator/t-transliterator.mkiv index b27f62e..16c197b 100644 --- a/tex/context/third/transliterator/t-transliterator.mkiv +++ b/tex/context/third/transliterator/t-transliterator.mkiv @@ -17,7 +17,6 @@ \startmodule[transliterator] \unprotect -\ctxloadluafile{trans_tables_iso9.lua}{} %D Use the Transliterator by adding \type{\usemodule[transliterator]} somewhere %D before \type{\starttext}. Adjust the Transliterator through the %D \type{\setuptransliterate} command. As a first argument it accepts a set of @@ -310,33 +309,35 @@ end %D leaves the latter unchanged. Thus, in order to permanently switch to %D another transliteration style the user would have to set it by calling %D \type{\setuptransliterate} again. -% Credits for rewriting the TeX code go to Wolfgang as well. - +%D +% All credits for rewriting the TeX code go to Wolfgang as well. +% http://www.ntg.nl/pipermail/ntg-context/2010/047816.html \def\dotransliterate[#1]#2{% - \bgroup% + \bgroup \iffirstargument \getparameters[TRL][#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% - \egroup% + \egroup } -\def\transliterate{\dosingleempty\dotransliterate} +\unexpanded\def\transliterate{\dosingleempty\dotransliterate} -\def\starttransliterate{% +\unexpanded\def\starttransliterate{% \bgroup% \dosingleempty\dostarttransliterate } -\long\def\dostarttransliterate[#1]#2\stoptransliterate{% +\let\stoptransliterate\relax + +\def\dostarttransliterate[#1]#2\stoptransliterate{% \iffirstargument - \setuptransliterate[#1]% - \fi - \language[\TRLhyphenate]% - %\ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% - \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% - \egroup% + \setuptransliterate[#1]% +\fi + \language[\TRLhyphenate]% + \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% + \egroup } \protect -- cgit v1.2.3