diff options
author | Robert Alessi <alessi@robertalessi.net> | 2016-03-04 15:38:14 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2016-03-04 15:38:14 +0100 |
commit | c14faed02c1789d4bc8d4a0af460c69fd6c863ad (patch) | |
tree | 2e19727516079924f4b2b4bd33c9bdc8823db933 | |
parent | 790218142de1da738b0d7972fbff17473a456975 (diff) | |
download | arabluatex-c14faed02c1789d4bc8d4a0af460c69fd6c863ad.tar.gz |
first implementation of \edtext command
-rw-r--r-- | arabluatex.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 23abbc9..80b7aa5 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -41,6 +41,13 @@ return str | |||
41 | end | 41 | end |
42 | 42 | ||
43 | local function breakcmd(str) | 43 | local function breakcmd(str) |
44 | -- \edtext | ||
45 | str = string.gsub(str, "\\(edtext.-)(%b{})(%b{})", | ||
46 | function(tag, bodylem, bodyvar) | ||
47 | bodylem = string.sub(bodylem, 2, -2) | ||
48 | bodyvar = string.sub(bodyvar, 2, -2) | ||
49 | return string.format("\\LR{\\%s{%s}{%s}}", tag, bodylem, bodyvar) | ||
50 | end) | ||
44 | -- \RL | 51 | -- \RL |
45 | str = string.gsub(str, "\\(RL.-)(%b{})", | 52 | str = string.gsub(str, "\\(RL.-)(%b{})", |
46 | function(tag, body) | 53 | function(tag, body) |