aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-05-28 18:13:18 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-05-28 18:13:18 +0200
commit8b6faaa71245194a1486871cc2b6e93d4e199c58 (patch)
tree7611100eec85f5fe7b149a598a0bdefcc378adb2
parentd25d0378431299c184512fa1958bfc0ec9f18cb2 (diff)
downloadarabluatex-8b6faaa71245194a1486871cc2b6e93d4e199c58.tar.gz
moved \item into 'albrkcmds'
-rw-r--r--arabluatex.lua8
1 files changed, 1 insertions, 7 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index f6110f9..32b3ac7 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -57,6 +57,7 @@ end
57-- arabluatex. 'albrkcmds' is what is set by default. 'brkcmds' is 57-- arabluatex. 'albrkcmds' is what is set by default. 'brkcmds' is
58-- what may be set in the preamble as argument of \MkArbBreak{} 58-- what may be set in the preamble as argument of \MkArbBreak{}
59local albrkcmds = { 59local albrkcmds = {
60 "item",
60 "Footnote", 61 "Footnote",
61 "Marginpar", 62 "Marginpar",
62 "edtext", 63 "edtext",
@@ -99,13 +100,6 @@ local function breakcmd(str)
99 str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{") 100 str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{")
100 end 101 end
101 end 102 end
102 -- process \item[], then \item
103 str = string.gsub(str, "\\(item.?)(%b[])",
104 function(tag, body)
105 body = string.sub(body, 2, -2)
106 return string.format("}\\item[\\arb{%s}] \\arb{", body)
107 end)
108 str = string.gsub(str, "(\\item)(%s+)", "%1{}%2")
109 -- \RL 103 -- \RL
110 str = string.gsub(str, "\\(RL.-)(%b{})", 104 str = string.gsub(str, "\\(RL.-)(%b{})",
111 function(tag, body) 105 function(tag, body)