From 8c4cfb2b61dde8b30b33bbc4dba5a3267edd36b5 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 15 Jun 2022 10:50:00 +0200 Subject: added distinction between dmg|dmg+ and \SetArbNumbers (either Indian [default] or Arabic). updated copyright dates. --- arabluatex_trans.lua | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) (limited to 'arabluatex_trans.lua') diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua index 455b57b..c5c0b05 100644 --- a/arabluatex_trans.lua +++ b/arabluatex_trans.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2020 Robert Alessi +Copyright (C) 2016--2022 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi @@ -202,6 +202,91 @@ hamzatrdmg = { {a="(i)(')([^uaiUAI])", b="%1ʾ%3"} } +hamzatrnoinitialdmg = { + -- next lines for ʾalif alone + {a="(%.A)l%-(%^n)", b=".|l-%2"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-O])(%.A)l%-(%^n)", b="%1.|l-%3"}, --additional (^n is lunar) --p + {a="(%.A)l%-([%_%^%.]?[tdrzsnc])", b=".|%2-%2"}, + {a="([%(%[%|%<%s%-O])(%.A)l%-([%_%^%.]?[tdrzsnc])", b="%1.|%3-%3"}, --p + {a="(%.A)([uai])l%-(%^n)", b="||%2l-%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-O])(%.A)([uai])l%-(%^n)", b="%1||%3l-%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="||%2%3-%3"}, + {a="([%(%[%|%<%s%-O])(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="%1||%3%4-%4"}, --p + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="||%2"}, + -- hard coded hamza + {a="|\"'", b="ʾ"}, + {a="A\"'", b="ʾA"}, + {a="[au]\"'", b="ʾ"}, + {a="w\"'", b="ʾ"}, + {a="i\"'", b="ʾ"}, + {a="y\"'", b="ʾ"}, + -- hamza takes tašdīd too + {a="''([Uu])", b="ʾʾ%1"}, + {a="''([Aa])", b="ʾʾ%1"}, + {a="''([Ii])", b="ʾʾ%1"}, + -- initial long u and i (for a, see below) + {a="%'%_U", b="||U"}, + {a="%'%_I", b="||I"}, + -- taḫfīfu 'l-hamza + {a="'u'([^uaiUAI])", b="|U%1"}, + {a="'i'([^uaiUAI])", b="|I%1"}, + {a="^u'([^uaiUAI])", b="U%1"}, + {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1U%2"}, + {a="^i'([^uaiUAI])", b="I%1"}, + {a="([^uaiUAIYN][%s%(%[%<])i'([^uaiUAI])", b="%1I%2"}, + -- madda (historic writing below) + {a="'a'([^uaiUAI])", b="ʾA%1"}, + {a="'a?A", b="ʾA"}, + {a="(A)(')(i)$", b="%1ʾ%3"}, + {a="(A)(')(i)(%W)", b="%1ʾ%3%4"}, + {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda + {a="(A)(')", b="%1ʾ"}, -- historic madda + -- initial (needs both ^ and %W patterns) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, + {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, + {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, + {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p + -- then the 'initial' rules for the remaining cases + {a="^(')([ua])", b="||%2"}, + {a="^(')(i)", b="||%2"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1||%3"}, + -- {a="(%W)(')(i)", b="%1||%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1||%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1||%3"}, + -- final + {a="([Iy])(')(aN)$", b="%1ʾ%3"}, + {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"}, + {a="([^uai])(')([uai]N?)$", b="%1ʾ%3"}, + {a="([^uai])(')([uai]N?)(%W)", b="%1ʾ%3%4"}, + {a="([UI])(')([uai])$", b="%1ʾ%3"}, + {a="([UI])(')([uai])(%W)", b="%1ʾ%3%4"}, + -- middle + {a="(U)(')", b="%1ʾ"}, + {a="([Iy])(')", b="%1ʾ"}, + {a="([^uai])(')([uU])", b="%1ʾ%3"}, + {a="([^uai])(')(%_?[aAY])", b="%1ʾ%3"}, + {a="([^uai])(')([iI])", b="%1ʾ%3"}, + {a="(u)(')([uU])", b="%1ʾ%3"}, + {a="(u)(')(%_?[aAY])", b="%1ʾ%3"}, + {a="(u)(')([iI])", b="%1ʾ%3"}, + {a="(a)(')(%_?[aAY])", b="%1ʾ%3"}, + {a="(a)(')([uU])", b="%1ʾ%3"}, + {a="(a)(')([iI])", b="%1ʾ%3"}, + {a="(i)(')(%_?[aAY])", b="%1ʾ%3"}, + {a="(i)(')([uU])", b="%1ʾ%3"}, + {a="(i)(')([iI])", b="%1ʾ%3"}, + {a="(a)(')([^uaiUAI])", b="%1ʾ%3"}, + {a="(u)(')([^uaiUAI])", b="%1ʾ%3"}, + {a="(i)(')([^uaiUAI])", b="%1ʾ%3"} +} + tanwintrdmg = { {a="%-?([uai]NU)(O)([ui])([%S]-O)", b="\\arbup{un%3}"}, {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"}, -- cgit v1.2.3