diff options
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 9252127..3a405a2 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -27,6 +27,13 @@ require("arabluatex_fullvoc") | |||
27 | require("arabluatex_novoc") | 27 | require("arabluatex_novoc") |
28 | require("arabluatex_trans") | 28 | require("arabluatex_trans") |
29 | 29 | ||
30 | function isintable(table, value) | ||
31 | for _, v in pairs(table) do | ||
32 | if v == value then return true end | ||
33 | end | ||
34 | return false | ||
35 | end | ||
36 | |||
30 | local function protectarb(str) | 37 | local function protectarb(str) |
31 | str = string.gsub(str, "(\\arb.?)(%[.-%])(%b{})", "\\@arb%2%3") | 38 | str = string.gsub(str, "(\\arb.?)(%[.-%])(%b{})", "\\@arb%2%3") |
32 | str = string.gsub(str, "(\\begin.?)(%b{})(%b[])", "\\@begin%3%2") | 39 | str = string.gsub(str, "(\\begin.?)(%b{})(%b[])", "\\@begin%3%2") |
@@ -46,6 +53,8 @@ local function unprotectarb(str) | |||
46 | return str | 53 | return str |
47 | end | 54 | end |
48 | 55 | ||
56 | breakcmds = {} | ||
57 | |||
49 | local function breakcmd(str) | 58 | local function breakcmd(str) |
50 | -- process \item[], then \item[] | 59 | -- process \item[], then \item[] |
51 | str = string.gsub(str, "\\(item.?)(%b[])", | 60 | str = string.gsub(str, "\\(item.?)(%b[])", |