diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2011-05-10 12:28:08 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2011-05-10 12:28:08 +0200 |
commit | 889ace69482cd1b3e2be4142fe5403922ec226df (patch) | |
tree | d2db2a0b2983940a72232deb89897e687e8fcabe /tex/context | |
parent | adc06ec6e6e32fafe4e0689bd8a5e9d31000012e (diff) | |
download | transliterator-889ace69482cd1b3e2be4142fe5403922ec226df.tar.gz |
expanded manual
Diffstat (limited to 'tex/context')
-rw-r--r-- | tex/context/interface/third/t-transliterator.xml | 3 | ||||
-rw-r--r-- | tex/context/third/transliterator/trans_tables_sr.lua | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tex/context/interface/third/t-transliterator.xml b/tex/context/interface/third/t-transliterator.xml index b5b189f..f80c48e 100644 --- a/tex/context/interface/third/t-transliterator.xml +++ b/tex/context/interface/third/t-transliterator.xml @@ -17,6 +17,8 @@ <cd:constant type="ru_transcript_de_exp"/> <cd:constant type="ru_transcript_en"/> <cd:constant type="all"/> + <cd:constant type="sr_tolt"/> + <cd:constant type="sr_tocy"/> <cd:constant type="iso9_ocs"/> <cd:constant type="ocs"/> <cd:constant type="ocs_gla"/> @@ -28,6 +30,7 @@ <cd:parameter name="hyphenate"> <cd:constant type="cs" default="yes"/> <cd:constant type="sk"/> + <cd:constant type="hr"/> </cd:parameter> </cd:assignments> </cd:arguments> diff --git a/tex/context/third/transliterator/trans_tables_sr.lua b/tex/context/third/transliterator/trans_tables_sr.lua index 9abe5b2..84319b0 100644 --- a/tex/context/third/transliterator/trans_tables_sr.lua +++ b/tex/context/third/transliterator/trans_tables_sr.lua @@ -100,14 +100,16 @@ end local t = translit local function sr (mode, text) - local P, R, S, V, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs + local P, R, Cs = lpeg.P, lpeg.R, lpeg.Cs local utfchar = translit.utfchar - local trl_sr = translit.make_add_dict{} - trl_sr = t[mode.."_upper"] + t[mode.."_lower"] + local trl_sr = translit.make_add_dict{} + trl_sr = t[mode.."_upper"] + t[mode.."_lower"] - local _p_sr = translit.addrules (trl_sr, _p_sr) - local p_sr = Cs((_p_sr / trl_sr + utfchar)^0) + -- transliteration from latin script requires macro handling … + local _p_macro = P[[\]] * R("az", "AZ")^1 + local _p_sr = translit.addrules (trl_sr, _p_sr) + local p_sr = Cs((_p_macro + (_p_sr / trl_sr) + utfchar)^0) return p_sr:match(text) end |