diff options
-rw-r--r-- | tex/context/third/transliterator/t-transliterator.mkiv | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tex/context/third/transliterator/t-transliterator.mkiv b/tex/context/third/transliterator/t-transliterator.mkiv index 2ff4736..e9510e0 100644 --- a/tex/context/third/transliterator/t-transliterator.mkiv +++ b/tex/context/third/transliterator/t-transliterator.mkiv @@ -146,18 +146,17 @@ \unexpanded\def\transliterate{\dosingleempty\dotransliterate} -\def\expandabletransliterate[#1]#2{% +\def\expandabletransliterate#1{% %\bgroup %\setuptransliterate[#1]% %\language[\transliterateparameter{hyphenate}]% \ctxlua{ thirddata.translit.deficient_font = "\transliterateparameter{deficient_font}" - thirddata.translit.transliterate("\transliterateparameter{mode}","#2") + thirddata.translit.transliterate("\transliterateparameter{mode}","#1") }% %\egroup% } - \unexpanded\def\starttransliterate{% \bgroup% \dosingleempty\dostarttransliterate% @@ -174,6 +173,16 @@ \egroup% } +\newconditional\transliterate_useexpanded \setfalse\transliterate_useexpanded + +\def\transliterate_conditional[#1]#2{% + \ifconditional\transliterate_useexpanded + \transliterate[#1]{#2}% + \else + \expandabletransliterate{#2}% + \fi% +} + \protect \endinput % vim:ft=context |