diff options
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 8 |
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") |