aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-03-04 15:38:14 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-03-04 15:38:14 +0100
commitc14faed02c1789d4bc8d4a0af460c69fd6c863ad (patch)
tree2e19727516079924f4b2b4bd33c9bdc8823db933
parent790218142de1da738b0d7972fbff17473a456975 (diff)
downloadarabluatex-c14faed02c1789d4bc8d4a0af460c69fd6c863ad.tar.gz
first implementation of \edtext command
-rw-r--r--arabluatex.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 23abbc9..80b7aa5 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -41,6 +41,13 @@ return str
41end 41end
42 42
43local function breakcmd(str) 43local function breakcmd(str)
44 -- \edtext
45 str = string.gsub(str, "\\(edtext.-)(%b{})(%b{})",
46 function(tag, bodylem, bodyvar)
47 bodylem = string.sub(bodylem, 2, -2)
48 bodyvar = string.sub(bodyvar, 2, -2)
49 return string.format("\\LR{\\%s{%s}{%s}}", tag, bodylem, bodyvar)
50 end)
44 -- \RL 51 -- \RL
45 str = string.gsub(str, "\\(RL.-)(%b{})", 52 str = string.gsub(str, "\\(RL.-)(%b{})",
46 function(tag, body) 53 function(tag, body)