diff options
author | Robert Alessi <alessi@robertalessi.net> | 2016-05-18 20:20:46 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2016-05-18 20:20:46 +0200 |
commit | f84ee7e82d37dac9180f352f29c68bac5c0c742a (patch) | |
tree | b7d60a5de4b77c3f0679b8fb2fdf441c38a97dcf /arabluatex.lua | |
parent | 9de240830b64aa93f0d2b66382a48c754afbd639 (diff) | |
download | arabluatex-f84ee7e82d37dac9180f352f29c68bac5c0c742a.tar.gz |
first implementation of \arbup viz. superscript tanwīn in |dmg| mode
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 9 |
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 |
124 | end | 124 | end |
125 | 125 | ||
126 | local function takeoutcap(str) | 126 | local 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 |
132 | end | 133 | end |
133 | 134 | ||
@@ -421,7 +422,7 @@ end | |||
421 | 422 | ||
422 | function processvoc(str, rules) | 423 | function 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 | ||
437 | function processfullvoc(str, rules) | 438 | function 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 | ||
452 | function processnovoc(str) | 453 | function 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) |