From 02429663d98f4dfb91d504a362fc480393c14f8b Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Fri, 25 Oct 2019 11:03:31 +0200
Subject: apparatus layout options: either 'float' or 'footins' for now

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

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index fd99891..105dea3 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -310,6 +310,15 @@ Running "make install" installs the files in the local TeX tree.
 % Packages that are required by \package{ekdosis}:
 %    \begin{macrocode}
 \RequirePackage{xkeyval}
+\newif\if@pkg@float
+\newif\if@pkg@footins
+\define@choicekey{ekdosis.sty}{layout}{float, footins}[float]{%
+  \edef\layout@float{float}
+  \edef\layout@footins{footins}
+  \edef\@tempa{#1}
+  \ifx\@tempa\layout@float\@pkg@floattrue\fi
+  \ifx\@tempa\layout@footins\@pkg@floatfalse\@pkg@footinstrue\fi
+}
 \newif\if@parnotesroman
 \newif\if@pkg@parnotes
 \define@choicekey+{ekdosis.sty}{parnotes}{true, false, roman}[true]{%
@@ -339,7 +348,7 @@ Running "make install" installs the files in the local TeX tree.
   \AtBeginDocument{\luadirect{ekdosis.openteistream()}}%
   \AtEndDocument{\luadirect{ekdosis.closeteistream("tidy")}}
   \else\fi\fi\fi}
-\ExecuteOptionsX{}
+\ExecuteOptionsX{layout}
 \ProcessOptionsX\relax
 \newcommand{\dontusepackage}[2][]{%
   \@namedef{ver@#2.sty}{9999/12/31}%
@@ -557,6 +566,7 @@ idno={}, msName={}, origDate={}][3]{%
 \newfootnote{@ekd}
 \def\add@@apparatus{%
   \if@pkg@parnotes\parnotes\else\fi%
+  \if@pkg@footins%
   \bgroup%
   \ifrtl@app\setRL\fi%
   \blfootnote{%
@@ -570,14 +580,17 @@ idno={}, msName={}, origDate={}][3]{%
     \if@pkg@parnotes\parnotes\parnotereset\else\fi%
   }%
   \egroup%
-  % \keyparbox[b!]{}{\ifrtl@app\setRL\else\setLR\fi%
-  %   \if@pkg@parnotes%
-  %   \if@parnotesroman%
-  %   \renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
-  %   \parnoteclear\else\fi%
-  %   \footnotesize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
-  %   \if@pkg@parnotes\parnotes\parnotereset\else\fi%
-  % }%
+  \fi%
+  \if@pkg@float%
+  \keyparbox[b!]{}{\ifrtl@app\setRL\else\setLR\fi%
+    \if@pkg@parnotes%
+    \if@parnotesroman%
+    \renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
+    \parnoteclear\else\fi%
+    \footnotesize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
+    \if@pkg@parnotes\parnotes\parnotereset\else\fi%
+  }%
+  \fi%
   % \unless\ifekd@mapps\unconditional@appin{%
   %   \expandafter{\ekd@default@rule}\newline}\fi
 }
-- 
cgit v1.2.3

