From 6f7b8e49be7093b2c67aee02f562b0491bd16c10 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 29 Mar 2018 11:10:20 +0200 Subject: new command \newarbmark{} for inserting new marks in arabluatex's arbmarks table --- arabluatex.dtx | 7 ++++++- arabluatex.lua | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 \luadirect{tex.sprint(processarbmarks(\luastringN{#1}))}% \egroup} % \end{macrocode} -% +% \end{macro} +% \begin{macro}{\newarbmark} +% \begin{macrocode} +\NewDocumentCommand{\newarbmark}{m m m}{% + \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}} +% \end{macrocode} % \end{macro} % \begin{environment}{arab} % 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) return str end +function newarbmark(abbr, rtlmk, ltrmk) + table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk}) + return true +end + function processarbmarks(str) if tex.textdir == "TLT" then for i = 1,#arbmarks do -- cgit v1.2.3