aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-08-17 18:43:41 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-08-17 18:43:41 +0200
commite8334df26bb7864410a15798a212cc32725a8927 (patch)
tree59432d47b45cd6c25059880740240715254ff988
parentd6bd287017e43ce12724d43c63dfff26358a2231 (diff)
downloadarabluatex-e8334df26bb7864410a15798a212cc32725a8927.tar.gz
arabtex2utf: better handling of \prname
-rw-r--r--arabluatex.lua6
1 files changed, 5 insertions, 1 deletions
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)
675 str = "\\begin{arabexport}"..str 675 str = "\\begin{arabexport}"..str
676 str = string.gsub(str, "(\\prname)%s?(%b{})", function(tag, body) 676 str = string.gsub(str, "(\\prname)%s?(%b{})", function(tag, body)
677 body = string.sub(body, 2, -2) 677 body = string.sub(body, 2, -2)
678 return string.format("%s{\\arb[trans]{\\uc{%s}}}", tag, body) 678 if string.find(body, "\\uc%s?%b{}") then
679 return string.format("%s{%s}", tag, body)
680 else
681 return string.format("%s{\\arb[trans]{\\uc{%s}}}", tag, body)
682 end
679 end) 683 end)
680 str = string.gsub(str, "(\\begin%s?{arab})(%b[])", function(tag, body) 684 str = string.gsub(str, "(\\begin%s?{arab})(%b[])", function(tag, body)
681 if string.find(body, "trans") then 685 if string.find(body, "trans") then