aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-05-18 20:20:46 +0200
committerRobert Alessi <alessi@robertalessi.net>2016-05-18 20:20:46 +0200
commitf84ee7e82d37dac9180f352f29c68bac5c0c742a (patch)
treeb7d60a5de4b77c3f0679b8fb2fdf441c38a97dcf /arabluatex.lua
parent9de240830b64aa93f0d2b66382a48c754afbd639 (diff)
downloadarabluatex-f84ee7e82d37dac9180f352f29c68bac5c0c742a.tar.gz
first implementation of \arbup viz. superscript tanwīn in |dmg| mode
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 0bb4756..eb0d55c 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -123,11 +123,12 @@ local function takeoutabjad(str)
123 return str 123 return str
124end 124end
125 125
126local function takeoutcap(str) 126local function takeoutcapetc(str)
127 str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body) 127 str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body)
128 body = string.sub(body, 2, -2) 128 body = string.sub(body, 2, -2)
129 return string.format("%s", body) 129 return string.format("%s", body)
130 end) 130 end)
131 str = string.gsub(str, "\\linebreak", "")
131 return str 132 return str
132end 133end
133 134
@@ -421,7 +422,7 @@ end
421 422
422function processvoc(str, rules) 423function processvoc(str, rules)
423 str = "\\arb{".. str.."}" 424 str = "\\arb{".. str.."}"
424 str = takeoutcap(str) 425 str = takeoutcapetc(str)
425 str = protectarb(str) 426 str = protectarb(str)
426 str = breakcmd(str) 427 str = breakcmd(str)
427 str = holdcmd(str) 428 str = holdcmd(str)
@@ -436,7 +437,7 @@ end
436 437
437function processfullvoc(str, rules) 438function processfullvoc(str, rules)
438 str = "\\arb{".. str.."}" 439 str = "\\arb{".. str.."}"
439 str = takeoutcap(str) 440 str = takeoutcapetc(str)
440 str = protectarb(str) 441 str = protectarb(str)
441 str = breakcmd(str) 442 str = breakcmd(str)
442 str = holdcmd(str) 443 str = holdcmd(str)
@@ -451,7 +452,7 @@ end
451 452
452function processnovoc(str) 453function processnovoc(str)
453 str = "\\arb{".. str.."}" 454 str = "\\arb{".. str.."}"
454 str = takeoutcap(str) 455 str = takeoutcapetc(str)
455 str = protectarb(str) 456 str = protectarb(str)
456 str = breakcmd(str) 457 str = breakcmd(str)
457 str = holdcmd(str) 458 str = holdcmd(str)