summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/third/transliterator/t-transliterator.mkiv29
1 files 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