From df712bbf9d5b41566e25993e7df1f53bcec82169 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 5 Jul 2020 19:09:05 +0200
Subject: still commenting the Implementation part

---
 ekdosis.dtx | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 6fa4895..91d3da5 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -2341,9 +2341,12 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 \ekvoProcessLocalOptions{ekdosis}
 %    \end{macrocode}
 % \paragraph{Required Packages} \label{ref:ekdrequirements} In
-% addition to \pkg{iftex} \pkg{expkv-opt} and \pkg{expkv-def}, a list
+% addition to \pkg{iftex}, \pkg{expkv-opt} and \pkg{expkv-def}, a list
 % of the packages that are required by \pkg{ekdosis} follows:---
 %    \begin{macrocode}
+% \RequirePackage{iftex} % already loaded above
+% \RequirePackage{expkv-opt} % already loaded above
+% \RequirePackage{expkv-def} % already loaded above
 \RequirePackage{luacode}
 \RequirePackage{paracol}
 \RequirePackage{xparse}
@@ -2681,6 +2684,15 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 \NewDocumentCommand{\SetUnitDelimiter}{m}{\def\ekd@unit@delim{#1}}
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\footnoteruletrue}
+% \begin{macro}{\footnoterulefalse}
+% As \pkg{ekdosis} takes care of drawing a rule separating the main
+% text from the apparatus block as well as layers of notes from each
+% other inside this block, it may not be desirable to have
+% the standard \LaTeX{} \enquote{footnoterule} printed on every page
+% of the edition text. \cs{footnoterulefalse} removes it while
+% \cs{footnoteruletrue} leaves it untouched. The latter is set by
+% default.
 %    \begin{macrocode}
 \def\ekd@default@rule{\rule{2truein}{0.5pt}}
 \newif\iffootnoterule
@@ -2697,20 +2709,48 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
   \dflt@pcol@footnoterule%
   \fi
 }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\SetDefaultRule}
+% By default, \pkg{ekdosis} draws separating rules the definition of
+% which is |\rule{2truein}{0.5pt}|. This can be changed in the
+% preamble or at any point of the document with
+% \cs{SetDefaultRule}\marg{\allowbreak{}rule definition}. Leaving this
+% argument empty as in \cs{SetDefaultRule}|{}| removes the rule.
+%    \begin{macrocode}
 \NewDocumentCommand{\SetDefaultRule}{m}{%
   \def\@tempa{#1}
   \ifx\@tempa\empty\def\ekd@default@rule{\mbox{}}%
   \else%
   \def\ekd@default@rule{#1}%
   \fi}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\NLS}
+% \cs{NLS} is adapted from a snippet written by Heiko Oberdiek. It is
+% used by \pkg{ekdosis} internally to prevent page breaks between
+% separating rules and subsequent notes. Therefore, it is not
+% documented.
+%    \begin{macrocode}
 \newcommand*{\NLS}{%
   \par%
   \nobreak%
   \vspace{-\parskip}%
   \noindent%
   \ignorespaces}
+%    \end{macrocode}
+% \end{macro}
+% This boolean is used to test if a given entry is to be preceded by a
+% numeral referring to the line of the edition text.
+%    \begin{macrocode}
 \newif\ifsubsq@unit
 \subsq@unittrue
+%    \end{macrocode}
+% \cs{add@@apparatus} inserts the apparatus block on a given page
+% either in the footnote floating block or in a float of its own,
+% depending on the value set in the |layout| global option.
+%    \begin{macrocode}
 \def\add@@apparatus{%
   \if@pkg@parnotes\parnotes\else\fi%
   \if@pkg@footins%
@@ -2737,10 +2777,18 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
   }%
   \fi%
 }
+%    \end{macrocode}
+% Before inserting any new entry, \cs{add@apparatus} is called
+% \cs{test@apparatus} to decide whether a new apparatus block must be
+% created on a given page.
+%    \begin{macrocode}
 \def\add@apparatus{%
   \test@apparatus%
   \ifbool{do@app}{\subsq@unitfalse\add@@apparatus}{}%
 }
+%    \end{macrocode}
+% \cs{append@app} inserts a bare (sub)entry in the apparatus...
+%    \begin{macrocode}
 \NewDocumentCommand{\append@app}{o +m}{%
   \ifekd@isinapp%
     \ifekd@state%
@@ -2749,17 +2797,36 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
       {\luadirect{ekdosis.appin(\luastringO{#2}, \luastringO{#1})}}%
     \fi%
   \fi}
+%    \end{macrocode}
+% while \cs{append@ln@app} inserts a (sub)entry possibly preceded by a
+% line number.
+%    \begin{macrocode}
 \NewDocumentCommand{\append@ln@app}{o +m}{%
   \IfNoValueTF{#1}
   {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2}))}}
   {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2},
       \luastringO{#1}))}}}
+%    \end{macrocode}
+% \begin{macro}{\EkdosisDefaultApparatus}
+% By default, \pkg{ekdosis} defines one layer of critical notes which
+% is called |default|. This name can be changed at any point of the
+% document with \cs{EkdosisDefaultApparatus}\marg{name}.
+%    \begin{macrocode}
 \ekvdefinekeys{appnote}{
    store type = \ekdan@type,
    initial type = default
  }
 \NewDocumentCommand{\EkdosisDefaultApparatus}{m}{%
   \ekvset{appnote}{type=#1}}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\app}
+% \cs{app}|[type=|\meta{type}|]|\marg{apparatus entries} takes one
+% mandatory argument and accepts one optional argument. |type=| refers
+% to the layer the note must go into and \meta{apparatus entries}
+% contains command used to insert the entries, either \cs{lem},
+% \cs{rdg} or \cs{note}:---
+%    \begin{macrocode}
 \NewDocumentCommand{\app}{O{} > { \TrimSpaces } +m}{%
   \begingroup
   \ekvset{appnote}{#1}%
@@ -2772,6 +2839,9 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
   \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}%
   \ekd@isinappfalse%
   \endgroup}
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
 \def\current@ref@arg#1#2{{%\textdir TLT%
     \unexpanded\expandafter{\ekd@refnumstyle}%
     \ifnum%
-- 
cgit v1.2.3

