From 184390672b3656bc70bd4f93dbb1a204dbe3d60c Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 29 Mar 2020 17:49:40 +0200
Subject: added appfontsize hook

---
 ekdosis.dtx | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 9d5583f..cf5fc4b 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -373,8 +373,10 @@ Running "make install" installs the files in the local TeX tree.
 % Hooks
 %    \begin{macrocode}
 \ekvdefinekeys{ekd@hooks}{
+  store appfontsize = \ekd@appfontsize,
   store refnumstyle = \ekd@refnumstyle,
   store postrefnum = \ekd@postrefnum,
+  initial appfontsize = \footnotesize,
   initial refnumstyle = \bfseries,
   initial postrefnum = ~
 }
@@ -382,7 +384,7 @@ Running "make install" installs the files in the local TeX tree.
 %    \end{macrocode}
 % Build and process the list of witnesses and hands.
 %    \begin{macrocode}
-\ekvdefinekeys{witness}{
+\ekvdefinekeys{ekd@witness}{
   store settlement = \settlement@value,
   store repository = \repository@value,
   store idno = \idno@value,
@@ -391,7 +393,7 @@ Running "make install" installs the files in the local TeX tree.
 }
 \NewDocumentCommand{\DeclareWitness}{m m m O{}}{%
   \bgroup
-  \ekvset{witness}{#4}
+  \ekvset{ekd@witness}{#4}
     \luadirect{ekdosis.newwitness(
       \luastringN{#1},
       \luastringN{#2},
@@ -466,7 +468,7 @@ Running "make install" installs the files in the local TeX tree.
 % Multi-layer apparatuses
 %    \begin{macrocode}
 \newif\ifekd@mapps
-\ekvdefinekeys{newapp}{
+\ekvdefinekeys{ekd@newapp}{
   choice direction = {LR = \def\direction@val{LR},
                       RL = \def\direction@val{RL}},
   store rule = \rule@val,
@@ -482,7 +484,7 @@ Running "make install" installs the files in the local TeX tree.
   \booltrue{subsq@unit@#1}
   \unless\ifekd@mapps\global\ekd@mappstrue\fi
   \bgroup
-  \ekvset{newapp}{#2}
+  \ekvset{ekd@newapp}{#2}
   \luadirect{ekdosis.newapparatus(
     \luastringN{#1},
     \luastring{\direction@val},
@@ -604,7 +606,7 @@ Running "make install" installs the files in the local TeX tree.
     \if@parnotesroman%
     \renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
     \parnoteclear\else\fi%
-    \footnotesize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
+    \ekd@appfontsize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
     \if@pkg@parnotes\parnotes\parnotereset\else\fi%
   }%
   \fi%
@@ -983,13 +985,13 @@ Running "make install" installs the files in the local TeX tree.
   \egroup%
   \subsq@unittrue%
 }
-\ekvdefinekeys{note}{
+\ekvdefinekeys{ekd@note}{
   store pre = \pre@value,
   store post = \post@value
 }
 \NewDocumentCommand{\ekd@note}{O{} m}{%
   \bgroup%
-  \ekvset{note}{#1}%
+  \ekvset{ekd@note}{#1}%
   \edef\note@contents{%
     \ekvifdefinedNoVal{note}{pre}{}{%
       \unexpanded\expandafter{\pre@value}}%
@@ -1003,7 +1005,7 @@ Running "make install" installs the files in the local TeX tree.
 \NewDocumentCommand{\ekd@note@star}{O{} m}{%
   \if@pkg@parnotes
     \bgroup%
-      \ekvset{note}{#1}%
+      \ekvset{ekd@note}{#1}%
       \edef\note@contents{%
         \ekvifdefinedNoVal{note}{pre}{}{%
           \unexpanded\expandafter{\pre@value}}%
@@ -1053,12 +1055,15 @@ Running "make install" installs the files in the local TeX tree.
 \NewDocumentCommand{\EkdosisOff}{}{%
   \ekd@statefalse%
 }
-\NewDocumentEnvironment{ekdosis}{+b}{%
+\def\ekd@setlineno{%
   \let\setpagewiselinenumbers\relax%
   \let\pagewiselinenumbers\relax%
   \let\endpagewiselinenumbers\relax%
   \let\runningpagewiselinenumbers\relax%
   \let\realpagewiselinenumbers\relax%
+}
+\NewDocumentEnvironment{ekdosis}{+b}{%
+  \ekd@setlineno%
   \begin{runninglinenumbers}
     \EkdosisStart
     \EkdosisOn#1}{%
@@ -1068,7 +1073,7 @@ Running "make install" installs the files in the local TeX tree.
 %    \end{macrocode}
 % Alignment:---
 %    \begin{macrocode}
-\ekvdefinekeys{align}{
+\ekvdefinekeys{ekd@align}{
   store tcols = \tcols@num,
   store lcols = \lcols@num,
   store texts = \texts@value,
@@ -1081,7 +1086,7 @@ Running "make install" installs the files in the local TeX tree.
   initial apparatus = edition,
 }
 \NewDocumentCommand{\SetEkdosisAlignment}{m}{
-  \ekvset{align}{#1}
+  \ekvset{ekd@align}{#1}
 }
 \NewDocumentCommand{\ekd@storecol}{m}{%
   \luadirect{ekdosis.storecurcol(\luastring{\thecolumn})}%
@@ -1092,7 +1097,7 @@ Running "make install" installs the files in the local TeX tree.
   \endgroup}{}{}
 \NewDocumentEnvironment{alignment}{O{}}
 {%
-  \ekvset{align}{#1}%
+  \ekvset{ekd@align}{#1}%
   \luadirect{ekdosis.mkenvdata(
     \luastring{\texts@value},
     "texts"
@@ -1919,8 +1924,10 @@ function ekdosis.storeabspg(n)
    return true
 end
 
+--
 -- Build environments to be aligned
 --
+
 local aligned_texts = {}
 local texts_w_apparatus = {}
 
-- 
cgit v1.2.3

