From f573b41e7bf05c8ae3e3b28de9ad2af75b72e923 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 24 Jun 2017 11:09:31 +0200 Subject: basic support for \textcolor{}{} in Arabic environment --- arabluatex.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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) body = string.sub(body, 2, -2) return string.format("}\\%s{%s}\\arb{", tag, body) end) + -- \textcolor + str = string.gsub(str, "\\(textcolor.-)(%b{})(%b{})", + function(tag, bodycolor, bodytext) + bodycolor = string.sub(bodycolor, 2, -2) + bodytext = string.sub(bodytext, 2, -2) + return string.format("}\\%s{%s}{\\arb{%s}}\\arb{", tag, bodycolor, bodytext) + end) -- Footnote str = string.gsub(str, "\\(Footnote.-)(%b{})", function(tag, body) -- cgit v1.2.3