aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua19
1 files changed, 14 insertions, 5 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index f6890ed..593dc6c 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -674,15 +674,24 @@ function cap(str)
674 str = string.gsub(str, "([^\\]%-['`])", "%1\\MakeUppercase ") 674 str = string.gsub(str, "([^\\]%-['`])", "%1\\MakeUppercase ")
675 str = string.gsub(str, "([^\\]%-ʿ)", "%1\\MakeUppercase ") 675 str = string.gsub(str, "([^\\]%-ʿ)", "%1\\MakeUppercase ")
676 str = string.gsub(str, "([^\\]%-ʾ)", "%1\\MakeUppercase ") 676 str = string.gsub(str, "([^\\]%-ʾ)", "%1\\MakeUppercase ")
677 elseif string.find(str, "[^\\]%-[^'`ʾʿ]") then 677 end
678 str = string.gsub(str, "([^\\]%-)", "%1\\MakeUppercase ") 678 if string.find(str, "[^\\]a?%-[^'`ʾʿ]") then
679 elseif string.find(str, "^['`ʾʿ]") then 679 str = string.gsub(str, "([^\\]a?%-)", "%1\\MakeUppercase ")
680 end
681 if string.find(str, "^['`ʾʿ]") then
680 str = string.gsub(str, "^(['`])", "%1\\MakeUppercase ") 682 str = string.gsub(str, "^(['`])", "%1\\MakeUppercase ")
681 str = string.gsub(str, "^(ʿ)", "%1\\MakeUppercase ") 683 str = string.gsub(str, "^(ʿ)", "%1\\MakeUppercase ")
682 str = string.gsub(str, "^(ʾ)", "%1\\MakeUppercase ") 684 str = string.gsub(str, "^(ʾ)", "%1\\MakeUppercase ")
683 else
684 str = "\\MakeUppercase "..str
685 end 685 end
686 if string.find(str, "%s['`ʾʿ]") then
687 str = string.gsub(str, "(%s['`][^%-])", "%1\\MakeUppercase ")
688 str = string.gsub(str, "(%sʿ)", "%1\\MakeUppercase ")
689 str = string.gsub(str, "(%sʾ)", "%1\\MakeUppercase ")
690 end
691-- str = string.gsub(str, "(%s[^'`ʾʿ])", "%1\\MakeUppercase ")
692-- else
693 str = "\\MakeUppercase "..str
694-- end
686return "\\txtrans{"..str.."}" 695return "\\txtrans{"..str.."}"
687end 696end
688 697