summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-03-16 13:04:51 +0100
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-03-16 13:04:51 +0100
commitde7913532bd56d8d7d88ac1ef522e18157eaac17 (patch)
treedb89deb7265cd8cd48ecaf953924260b8018526f
parentd247af02a8c4b4d5d943dcc1db48a9af7631e324 (diff)
downloadtransliterator-de7913532bd56d8d7d88ac1ef522e18157eaac17.tar.gz
Works in footnotes now. (All credits to Wolfgang.)
-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