diff options
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index acb7b06..a395929 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -62,7 +62,6 @@ local albrkcmds = { | |||
62 | "RLfootnote", | 62 | "RLfootnote", |
63 | "LRfootnote", | 63 | "LRfootnote", |
64 | "LRmarginpar", | 64 | "LRmarginpar", |
65 | "item", | ||
66 | "Footnote", | 65 | "Footnote", |
67 | "Marginpar", | 66 | "Marginpar", |
68 | "edtext", | 67 | "edtext", |
@@ -105,6 +104,13 @@ local function breakcmd(str) | |||
105 | str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{") | 104 | str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "}%1%2%3\\arb{") |
106 | end | 105 | end |
107 | end | 106 | end |
107 | -- process \item[], then \item[] | ||
108 | str = string.gsub(str, "\\(item.?)(%b[])", | ||
109 | function(tag, body) | ||
110 | body = string.sub(body, 2, -2) | ||
111 | return string.format("}\\item[\\arb{%s}] \\arb{", body) | ||
112 | end) | ||
113 | str = string.gsub(str, "(\\item)(%s+)", "%1{}%2") | ||
108 | -- \textcolor | 114 | -- \textcolor |
109 | str = string.gsub(str, "\\(textcolor.?)(%b{})(%b{})", | 115 | str = string.gsub(str, "\\(textcolor.?)(%b{})(%b{})", |
110 | function(tag, bodycolor, bodytext) | 116 | function(tag, bodycolor, bodytext) |