From be0d79c762cdf06895110e3a623fef28a6773054 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Fri, 21 Feb 2020 10:12:30 +0100
Subject: better handling of hspace between the margin and the first unit
 (still needs improvement though)

---
 ekdosis.dtx | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 927866e..28b25a3 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -570,7 +570,7 @@ Running "make install" installs the files in the local TeX tree.
   \nobreak%
   \vspace{-\parskip}%
   \noindent%
-  \ignorespaces }
+  \ignorespaces}
 \NewDocumentCommand{\SetDefaultRule}{m}{%
   \def\@tempa{#1}
   \ifx\@tempa\empty\def\ekd@default@rule{\mbox{}}%
@@ -659,7 +659,7 @@ Running "make install" installs the files in the local TeX tree.
         \getrefnumber{#1}%
         \fi%
       }%
-      {\getrefnumber{#1}}
+      {\getrefnumber{#1}}%
       \else
       \ifsubsq@unit%
       %
@@ -685,7 +685,7 @@ Running "make install" installs the files in the local TeX tree.
       \getpagerefnumber{#2}.%
       \getrefnumber{#2}%
       \fi%
-    }
+    }%
   }%
 \def\current@ref{{\textdir TLT\noexpand\bfseries%
     \ifnum%
@@ -706,7 +706,7 @@ Running "make install" installs the files in the local TeX tree.
         \else
         \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}%
         \fi%
-      }{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}
+      }{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}%
       \else
       \ifsubsq@unit%
       %
@@ -732,7 +732,7 @@ Running "make install" installs the files in the local TeX tree.
       \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}.%
       \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}%
       \fi%
-    }
+    }%
   }%
 \define@cmdkeys[ekd]{lemrdg}[ekdlr@]{wit, alt, pre, post, prewit,
   postwit}
@@ -763,7 +763,7 @@ Running "make install" installs the files in the local TeX tree.
     \else%
     \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi%
     \fi%
-    \current@ref}%\hskip .25em}%
+    \current@ref{} }%\hskip .25em}%
   \else%
   \ifbool{al@rlmode}{%
     \edef\lem@app{%
@@ -774,7 +774,7 @@ Running "make install" installs the files in the local TeX tree.
       \else%
       \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi%
       \fi%
-      \current@ref%\hskip .25em
+      \current@ref{} %\hskip .25em
       \ifdefined\ekdlr@alt%
         \ifdefined\ekdlr@post%
           \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi
@@ -805,7 +805,7 @@ Running "make install" installs the files in the local TeX tree.
       \else%
       \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi%
       \fi%
-      \current@ref%\hskip .25em
+      \current@ref{} %\hskip .25em
       \ifdefined\ekdlr@alt%
         \ifdefined\ekdlr@pre%
           \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi
@@ -951,7 +951,7 @@ Running "make install" installs the files in the local TeX tree.
       \else%
       \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi%
       \fi%
-    \current@ref@arg{\ekdn@labelb}{\ekdn@labele}%\hskip .25em
+    \current@ref@arg{\ekdn@labelb}{\ekdn@labele} %\hskip .25em
       \ifdefined\ekdn@lem%
           {\textdir TRT\unexpanded\expandafter{\ekdn@lem}}%
           \unexpanded\expandafter{\ekdn@sep}\else\fi%
@@ -964,7 +964,7 @@ Running "make install" installs the files in the local TeX tree.
       \else%
       \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi%
       \fi%
-      \current@ref@arg{\ekdn@labelb}{\ekdn@labele}%\hskip .25em
+      \current@ref@arg{\ekdn@labelb}{\ekdn@labele} %\hskip .25em
       \ifdefined\ekdn@lem
         \ltx@ifpackageloaded{babel}%
           {\noexpand\selectlanguage{\languagename}%
@@ -1970,7 +1970,7 @@ function ekdosis.appout()
       local output = {}
       if next(apparatuses) == nil then
 	 -- table.insert(output, "BEGIN")
-	 table.insert(output, "\\noindent\\csname ekd@default@rule\\endcsname\\NLS\\noindent ")
+	 table.insert(output, "\\noindent\\csname ekd@default@rule\\endcsname\\NLS{}")
 --	 table.insert(output, "\\noindent ")
 	 for i in string.gmatch(t,
 				"<"..cur_abs_pg.."%-0>.-</"..cur_abs_pg.."%-0>")
@@ -1997,7 +1997,7 @@ function ekdosis.appout()
 	       then
 		  if n > 1
 		  then
-		     table.insert(output, "\\NLS\\noindent ")
+		     table.insert(output, "\\NLS{}")
 		  else
 		     table.insert(output, "\\noindent ")
 		  end
@@ -2005,18 +2005,18 @@ function ekdosis.appout()
 	       then
 		  if n > 1
 		  then
-		     table.insert(output, "\\NLS{}" .. apparatuses[n].rule .. "\\NLS\\noindent ")
+		     table.insert(output, "\\NLS{}" .. apparatuses[n].rule .. "\\NLS{}")
 		  else
 --		     table.insert(output, "\\noindent ")
-		     table.insert(output, apparatuses[n].rule .. "\\NLS\\noindent ")
+		     table.insert(output, apparatuses[n].rule .. "\\NLS{}")
 		  end
 	       else
 		  if n > 1
 		  then
-		     table.insert(output, "\\NLS\\csname ekd@default@rule\\endcsname\\NLS\\noindent ")
+		     table.insert(output, "\\NLS\\csname ekd@default@rule\\endcsname\\NLS{}")
 		  else
 --		     table.insert(output, "\\noindent ")
-		     table.insert(output, "\\csname ekd@default@rule\\endcsname\\NLS\\noindent ")
+		     table.insert(output, "\\csname ekd@default@rule\\endcsname\\NLS{}")
 		  end
 	       end
 	       if apparatuses[n].sep ~= ""
-- 
cgit v1.2.3

