aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-07-03 12:02:49 +0200
committerRobert Alessi <alessi@robertalessi.net>2016-07-03 12:02:49 +0200
commit66827ccf15a7b86dcc2f7218b4b5e683fe1b72f3 (patch)
treecd8d5e9677e5b70d1e8e92537a7f0d96740a7169
parent191f92d3468bfd167d057c9db80ca650017283ac (diff)
downloadarabluatex-66827ccf15a7b86dcc2f7218b4b5e683fe1b72f3.tar.gz
almost done implementing Buckwalter scheme; testing romanization
-rw-r--r--arabluatex.dtx3
-rw-r--r--arabluatex.lua5
-rw-r--r--arabluatex_voc.lua66
3 files changed, 58 insertions, 16 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index d7a4adb..8fb206b 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -2396,7 +2396,8 @@ wa-ya.sIru ta.hta 'l-jild-i
2396 \bgroup\textdir TLT\al@trans@style% 2396 \bgroup\textdir TLT\al@trans@style%
2397 \luadirect{tex.sprint(processtrans(\luastringN{#2}, 2397 \luadirect{tex.sprint(processtrans(\luastringN{#2},
2398 \luastringO{\al@trans@convention}, 2398 \luastringO{\al@trans@convention},
2399 \luastringO{\al@arb@rules}))}\egroup% 2399 \luastringO{\al@arb@rules},
2400 \luastringO{\al@input@scheme}))}\egroup%
2400 \else% 2401 \else%
2401 \fi\fi\fi\fi} 2402 \fi\fi\fi\fi}
2402% \end{macrocode} 2403% \end{macrocode}
diff --git a/arabluatex.lua b/arabluatex.lua
index 9134ce5..5400a62 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -515,12 +515,15 @@ function processnovoc(str, rules)
515return str 515return str
516end 516end
517 517
518function processtrans(str, mode, rules) 518function processtrans(str, mode, rules, scheme)
519 str = "\\arb{".. str.."}" 519 str = "\\arb{".. str.."}"
520 str = takeoutabjad(str) 520 str = takeoutabjad(str)
521 str = protectarb(str) 521 str = protectarb(str)
522 str = breakcmd(str) 522 str = breakcmd(str)
523 str = holdcmd(str) 523 str = holdcmd(str)
524 if scheme == "buckwalter" then
525 str = processbuckw(str)
526 else end
524 if mode == "dmg" then 527 if mode == "dmg" then
525 if rules == "easy" then 528 if rules == "easy" then
526 str = transdmgeasy(str) 529 str = transdmgeasy(str)
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index b295254..836ee4b 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -72,26 +72,64 @@ raw = {
72} 72}
73 73
74buckwalter = { 74buckwalter = {
75 -- trigraphs 75 --- madda: hold it for now
76 {a="^Aal", b="al-"}, 76 {a="%|", b="@"},
77 {a="(%W)Aal", b="%1al-"}, 77 -- prevent any unwanted šadda from being generated
78 {a="([%-%s])Al", b="%1\'l-"}, 78 {a="bb", b="b|b"},
79-- {a="([uai])Al", b="%1-\'l-"}, 79 {a="tt", b="t|t"},
80 {a="(al%-[%a])(%~)", b="%1"}, 80 {a="vv", b="v|v"},
81 {a="(\'l%-[%a])(%~)", b="%1"}, 81 {a="jj", b="j|j"},
82 -- šadda 82 {a="HH", b="H|H"},
83 {a="([%a])(%~)", b="%1%1"}, 83 {a="xx", b="x|x"},
84 -- digraphs begin 84 {a="dd", b="d|d"},
85 {a="aA", b="A"}, 85 {a="%*|%*", b="*|*"},
86 {a="uw", b="U"}, 86 {a="rr", b="r|r"},
87 {a="iy", b="I"}, 87 {a="ss", b="s|s"},
88 -- digraphs end 88 {a="%$%$", b="$|$"},
89 {a="SS", b="S|S"},
90 {a="DD", b="D|D"},
91 {a="TT", b="T|T"},
92 {a="ZZ", b="Z|Z"},
93 {a="EE", b="E|E"},
94 {a="gg", b="g|g"},
95 {a="ff", b="f|f"},
96 {a="qq", b="q|q"},
97 {a="kk", b="k|k"},
98 {a="ll", b="l|l"},
99 {a="mm", b="m|m"},
100 {a="nn", b="n|n"},
101 {a="hh", b="h|h"},
102 {a="ww", b="w|w"},
103 {a="yy", b="y|y"},
89 -- hamza begin 104 -- hamza begin
105 {a="\'", b="|\"\'"},
90 {a="%>", b="a\"\'"}, 106 {a="%>", b="a\"\'"},
91 {a="%&", b="w\"\'"}, 107 {a="%&", b="w\"\'"},
92 {a="%<", b="i\"\'"}, 108 {a="%<", b="i\"\'"},
93 {a="%]", b="y\"\'"}, 109 {a="%]", b="y\"\'"},
94 -- hamza end 110 -- hamza end
111 -- trigraphs
112 {a="^Aal%-?", b="al-"},
113 {a="(%W)Aal%-?", b="%1al-"},
114 {a="([%-%s])Al%-?", b="%1\'l-"},
115-- {a="([fw]a?)([tw]a?)Al", b="%1-%2-\'l-"},
116-- {a="([fw]a?)(bi?)Al", b="%1-%2-\'l-"},
117-- {a="([fw]a?)(l[ai]?l)Al", b="%1-%2-l-"},
118-- {a="(al%-[%a])(%~)", b="%1"},
119-- {a="([fltw]a?)Al%-?", b="%1-\'l-"},
120-- {a="(bi?)Al%-?", b="%1-'l-"},
121-- {a="(li?)Al%-?", b="%1-l-"},
122 {a="(\'l%-[%g])(%~)", b="%1"},
123 -- digraphs begin
124 {a="([^a])A", b="%1\"A"},
125 {a="aA", b="A"},
126 {a="uw([^%~])", b="U%1"},
127 {a="iy([^%~])", b="I%1"},
128 -- digraphs end
129 -- madda: get it back
130 {a="%@", b="A\"\'"},
131 -- šadda:
132 {a="([%g])(%~)", b="%1%1"},
95 {a="v", b="_t"}, 133 {a="v", b="_t"},
96 {a="H", b=".h"}, 134 {a="H", b=".h"},
97 {a="%*", b="_d"}, 135 {a="%*", b="_d"},