diff options
author | Robert Alessi <alessi@robertalessi.net> | 2017-04-02 11:13:12 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2017-04-02 11:13:12 +0200 |
commit | 5fbee7b562274cee955d2b8ba47fc84d04449059 (patch) | |
tree | c789d9db79473ce91074fcea2a0ba9b9ee1e7a8c /arabluatex.lua | |
parent | f46c9c50cca7fc2f46c799a4fff3a271992c894d (diff) | |
download | arabluatex-5fbee7b562274cee955d2b8ba47fc84d04449059.tar.gz |
new \Cap command that does the same as \cap but is never discarded; it is used internally to protect \cap when it is necessary
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index c71fe10..8644588 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -157,6 +157,11 @@ local function takeoutabjad(str) | |||
157 | end | 157 | end |
158 | 158 | ||
159 | local function takeoutcapetc(str) | 159 | local function takeoutcapetc(str) |
160 | str = string.gsub(str, "(\\arb.?%[trans%])(%b{})", function(tag, body) | ||
161 | body = string.sub(body, 2, -2) | ||
162 | body = string.gsub(body, "(\\cap%s?)(%b{})", "\\Cap%2") | ||
163 | return string.format("%s{%s}", tag, body) | ||
164 | end) | ||
160 | str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body) | 165 | str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body) |
161 | body = string.sub(body, 2, -2) | 166 | body = string.sub(body, 2, -2) |
162 | return string.format("%s", body) | 167 | return string.format("%s", body) |