aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2017-06-24 11:09:31 +0200
committerRobert Alessi <alessi@robertalessi.net>2017-06-24 11:09:31 +0200
commitf573b41e7bf05c8ae3e3b28de9ad2af75b72e923 (patch)
treeb6c193142988e5deacdac9890e84988073bb25ed
parent8e127205b9c18e2b2c4e175e1be08bf0295a8c0f (diff)
downloadarabluatex-f573b41e7bf05c8ae3e3b28de9ad2af75b72e923.tar.gz
basic support for \textcolor{}{} in Arabic environment
-rw-r--r--arabluatex.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 8644588..ffdc7c7 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -73,6 +73,13 @@ local function breakcmd(str)
73 body = string.sub(body, 2, -2) 73 body = string.sub(body, 2, -2)
74 return string.format("}\\%s{%s}\\arb{", tag, body) 74 return string.format("}\\%s{%s}\\arb{", tag, body)
75 end) 75 end)
76 -- \textcolor
77 str = string.gsub(str, "\\(textcolor.-)(%b{})(%b{})",
78 function(tag, bodycolor, bodytext)
79 bodycolor = string.sub(bodycolor, 2, -2)
80 bodytext = string.sub(bodytext, 2, -2)
81 return string.format("}\\%s{%s}{\\arb{%s}}\\arb{", tag, bodycolor, bodytext)
82 end)
76 -- Footnote 83 -- Footnote
77 str = string.gsub(str, "\\(Footnote.-)(%b{})", 84 str = string.gsub(str, "\\(Footnote.-)(%b{})",
78 function(tag, body) 85 function(tag, body)