diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-05-29 10:07:17 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-05-29 10:07:17 +0200 |
commit | b6de514c212fc0cbf828f599702d91022de421ad (patch) | |
tree | a993d11005372177602e2f2ad55590f91351213e | |
parent | 8b6faaa71245194a1486871cc2b6e93d4e199c58 (diff) | |
download | arabluatex-b6de514c212fc0cbf828f599702d91022de421ad.tar.gz |
moved \RL, \LR, \RLfootnote, \LRfootnote and \LRmarginpar into 'albrkcmds'
-rw-r--r-- | arabluatex.lua | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 32b3ac7..acb7b06 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -57,6 +57,11 @@ 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{} |
59 | local albrkcmds = { | 59 | local albrkcmds = { |
60 | "RL", | ||
61 | "LR", | ||
62 | "RLfootnote", | ||
63 | "LRfootnote", | ||
64 | "LRmarginpar", | ||
60 | "item", | 65 | "item", |
61 | "Footnote", | 66 | "Footnote", |
62 | "Marginpar", | 67 | "Marginpar", |
@@ -100,18 +105,6 @@ local function breakcmd(str) | |||
100 | str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{") | 105 | str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{") |
101 | end | 106 | end |
102 | end | 107 | end |
103 | -- \RL | ||
104 | str = string.gsub(str, "\\(RL.-)(%b{})", | ||
105 | function(tag, body) | ||
106 | body = string.sub(body, 2, -2) | ||
107 | return string.format("}\\%s{%s}\\arb{", tag, body) | ||
108 | end) | ||
109 | -- \LR | ||
110 | str = string.gsub(str, "\\(LR.-)(%b{})", | ||
111 | function(tag, body) | ||
112 | body = string.sub(body, 2, -2) | ||
113 | return string.format("}\\%s{%s}\\arb{", tag, body) | ||
114 | end) | ||
115 | -- \textcolor | 108 | -- \textcolor |
116 | str = string.gsub(str, "\\(textcolor.?)(%b{})(%b{})", | 109 | str = string.gsub(str, "\\(textcolor.?)(%b{})(%b{})", |
117 | function(tag, bodycolor, bodytext) | 110 | function(tag, bodycolor, bodytext) |