From e8334df26bb7864410a15798a212cc32725a8927 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 17 Aug 2018 18:43:41 +0200 Subject: arabtex2utf: better handling of \prname --- arabluatex.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arabluatex.lua b/arabluatex.lua index 67c6cec..b87f2dc 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -675,7 +675,11 @@ local function processarbtoutf(str) str = "\\begin{arabexport}"..str str = string.gsub(str, "(\\prname)%s?(%b{})", function(tag, body) body = string.sub(body, 2, -2) - return string.format("%s{\\arb[trans]{\\uc{%s}}}", tag, body) + if string.find(body, "\\uc%s?%b{}") then + return string.format("%s{%s}", tag, body) + else + return string.format("%s{\\arb[trans]{\\uc{%s}}}", tag, body) + end end) str = string.gsub(str, "(\\begin%s?{arab})(%b[])", function(tag, body) if string.find(body, "trans") then -- cgit v1.2.3