aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua36
1 files changed, 21 insertions, 15 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 11a91c3..84562be 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -128,15 +128,15 @@ local function breakcmd(str)
128 bodytext = string.sub(bodytext, 2, -2) 128 bodytext = string.sub(bodytext, 2, -2)
129 return string.format("\\al@brk{\\%s{%s}{\\arb{%s}}}", tag, bodycolor, bodytext) 129 return string.format("\\al@brk{\\%s{%s}{\\arb{%s}}}", tag, bodycolor, bodytext)
130 end) 130 end)
131 -- \arbcolor 131 -- -- \arbcolor
132 str = string.gsub(str, "(.)(\\arbcolor%s?)(%b[])(%b{})(.)", 132 -- str = string.gsub(str, "(.)(\\arbcolor%s?)(%b[])(%b{})(.)",
133 function (li, tag, opt, body, lii) 133 -- function (li, tag, opt, body, lii)
134 li = string.gsub(li, "%+", "‍") -- ^^^^200d 134 -- li = string.gsub(li, "%+", "‍") -- ^^^^200d
135 lii = string.gsub(lii, "%+", "‍") -- ^^^^200d 135 -- lii = string.gsub(lii, "%+", "‍") -- ^^^^200d
136 body = string.sub(body, 2, -2) 136 -- body = string.sub(body, 2, -2)
137 body = string.gsub(body, "%+", "‍") -- ^^^^200d 137 -- body = string.gsub(body, "%+", "‍") -- ^^^^200d
138 return string.format("%s%s%s{%s}%s", li, tag, opt, body, lii) 138 -- return string.format("%s%s%s{%s}%s", li, tag, opt, body, lii)
139 end) 139 -- end)
140 -- commands set by default in outofarb 140 -- commands set by default in outofarb
141 for i = 1,#outofarb do 141 for i = 1,#outofarb do
142 str = gsub(str, dblbkslash * lpeg.Cs(outofarb[i]) * cmdargs, "}%1%2%3\\arb{") 142 str = gsub(str, dblbkslash * lpeg.Cs(outofarb[i]) * cmdargs, "}%1%2%3\\arb{")
@@ -308,7 +308,8 @@ local function voc(str, rules)
308 inside = string.gsub(inside, null[i].a, null[i].b) 308 inside = string.gsub(inside, null[i].a, null[i].b)
309 end 309 end
310 inside = indnum(inside) 310 inside = indnum(inside)
311 return string.format("\\txarb{%s}", inside) 311-- return string.format("\\txarb{%s}", inside)
312 return string.format("%s", inside)
312 end) 313 end)
313return str 314return str
314end 315end
@@ -344,7 +345,8 @@ local function voceasy(str)
344 inside = string.gsub(inside, null[i].a, null[i].b) 345 inside = string.gsub(inside, null[i].a, null[i].b)
345 end 346 end
346 inside = indnum(inside) 347 inside = indnum(inside)
347 return string.format("\\txarb{%s}", inside) 348-- return string.format("\\txarb{%s}", inside)
349 return string.format("%s", inside)
348 end) 350 end)
349return str 351return str
350end 352end
@@ -397,7 +399,8 @@ local function fullvoc(str, rules)
397 inside = string.gsub(inside, null[i].a, null[i].b) 399 inside = string.gsub(inside, null[i].a, null[i].b)
398 end 400 end
399 inside = indnum(inside) 401 inside = indnum(inside)
400 return string.format("\\txarb{%s}", inside) 402-- return string.format("\\txarb{%s}", inside)
403 return string.format("%s", inside)
401 end) 404 end)
402return str 405return str
403end 406end
@@ -445,7 +448,8 @@ local function fullvoceasy(str, rules)
445 inside = string.gsub(inside, null[i].a, null[i].b) 448 inside = string.gsub(inside, null[i].a, null[i].b)
446 end 449 end
447 inside = indnum(inside) 450 inside = indnum(inside)
448 return string.format("\\txarb{%s}", inside) 451-- return string.format("\\txarb{%s}", inside)
452 return string.format("%s", inside)
449 end) 453 end)
450return str 454return str
451end 455end
@@ -481,7 +485,8 @@ local function novoc(str)
481 inside = string.gsub(inside, null[i].a, null[i].b) 485 inside = string.gsub(inside, null[i].a, null[i].b)
482 end 486 end
483 inside = indnum(inside) 487 inside = indnum(inside)
484 return string.format("\\txarb{%s}", inside) 488-- return string.format("\\txarb{%s}", inside)
489 return string.format("%s", inside)
485 end) 490 end)
486return str 491return str
487end 492end
@@ -517,7 +522,8 @@ local function novoceasy(str)
517 inside = string.gsub(inside, null[i].a, null[i].b) 522 inside = string.gsub(inside, null[i].a, null[i].b)
518 end 523 end
519 inside = indnum(inside) 524 inside = indnum(inside)
520 return string.format("\\txarb{%s}", inside) 525-- return string.format("\\txarb{%s}", inside)
526 return string.format("%s", inside)
521 end) 527 end)
522return str 528return str
523end 529end