From 55bafcd5eba8427fd04bcde4d1af8291beea26f5 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 13 Nov 2018 16:36:25 +0100
Subject: misplaced conditionals

---
 ekdosis.dtx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 8dca80f..709d042 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -387,22 +387,24 @@ Running "make install" installs the files in the local TeX tree.
     ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}},
     "pg_ii")}%
   \ifbool{ekdstate}{\add@apparatus}{}%
-  #1}
+  \bgroup\inapptrue#1\egroup}
 \NewDocumentCommand{\lem}{o +m}{\nonotetrue#2%  
-  \nonotefalse\inapptrue%
+  \nonotefalse\bgroup\inappfalse%
   \ifbool{al@rlmode}%
   {\IfNoValueTF{#1}%
     {\obappend{\bgroup\setRL#2\egroup:}}%
     {\obappend{\bgroup\setRL#2\egroup{} #1:}}}%
   {\IfNoValueTF{#1}{\obappend{#2:}}{\obappend{#2 #1:}}}%
+  \egroup%
 }
 \NewDocumentCommand{\rdg}{o +m}{%
-  \inapptrue%
+  \bgroup\inappfalse%
   \ifbool{al@rlmode}%
   {\IfNoValueTF{#1}
     {\append{\bgroup\setRL#2\egroup}}
     {\append{\bgroup\setRL#2\egroup{} #1}}}
   {\IfNoValueTF{#1}{\append{#2}}{\append{#2 #1}}}%
+  \egroup%
 }
 \NewDocumentCommand{\note}{s +m}{%
   \ifnonote\else%
-- 
cgit v1.2.3

