aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2017-12-31 11:54:06 +0100
committerRobert Alessi <alessi@robertalessi.net>2017-12-31 17:18:16 +0100
commit7150a889c1f25076397fc6acc3e15f65efb33732 (patch)
tree86be7fa3470495b0bb349e8396aaac71353f2a99
parent3804a9fe0de57821fa16c0b38073a41d80d5701d (diff)
downloadarabluatex-7150a889c1f25076397fc6acc3e15f65efb33732.tar.gz
\cap{} rules: more work was needed
-rw-r--r--arabluatex.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 2d5ccd2..2cf249a 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -681,17 +681,23 @@ function cap(str)
681 str = string.gsub(str, "([^\\]%-)(%a)", "%1\\MakeUppercase{%2}") 681 str = string.gsub(str, "([^\\]%-)(%a)", "%1\\MakeUppercase{%2}")
682 end 682 end
683 if string.find(str, "^['`ʾʿ]") then 683 if string.find(str, "^['`ʾʿ]") then
684 str = string.gsub(str, "^(['`])(%a)$", "%1\\MakeUppercase{%2}")
685 str = string.gsub(str, "^(ʿ)(%a)$", "%1\\MakeUppercase{%2}")
686 str = string.gsub(str, "^(ʾ)(%a)$", "%1\\MakeUppercase{%2}")
684 str = string.gsub(str, "^(['`])(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 687 str = string.gsub(str, "^(['`])(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
685 str = string.gsub(str, "^(ʿ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 688 str = string.gsub(str, "^(ʿ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
686 str = string.gsub(str, "^(ʾ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 689 str = string.gsub(str, "^(ʾ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
687 end 690 end
688 if string.find(str, "%s['`ʾʿ]") then 691 if string.find(str, "%s['`ʾʿ]") then
692 str = string.gsub(str, "(%s['`])(%a)$", "%1\\MakeUppercase{%2}")
693 str = string.gsub(str, "(%sʿ)(%a)$", "%1\\MakeUppercase{%2}")
694 str = string.gsub(str, "(%sʾ)(%a)$", "%1\\MakeUppercase{%2}")
689 str = string.gsub(str, "(%s['`])(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 695 str = string.gsub(str, "(%s['`])(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
690 str = string.gsub(str, "(%sʿ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 696 str = string.gsub(str, "(%sʿ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
691 str = string.gsub(str, "(%sʾ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3") 697 str = string.gsub(str, "(%sʾ)(%a)([^%-])", "%1\\MakeUppercase{%2}%3")
692 end 698 end
693 if string.find(str, "%s[ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč]") then 699 if string.find(str, "%s[ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč]") then
694 str = string.gsub(str, "(%s)([ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč])", "%1\\MakeUppercase{%2}") 700 str = string.gsub(str, "(%s)([ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč])", "%1\\MakeUppercase %2")
695 end 701 end
696 if string.find(str, "^[ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč]") then 702 if string.find(str, "^[ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč]") then
697 str = string.gsub(str, "^([ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč])", "\\MakeUppercase %1") 703 str = string.gsub(str, "^([ibtṯjgḥḫdḏrzsšṣḍṭẓġfqklmnhwyč])", "\\MakeUppercase %1")