aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.dtx11
-rw-r--r--arabluatex.lua10
-rw-r--r--arabluatex_voc.lua13
3 files changed, 16 insertions, 18 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 8fb206b..736c44d 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -2385,12 +2385,12 @@ wa-ya.sIru ta.hta 'l-jild-i
2385 \ifx\@tempa\al@mode@fullvoc% 2385 \ifx\@tempa\al@mode@fullvoc%
2386 \bgroup\textdir TRT\arabicfont% 2386 \bgroup\textdir TRT\arabicfont%
2387 \luadirect{tex.sprint(processfullvoc(\luastringN{#2}, 2387 \luadirect{tex.sprint(processfullvoc(\luastringN{#2},
2388 \luastringO{\al@arb@rules}))}\egroup% 2388 \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
2389 \else% 2389 \else%
2390 \ifx\@tempa\al@mode@novoc% 2390 \ifx\@tempa\al@mode@novoc%
2391 \bgroup\textdir TRT\arabicfont% 2391 \bgroup\textdir TRT\arabicfont%
2392 \luadirect{tex.sprint(processnovoc(\luastringN{#2}, 2392 \luadirect{tex.sprint(processnovoc(\luastringN{#2},
2393 \luastringO{\al@arb@rules}))}\egroup% 2393 \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
2394 \else% 2394 \else%
2395 \ifx\@tempa\al@mode@trans% 2395 \ifx\@tempa\al@mode@trans%
2396 \bgroup\textdir TLT\al@trans@style% 2396 \bgroup\textdir TLT\al@trans@style%
@@ -2416,17 +2416,18 @@ wa-ya.sIru ta.hta 'l-jild-i
2416 \ifx\@tempa\al@mode@fullvoc% 2416 \ifx\@tempa\al@mode@fullvoc%
2417 \bgroup\pardir TRT\textdir TRT\arabicfont% 2417 \bgroup\pardir TRT\textdir TRT\arabicfont%
2418 \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}, 2418 \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY},
2419 \luastringO{\al@arb@rules}))}\egroup% 2419 \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
2420 \else% 2420 \else%
2421 \ifx\@tempa\al@mode@novoc% 2421 \ifx\@tempa\al@mode@novoc%
2422 \bgroup\pardir TRT\textdir TRT\arabicfont% 2422 \bgroup\pardir TRT\textdir TRT\arabicfont%
2423 \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}, 2423 \luadirect{tex.sprint(processnovoc(\luastringO{\BODY},
2424 \luastringO{\al@arb@rules}))}\egroup% 2424 \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
2425 \else \ifx\@tempa\al@mode@trans% 2425 \else \ifx\@tempa\al@mode@trans%
2426 \bgroup\pardir TLT\textdir TLT\al@trans@style% 2426 \bgroup\pardir TLT\textdir TLT\al@trans@style%
2427 \luadirect{tex.sprint(processtrans(\luastringO{\BODY}, 2427 \luadirect{tex.sprint(processtrans(\luastringO{\BODY},
2428 \luastringO{\al@trans@convention}, 2428 \luastringO{\al@trans@convention},
2429 \luastringO{\al@arb@rules}))}\egroup% 2429 \luastringO{\al@arb@rules},
2430 \luastringO{\al@input@scheme}))}\egroup%
2430 \else \fi\fi\fi\fi}[\par] 2431 \else \fi\fi\fi\fi}[\par]
2431% \end{macrocode} 2432% \end{macrocode}
2432% \end{environment} 2433% \end{environment}
diff --git a/arabluatex.lua b/arabluatex.lua
index 5400a62..b21ee63 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -485,12 +485,15 @@ function processvoc(str, rules, scheme)
485return str 485return str
486end 486end
487 487
488function processfullvoc(str, rules) 488function processfullvoc(str, rules, scheme)
489 str = "\\arb{".. str.."}" 489 str = "\\arb{".. str.."}"
490 str = takeoutcapetc(str) 490 str = takeoutcapetc(str)
491 str = protectarb(str) 491 str = protectarb(str)
492 str = breakcmd(str) 492 str = breakcmd(str)
493 str = holdcmd(str) 493 str = holdcmd(str)
494 if scheme == "buckwalter" then
495 str = processbuckw(str)
496 else end
494 if rules == "easy" then 497 if rules == "easy" then
495 str = fullvoceasy(str) 498 str = fullvoceasy(str)
496 elseif rules == "dflt" then 499 elseif rules == "dflt" then
@@ -500,12 +503,15 @@ function processfullvoc(str, rules)
500return str 503return str
501end 504end
502 505
503function processnovoc(str, rules) 506function processnovoc(str, rules, scheme)
504 str = "\\arb{".. str.."}" 507 str = "\\arb{".. str.."}"
505 str = takeoutcapetc(str) 508 str = takeoutcapetc(str)
506 str = protectarb(str) 509 str = protectarb(str)
507 str = breakcmd(str) 510 str = breakcmd(str)
508 str = holdcmd(str) 511 str = holdcmd(str)
512 if scheme == "buckwalter" then
513 str = processbuckw(str)
514 else end
509 if rules == "easy" then 515 if rules == "easy" then
510 str = novoceasy(str) 516 str = novoceasy(str)
511 elseif rules == "dflt" then 517 elseif rules == "dflt" then
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index 5c1fabf..59e861f 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -114,21 +114,13 @@ buckwalter = {
114 {a="^Aal%-?", b="al-"}, 114 {a="^Aal%-?", b="al-"},
115 {a="(%W)Aal%-?", b="%1al-"}, 115 {a="(%W)Aal%-?", b="%1al-"},
116 {a="([%-%s])Al%-?", b="%1\'l-"}, 116 {a="([%-%s])Al%-?", b="%1\'l-"},
117-- {a="([fw]a?)([tw]a?)Al", b="%1-%2-\'l-"},
118-- {a="([fw]a?)(bi?)Al", b="%1-%2-\'l-"},
119-- {a="([fw]a?)(l[ai]?l)Al", b="%1-%2-l-"},
120-- {a="(al%-[%a])(%~)", b="%1"},
121-- {a="([fltw]a?)Al%-?", b="%1-\'l-"},
122-- {a="(bi?)Al%-?", b="%1-'l-"},
123-- {a="(li?)Al%-?", b="%1-l-"},
124 {a="(\'l%-[%g])(%~)", b="%1"}, 117 {a="(\'l%-[%g])(%~)", b="%1"},
125 -- digraphs begin 118 -- digraphs begin
126 {a="([^a])A", b="%1\"A"},
127 {a="aA", b="A"}, 119 {a="aA", b="A"},
128 {a="uw([^%~])", b="U%1"}, 120 {a="uw([^%~])", b="U%1"},
129 {a="iy([^%~])", b="I%1"}, 121 {a="iy([^%~])", b="I%1"},
130 -- digraphs end 122 -- digraphs end
131 -- madda: get it back 123 -- madda: get it back now
132 {a="%@", b="A\"\'"}, 124 {a="%@", b="A\"\'"},
133 -- šadda: 125 -- šadda:
134 {a="([%g])(%~)", b="%1%1"}, 126 {a="([%g])(%~)", b="%1%1"},
@@ -149,8 +141,7 @@ buckwalter = {
149 {a="K", b="iN"}, 141 {a="K", b="iN"},
150 {a="o", b="\""}, 142 {a="o", b="\""},
151 -- hard-coded connective alif 143 -- hard-coded connective alif
152 {a="%[", b="ٱ"}, 144 {a="%[", b="ٱ"}
153-- {a="%_", b="--"},
154} 145}
155 146
156hamza = { 147hamza = {