aboutsummaryrefslogtreecommitdiff
path: root/arabluatex_voc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex_voc.lua')
-rw-r--r--arabluatex_voc.lua84
1 files changed, 49 insertions, 35 deletions
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index 9b2a31c..6211b4b 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -2,24 +2,23 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2019 Robert Alessi 5Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
6Robert Alessi <alessi@robertalessi.net>
6 7
7Please send error reports and suggestions for improvements to Robert 8Permission to use, copy, modify, and distribute this software for any
8Alessi <alessi@robertalessi.net> 9purpose with or without fee is hereby granted, provided that the above
9 10copyright notice and this permission notice appear in all copies.
10This program is free software: you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation, either version 3 of the License, or
13(at your option) any later version.
14 11
15This program is distributed in the hope that it will be useful, but 12THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
16WITHOUT ANY WARRANTY; without even the implied warranty of 13WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
18General Public License for more details. 15ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 19
20You should have received a copy of the GNU General Public License 20Please send error reports and suggestions for improvements to Robert
21along with this program. If not, see 21Alessi <alessi@robertalessi.net>
22<http://www.gnu.org/licenses/>.
23--]] 22--]]
24 23
25arbmarks = { 24arbmarks = {
@@ -202,7 +201,7 @@ hamza = {
202 -- taḫfīfu 'l-hamza 201 -- taḫfīfu 'l-hamza
203 {a="'u'([^uaiUAI])", b="أU%1"}, 202 {a="'u'([^uaiUAI])", b="أU%1"},
204 {a="'i'([^uaiUAI])", b="إI%1"}, 203 {a="'i'([^uaiUAI])", b="إI%1"},
205 {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"}, 204 {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أ%2"},
206 {a="^u'([^uaiUAI])", b="اU%1"}, 205 {a="^u'([^uaiUAI])", b="اU%1"},
207 {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"}, 206 {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"},
208 {a="^i'([^uaiUAI])", b="اI%1"}, 207 {a="^i'([^uaiUAI])", b="اI%1"},
@@ -243,7 +242,7 @@ hamza = {
243 -- mi'aT is special orthography (unlike ^say'aN and .zim'aN): 242 -- mi'aT is special orthography (unlike ^say'aN and .zim'aN):
244 -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new 243 -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new
245 -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new 244 -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new
246 {a="(mi)(%')(a[Tt])", b="%1ائ%3"}, 245 {a="(mi)(%')(a[TtH])", b="%1ائ%3"},
247 {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"}, 246 {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"},
248 -- final hamzah is on the line after a letter of prolongation or a 247 -- final hamzah is on the line after a letter of prolongation or a
249 -- consonant with sukūn 248 -- consonant with sukūn
@@ -325,7 +324,7 @@ hamzaeasy = { -- differences marked below with 'easy'
325 -- taḫfīfu 'l-hamza 324 -- taḫfīfu 'l-hamza
326 {a="'u'([^uaiUAI])", b="أU%1"}, 325 {a="'u'([^uaiUAI])", b="أU%1"},
327 {a="'i'([^uaiUAI])", b="إI%1"}, 326 {a="'i'([^uaiUAI])", b="إI%1"},
328 {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"}, 327 {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أ%2"},
329 {a="^u'([^uaiUAI])", b="اU%1"}, 328 {a="^u'([^uaiUAI])", b="اU%1"},
330 {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"}, 329 {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"},
331 {a="^i'([^uaiUAI])", b="اI%1"}, 330 {a="^i'([^uaiUAI])", b="اI%1"},
@@ -368,7 +367,7 @@ hamzaeasy = { -- differences marked below with 'easy'
368 -- mi'aT is special orthography (unlike ^say'aN and .zim'aN) 367 -- mi'aT is special orthography (unlike ^say'aN and .zim'aN)
369 -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new 368 -- {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, --new
370 -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new 369 -- {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, --new
371 {a="(mi)(%')(a[Tt])", b="%1ائ%3"}, 370 {a="(mi)(%')(a[TtH])", b="%1ائ%3"},
372 {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"}, 371 {a="(mi)(%')(aN%_?[AY])", b="%1أ%3"},
373 -- easy (begin) 372 -- easy (begin)
374 -- The Munjid says that such words as radI'aN do not have the 373 -- The Munjid says that such words as radI'aN do not have the
@@ -443,9 +442,9 @@ tanwin = {
443 {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, 442 {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"},
444 {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, 443 {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
445 {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, 444 {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
446 {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, 445 {a="([TH])%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
447 {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new 446 {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new
448 {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, 447 {a="([^TAH])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
449 {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, 448 {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"},
450 -- assimilations (end) 449 -- assimilations (end)
451 {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"}, 450 {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"},
@@ -455,9 +454,9 @@ tanwin = {
455 {a="(B)%-?(\"aN)", b="%1"}, 454 {a="(B)%-?(\"aN)", b="%1"},
456 {a="%-?(\"aN)(_A)", b="ى"}, 455 {a="%-?(\"aN)(_A)", b="ى"},
457 {a="%-?(\"aN)(Y)", b="ى"}, 456 {a="%-?(\"aN)(Y)", b="ى"},
458 {a="(T)%-?(\"aN)", b="%1"}, 457 {a="([TH])%-?(\"aN)", b="%1"},
459 {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new 458 {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new
460 {a="([^TA])%-?(\"aN)", b="%1ا"}, 459 {a="([^TAH])%-?(\"aN)", b="%1ا"},
461 {a="%-?(\"iNI?)", b=""}, 460 {a="%-?(\"iNI?)", b=""},
462 -- quoted tanwīn (end) 461 -- quoted tanwīn (end)
463 {a="%-?(uN)", b="ٌ"}, 462 {a="%-?(uN)", b="ٌ"},
@@ -465,15 +464,15 @@ tanwin = {
465 -- needed by \arbcolor: 464 -- needed by \arbcolor:
466 {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, 465 {a="%-?(aN)(O[%S]-%_AO)", b="ً"},
467 {a="%-?(aN)(O[%S]-YO)", b="ً"}, 466 {a="%-?(aN)(O[%S]-YO)", b="ً"},
468 {a="(O[%S]-TO)%-?(aN)", b="ً"}, 467 {a="(O[%S]-[TH]O)%-?(aN)", b="ً"},
469 {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new 468 {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new
470 {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, 469 {a="(O[%S]-[^TAH]O)%-?(aN)", b="ًا"},
471 -- 470 --
472 {a="%-?(aN)(_A)", b="ًى"}, 471 {a="%-?(aN)(_A)", b="ًى"},
473 {a="%-?(aN)(Y)", b="ًى"}, 472 {a="%-?(aN)(Y)", b="ًى"},
474 {a="(T)%-?(aN)", b="%1ً"}, 473 {a="([TH])%-?(aN)", b="%1ً"},
475 {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new 474 {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new
476 {a="([^TA])%-?(aN)", b="%1ًا"}, 475 {a="([^TAH])%-?(aN)", b="%1ًا"},
477 {a="%-?(iNI?)", b="ٍ"} 476 {a="%-?(iNI?)", b="ٍ"}
478} 477}
479 478
@@ -492,9 +491,9 @@ tanwineasy = { -- 'easy' requires some lines to be taken out:
492-- {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, 491-- {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"},
493-- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, 492-- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
494-- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, 493-- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
495-- {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, 494-- {a="([TH])%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
496-- {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new 495-- {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%2%3%4%4"}, --new
497-- {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, 496-- {a="([^TAH])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
498-- {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, 497-- {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"},
499 -- assimilations (end) 498 -- assimilations (end)
500 {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"}, 499 {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"},
@@ -504,9 +503,9 @@ tanwineasy = { -- 'easy' requires some lines to be taken out:
504 {a="(B)%-?(\"aN)", b="%1"}, 503 {a="(B)%-?(\"aN)", b="%1"},
505 {a="%-?(\"aN)(_A)", b="ى"}, 504 {a="%-?(\"aN)(_A)", b="ى"},
506 {a="%-?(\"aN)(Y)", b="ى"}, 505 {a="%-?(\"aN)(Y)", b="ى"},
507 {a="(T)%-?(\"aN)", b="%1"}, 506 {a="([TH])%-?(\"aN)", b="%1"},
508 {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new 507 {a="([اآ])(ء)%-?(\"aN)", b="%1%2"}, --new
509 {a="([^TA])%-?(\"aN)", b="%1ا"}, 508 {a="([^TAH])%-?(\"aN)", b="%1ا"},
510 {a="%-?(\"iNI?)", b=""}, 509 {a="%-?(\"iNI?)", b=""},
511 -- quoted tanwīn (end) 510 -- quoted tanwīn (end)
512 {a="%-?(uN)", b="ٌ"}, 511 {a="%-?(uN)", b="ٌ"},
@@ -514,15 +513,15 @@ tanwineasy = { -- 'easy' requires some lines to be taken out:
514 -- needed by \arbcolor: 513 -- needed by \arbcolor:
515 {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, 514 {a="%-?(aN)(O[%S]-%_AO)", b="ً"},
516 {a="%-?(aN)(O[%S]-YO)", b="ً"}, 515 {a="%-?(aN)(O[%S]-YO)", b="ً"},
517 {a="(O[%S]-TO)%-?(aN)", b="ً"}, 516 {a="(O[%S]-[TH]O)%-?(aN)", b="ً"},
518 {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new 517 {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new
519 {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, 518 {a="(O[%S]-[^TAH]O)%-?(aN)", b="ًا"},
520 -- 519 --
521 {a="%-?(aN)(_A)", b="ًى"}, 520 {a="%-?(aN)(_A)", b="ًى"},
522 {a="%-?(aN)(Y)", b="ًى"}, 521 {a="%-?(aN)(Y)", b="ًى"},
523 {a="(T)%-?(aN)", b="%1ً"}, 522 {a="([TH])%-?(aN)", b="%1ً"},
524 {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new 523 {a="([اآ])(ء)%-?(aN)", b="%1%2ً"}, --new
525 {a="([^TA])%-?(aN)", b="%1ًا"}, 524 {a="([^TAH])%-?(aN)", b="%1ًا"},
526 {a="%-?(iNI?)", b="ٍ"} 525 {a="%-?(iNI?)", b="ٍ"}
527} 526}
528 527
@@ -836,6 +835,7 @@ single = {
836 {a="y", b="ي"}, 835 {a="y", b="ي"},
837 {a="T", b="ة"}, 836 {a="T", b="ة"},
838 -- additional characters (begin) 837 -- additional characters (begin)
838 {a="H", b="ه"},
839 {a="p", b="پ"}, 839 {a="p", b="پ"},
840 {a="v", b="ڤ"}, 840 {a="v", b="ڤ"},
841 {a="g", b="گ"}, 841 {a="g", b="گ"},
@@ -873,6 +873,19 @@ shortv = {
873 {a="i", b="ِ"} 873 {a="i", b="ِ"}
874} 874}
875 875
876punctuationhb = {
877 {a="%(%(", b="﴿"},
878 {a="%)%)", b="﴾"},
879 {a="%.", b="."},
880 -- replaced with the next two rules to make the Arabic comma work
881 -- after \abraces{}
882-- {a="([^0-9])%,", b="%1،"},
883 {a="%,", b="،"},
884 {a="([%d])%،", b="%1,"},
885 {a="%?", b="؟"},
886 {a="%;", b="؛"},
887}
888
876punctuation = { 889punctuation = {
877 {a="%(%(", b="﴿"}, 890 {a="%(%(", b="﴿"},
878 {a="%)%)", b="﴾"}, 891 {a="%)%)", b="﴾"},
@@ -899,6 +912,7 @@ punctuation = {
899} 912}
900 913
901null = { 914null = {
915 {a="%&", b="‍"}, -- That is ^^^^200d, the zero-width joiner
902 {a="%|", b=""}, 916 {a="%|", b=""},
903 {a="^%-", b=""}, 917 {a="^%-", b=""},
904 {a="([^0-9])(%-)", b="%1"}, 918 {a="([^0-9])(%-)", b="%1"},