From 7584e65460d4ce4340a755fdad9586fae4f031ee Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 20 Apr 2021 21:58:56 +0200
Subject: [0b18082] was wrong. corrected.

---
 ekdosis.dtx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index a1bbe10..c2e8e42 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -7670,6 +7670,7 @@ Sample text with a \textcolor{red}{word} in red.
 \newif\ifekd@state
 \newif\ifekd@isinapp
 \newif\ifekd@isinlem
+\newif\ifekd@appinapp
 %    \end{macrocode}
 % The next boolean is shared with \pkg{arabluatex}. \cs{LRnum} is used
 % internally to ensure that numerals referring to line spans are
@@ -8100,6 +8101,7 @@ Sample text with a \textcolor{red}{word} in red.
   \leavevmode
   \begingroup
   \ekvset{appnote}{#1}%
+  \ifekd@isinapp\ekd@appinapptrue\fi
   \ekd@isinapptrue%
   \stepcounter{ekd@lab}%
   \zlabel{ekd:\theekd@lab}%
@@ -8108,6 +8110,7 @@ Sample text with a \textcolor{red}{word} in red.
   \ifekd@state\add@apparatus\fi%
   \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}%
   \ekd@isinappfalse%
+  \ekd@appinappfalse
   \endgroup}
 %    \end{macrocode}
 % \end{macro}
@@ -8206,7 +8209,7 @@ Sample text with a \textcolor{red}{word} in red.
     {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-e}}
     =
     0
-    \ifekd@isinlem
+    \ifekd@appinapp
     \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}%
       \unexpanded\expandafter{\ekd@postrefnum}% issue the no    
     \fi
@@ -8235,7 +8238,7 @@ Sample text with a \textcolor{red}{word} in red.
     {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-e}}
     =
     0
-    \ifekd@isinlem
+    \ifekd@appinapp
     \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}%
       \unexpanded\expandafter{\ekd@postrefnum}% issue the no    
     \fi
-- 
cgit v1.2.3

