aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-05-27 21:14:26 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-05-27 21:14:26 +0200
commit9db04636dc0a1c4cd0dff49e1c48a1612a8233e8 (patch)
tree002c08a97fd4efec676575c94e332a2f3646f5a9
parent98ce4d0b16045a6dad0306c79f8dce6478e5d1ea (diff)
downloadarabluatex-9db04636dc0a1c4cd0dff49e1c48a1612a8233e8.tar.gz
moved \edtext, \Footnote, \Marginpar and \arbmark into the new albrkcmds table
-rw-r--r--arabluatex.lua30
1 files changed, 1 insertions, 29 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 7db1cc8..3e7dd96 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -58,6 +58,7 @@ end
58local albrkcmds = { 58local albrkcmds = {
59 "Footnote", 59 "Footnote",
60 "Marginpar", 60 "Marginpar",
61 "edtext",
61 "arbmark" 62 "arbmark"
62} 63}
63local brkcmds = {} 64local brkcmds = {}
@@ -101,13 +102,6 @@ local function breakcmd(str)
101 return string.format("}\\item[\\arb{%s}] \\arb{", body) 102 return string.format("}\\item[\\arb{%s}] \\arb{", body)
102 end) 103 end)
103 str = string.gsub(str, "(\\item)(%s+)", "%1{}%2") 104 str = string.gsub(str, "(\\item)(%s+)", "%1{}%2")
104 -- \edtext
105 str = string.gsub(str, "\\(edtext.-)(%b{})(%b{})",
106 function(tag, bodylem, bodyvar)
107 bodylem = string.sub(bodylem, 2, -2)
108 bodyvar = string.sub(bodyvar, 2, -2)
109 return string.format("\\LR{\\%s{%s}{%s}}", tag, bodylem, bodyvar)
110 end)
111 -- \RL 105 -- \RL
112 str = string.gsub(str, "\\(RL.-)(%b{})", 106 str = string.gsub(str, "\\(RL.-)(%b{})",
113 function(tag, body) 107 function(tag, body)
@@ -127,34 +121,12 @@ local function breakcmd(str)
127 bodytext = string.sub(bodytext, 2, -2) 121 bodytext = string.sub(bodytext, 2, -2)
128 return string.format("}\\%s{%s}{\\arb{%s}}\\arb{", tag, bodycolor, bodytext) 122 return string.format("}\\%s{%s}{\\arb{%s}}\\arb{", tag, bodycolor, bodytext)
129 end) 123 end)
130--[[
131 -- Footnote
132 str = string.gsub(str, "\\(Footnote.-)(%b{})",
133 function(tag, body)
134 body = string.sub(body, 2, -2)
135 return string.format("}\\%s{%s}\\arb{", tag, body)
136 end)
137 -- Marginpar
138 str = string.gsub(str, "\\(Marginpar.-)(%b{})",
139 function(tag, body)
140 body = string.sub(body, 2, -2)
141 return string.format("}\\%s{%s}\\arb{", tag, body)
142 end)
143--]]
144 -- Abjad 124 -- Abjad
145 str = string.gsub(str, "\\(abjad.-)(%b{})", 125 str = string.gsub(str, "\\(abjad.-)(%b{})",
146 function(tag, body) 126 function(tag, body)
147 body = string.sub(body, 2, -2) 127 body = string.sub(body, 2, -2)
148 return string.format("}\\aemph{\\%s{%s}}\\arb{", tag, body) 128 return string.format("}\\aemph{\\%s{%s}}\\arb{", tag, body)
149 end) 129 end)
150--[[
151 -- Arbmark
152 str = string.gsub(str, "\\(arbmark.-)(%b{})",
153 function(tag, body)
154 body = string.sub(body, 2, -2)
155 return string.format("}\\%s{%s}\\arb{", tag, body)
156 end)
157--]]
158 return str 130 return str
159end 131end
160 132