From f84ee7e82d37dac9180f352f29c68bac5c0c742a Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 18 May 2016 20:20:46 +0200 Subject: =?UTF-8?q?first=20implementation=20of=20\arbup=20viz.=20superscri?= =?UTF-8?q?pt=20tanw=C4=ABn=20in=20|dmg|=20=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arabluatex.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arabluatex.lua') 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) return str end -local function takeoutcap(str) +local function takeoutcapetc(str) str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) return string.format("%s", body) end) + str = string.gsub(str, "\\linebreak", "") return str end @@ -421,7 +422,7 @@ end function processvoc(str, rules) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) @@ -436,7 +437,7 @@ end function processfullvoc(str, rules) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) @@ -451,7 +452,7 @@ end function processnovoc(str) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) -- cgit v1.2.3