diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-03-29 11:10:20 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-03-29 11:23:44 +0200 |
commit | 6f7b8e49be7093b2c67aee02f562b0491bd16c10 (patch) | |
tree | 82c60e0643aafe5e9868b112aa7cf851ba8dd3a4 | |
parent | cfd766fedcce6ea9587d352e7c1f316d45bdef16 (diff) | |
download | arabluatex-6f7b8e49be7093b2c67aee02f562b0491bd16c10.tar.gz |
new command \newarbmark{} for inserting new marks in arabluatex's arbmarks table
-rw-r--r-- | arabluatex.dtx | 7 | ||||
-rw-r--r-- | arabluatex.lua | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx index 53a7ed4..121de84 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx | |||
@@ -3752,7 +3752,12 @@ wa-ya.sIru ta.hta 'l-jild-i | |||
3752 | \luadirect{tex.sprint(processarbmarks(\luastringN{#1}))}% | 3752 | \luadirect{tex.sprint(processarbmarks(\luastringN{#1}))}% |
3753 | \egroup} | 3753 | \egroup} |
3754 | % \end{macrocode} | 3754 | % \end{macrocode} |
3755 | % | 3755 | % \end{macro} |
3756 | % \begin{macro}{\newarbmark} | ||
3757 | % \begin{macrocode} | ||
3758 | \NewDocumentCommand{\newarbmark}{m m m}{% | ||
3759 | \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}} | ||
3760 | % \end{macrocode} | ||
3756 | % \end{macro} | 3761 | % \end{macro} |
3757 | % \begin{environment}{arab} | 3762 | % \begin{environment}{arab} |
3758 | % The |arab| environment does for paragraphs the same as \cs{arb} does | 3763 | % The |arab| environment does for paragraphs the same as \cs{arb} does |
diff --git a/arabluatex.lua b/arabluatex.lua index 3d25a05..cd0bfa2 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -671,6 +671,11 @@ function processtrans(str, mode, rules, scheme) | |||
671 | return str | 671 | return str |
672 | end | 672 | end |
673 | 673 | ||
674 | function newarbmark(abbr, rtlmk, ltrmk) | ||
675 | table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk}) | ||
676 | return true | ||
677 | end | ||
678 | |||
674 | function processarbmarks(str) | 679 | function processarbmarks(str) |
675 | if tex.textdir == "TLT" then | 680 | if tex.textdir == "TLT" then |
676 | for i = 1,#arbmarks do | 681 | for i = 1,#arbmarks do |