From c7838796f150e8fa37c8ceff6880590649e4d45f Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Wed, 17 Oct 2018 18:21:57 +0200
Subject: added \app{}, \lem{}, \rdg{} and \note{}. ekdosis now shares
 al@rlmode boolean with arabluatex

---
 ekdosis.dtx | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 3baefd9..461eaac 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -305,6 +305,7 @@ Running "make install" installs the files in the local TeX tree.
 \newbool{isapp}
 \newbool{ekdstate}
 \newbool{ekdstarted}
+\providebool{al@rlmode}
 \newcounter{ekd@lab}
 \NewDocumentCommand{\append}{+m}{%
   \ifbool{ekdstate}{%
@@ -315,6 +316,27 @@ Running "make install" installs the files in the local TeX tree.
     \stepcounter{ekd@lab}}{}}
 \NewDocumentCommand{\obappend}{+m}%
   {\luadirect{tex.sprint(mdvappend(\luastringN{#1}))}}
+\NewDocumentCommand{\app}{+m}{#1}
+% \NewDocumentCommand{\lem}{o +m}{%
+%   \IfNoValueTF{#1}{#2\obappend{#2:}}{#2\obappend{#2 #1:}}%
+% }
+\NewDocumentCommand{\lem}{o +m}{%
+  \ifbool{al@rlmode}%
+  {\IfNoValueTF{#1}%
+    {#2\obappend{\bgroup\setRL#2\egroup:}}%
+    {#2\obappend{\bgroup\setRL#2\egroup{} #1:}}}%
+  {\IfNoValueTF{#1}{#2\obappend{#2:}}{#2\obappend{#2 #1:}}}%
+}
+\NewDocumentCommand{\rdg}{o +m}{%
+  \ifbool{al@rlmode}%
+  {\IfNoValueTF{#1}
+    {\append{\bgroup\setRL#2\egroup}}
+    {\append{\bgroup\setRL#2\egroup{} #1}}}
+  {\IfNoValueTF{#1}{\append{#2}}{\append{#2 #1}}}%
+}
+\NewDocumentCommand{\note}{s +m}{%
+  \IfBooleanTF{#1}{\append{\footnote{#2}}}{\append{#2}}%
+}
 \NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}}
 \NewDocumentCommand{\testapparatus}{}{\luadirect{tex.sprint(testapparatus())}}
 \def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext}
-- 
cgit v1.2.3

