From 0d79b9e8e68240db85a066621ddf406f1bfdfe6b Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sat, 24 Jun 2023 19:15:28 +0200
Subject: added \ekd@parafootnotemark and \ekd@parafootnotetext. updated
 documentation

---
 ekdosis.dtx | 399 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 357 insertions(+), 42 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 8230ead..7364f5f 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -59,7 +59,7 @@ Alessi <alessi@robertalessi.net>
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{ekdosis}
 %<*package>
-    [2023/06/22 v1.5-dev Typesetting TEI xml-compliant critical editions]
+    [2023/06/24 v1.5-dev Typesetting TEI xml-compliant critical editions]
 %</package>
 %<*driver>
 \begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -199,6 +199,21 @@ Alessi <alessi@robertalessi.net>
       </imprint>
     </monogr>
   </biblStruct>
+  <biblStruct type="book" xml:id="KnuthTeXBook">
+    <monogr>
+      <title level="m">The TeXBook</title>
+      <author>
+        <forename>Donald E.</forename>
+        <surname>Knuth</surname>
+      </author>
+      <edition>32</edition>
+      <imprint>
+        <pubPlace>Reading, Mass.</pubPlace>
+        <publisher>Addison–Wesley</publisher>
+        <date>2013</date>
+      </imprint>
+    </monogr>
+  </biblStruct>
 </listBibl>
 \end{filecontents}
 \begin{filecontents}[overwrite]{\jobname.bib}
@@ -276,6 +291,16 @@ Alessi <alessi@robertalessi.net>
   location =	 {Cambridge, MA. -- London}
 }
 
+@Book{KnuthTeXBook,
+  title =	 {The {\TeX}Book},
+  author =	 {Knuth, Donald E.},
+  langid = 	 {english},
+  date =	 2013,
+  edition =	 32,
+  publisher =	 {Addison--Wesley},
+  location =	 {Reading, Mass.}
+}
+
 @Book{McDonald1916,
   author =	 {Shakespeare},
   editor =	 {MacDonald Alden, Raymond},
@@ -526,6 +551,7 @@ Alessi <alessi@robertalessi.net>
 \DeclareApparatus{rtl}[
         direction=RL,
         delim=\hskip0.75em]
+\DeclareApparatus{notes}[bhook=\textbf{Notes:}]
 \DeclareWitness{M}{M}{\emph{Marcianus Gr.} 269}[
         settlement=Venice,
         institution=Marciana Library,
@@ -604,6 +630,8 @@ Alessi <alessi@robertalessi.net>
 \DeclareSource{sDrak}{\emph{Drakenborch}}
 % Homer, Odyssey
 \DeclareScholar{hZen}{Zen.}[rawname=Zenodotus]
+% Footnotes
+\TeXtoTEIPat{\pno ~}{p. }
 % Shakespeare's Sonnets:
 \NewDocumentEnvironment{ekdcenter}{}{\par\centering}{\nobreak\par}
 \NewDocumentCommand{\ekdlettrine}{mm}{%
@@ -1957,12 +1985,13 @@ yesterday.
 % quoted or cited in the text of the edition (\emph{apparatus
 % fontium}), references to testimonia, or quotations of the edited
 % text by other authors (\emph{apparatus testium}), explanatory notes,
-% and so forth.\footnote{See below, \vref{ref:type-note}.} Once
-% additional layers have been defined and assigned to new
-% \enquote*{types}, such as \enquote*{testium} and the like, these
-% types can be used as values appended to the |type| \enquote*{named
-% option}. For more information about inserting notes in
-% multiple-layer apparatus, see \vref{sec:notes-in-multilayer-app}.
+% and so forth.\footnote{See below, \vnref{ref:type-note} and
+% \vnref{sec:footnotes} for details.} Once additional layers have been
+% defined and assigned to new \enquote*{types}, such as
+% \enquote*{testium} and the like, these types can be used as values
+% appended to the |type| \enquote*{named option}. For more information
+% about inserting notes in multiple-layer apparatus, see
+% \vref{sec:notes-in-multilayer-app}.
 %
 % \mansee \pkg{ekdosis} also provides a two-argument \cs{App} command
 % which is strictly equivalent to \cs{app} but allows for much more
@@ -3627,12 +3656,13 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % just loading the \pkg{fnpos} package in the
 % preamble.\footcite{fnpos}
 %
-% \danger The \pkg{footmisc} package\footcite{footmisc} is not
-% compatible with \pkg{ekdosis}. More precisely, \pkg{footmisc} is
-% incompatible with the way the \cs{footnote} command is defined
-% inside the |alignment| environment. Therefore, \pkg{footmisc} can
-% only be used on the condition that no regular \cs{footnote} be
-% inserted in the |alignment| environment.
+% \danger \phts\label{ref:footmisc} The \pkg{footmisc}
+% package\footcite{footmisc} is not compatible with
+% \pkg{ekdosis}. More precisely, \pkg{footmisc} is incompatible with
+% the way the \cs{footnote} command is defined inside the |alignment|
+% environment. Therefore, \pkg{footmisc} can only be used on the
+% condition that no regular \cs{footnote} be inserted in the
+% |alignment| environment.
 % 
 % \section{Laying Out the Apparatus Criticus}
 % \label{sec:apparatus-layout}
@@ -4410,6 +4440,214 @@ argument of the
 %
 % \subsection{Footnotes Combined Into a Single Paragraph}
 % \label{sec:footnotes}
+% \newfeature[v1.5] As already said \vpageref{ref:footmisc}, the
+% \pkg{footmisc} package is not compatible with
+% \pkg{ekdosis}. Therefore, it cannot be used to reformat short
+% footnotes so as to combine them all into a single paragraph.  This
+% is why \pkg{ekdosis} provides a mechanism of its own to insert such
+% footnotes in a specific layer of the apparatus criticus.
+%
+% \DescribeMacro{\SetFootnotes} \cs{SetFootnotes}\marg{csv list of
+% footnote settings} can be used either in the preamble or at any
+% point of the document to cause a new ouput routine to reformat the
+% notes into a single paragraph. This command accepts the following
+% list of |key-value| optional arguments:---
+% \DescribeOption{layout}|layout|$=$\verb+default|paragraph+
+% \hfill\tcboxverb{Default: not set}\\
+% |layout=paragraph| instructs \pkg{ekdosis} to reformat the notes
+% into a single paragraph, while |layout=default| reverts to the
+% standard output routine.\\
+% \DescribeOption{type}|type|$=$\meta{type}
+% \hfill\tcboxverb{Initially set as 'default'}\\
+% The keyword |type| is used here in the exact same meaning as
+% described above \vpageref{ref:app-type}.
+% \textoiquote|type|\textciquote\ refers to
+% any layer of critical notes defined by means of
+% \cs{DeclareApparatus}\footnote{See above
+% \vref{sec:declaring-layers}.} as fit to receive the footnotes shaped
+% as a single paragraph.\\
+% \DescribeOption{textfnmark}|textfnmark|$=$\marg{code}
+% \hfill\tcboxverb{Default: \textsuperscript{#1}}\\
+% |textfnmark| takes as value the code used to format the footnote
+% mark that is inserted in the main text. |#1| is the placeholder for
+% the figure that refers to the footnote. For instance,
+% |textfnmark=\textsuperscript{#1}| prints the footnote mark
+% superscripted.\\
+% \DescribeOption{appfnmark}|appfmark|$=$\marg{code}
+% \hfill\tcboxverb{Default: \textsuperscript{#1}}\\
+% |appfnmark| operates on the mark that is inserted in the footnote
+% block the same way as |textfnmark| does on the footnote mark in the
+% main text. As an example, |appfnmark=\hskip 1em\textsuperscript{#1}|
+% first inserts a generous spacing between the items then prints the
+% mark superscripted.
+%
+% \DescribeMacro{\footnote} \cs{footnote}\oarg{options}\marg{text}
+% When the mechanism described above is set in motion, the optional
+% argument of \cs{footnote} accepts the following list of optional
+% arguments:---\\
+% \DescribeOption{layout}|type|$=$\meta{type}
+% \hfill\tcboxverb{Default: as defined in \SetFoonotes}\\
+% |type| allows to specify any layer of critical notes in which the
+% contents of the footnote is to be printed.\\
+% \DescribeOption{mark}|mark|=\meta{mark}
+% \hfill\tcboxverb{Default: \thefootnote}\\
+% |mark| allows to print any other mark in place of the standard
+% footnote number. When this option is used, the |footnote| counter is
+% not incremented.
+%
+% \DescribeMacro{\footnotemark}\DescribeMacro{\footnotetext}
+% \cs{footnotemark}\oarg{mark} and
+% \cs{footnotetext}\oarg{options}\marg{text} are the companions of
+% \cs{footnote}. The former replaces the definition of and behaves as
+% its standard counterpart while the latter does the same as the
+% \cs{footnote} command described above and accepts the same optional
+% arguments except that it does not print any mark in the main text.
+%
+% \danger It is however not advisable to use \cs{footnotemark} and
+% \cs{footnotetext} for these commands are not suitable for
+% \texttt{TEI xml} export.
+%
+% The following example illustrates how short footnotes can be
+% combined into one single layer of critical notes:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+% Preamble:
+\DeclareApparatus{notes}[bhook=\textbf{Notes:}]
+\SetFootnotes{
+  layout = paragraph,
+  type = notes,
+  textfnmark = \textsuperscript{#1},
+  appfnmark = \unskip\hskip 1em\textsuperscript{#1}
+}
+
+% Document:
+\begin{ekdosis}
+  (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And now
+  for our next trick,\footnote{First footnote.} let's consider an
+  application to short footnotes.\footnote{Second footnote. (Every
+    once in a while, a long footnote might occur, just to make things
+    difficult.)} The footnotes\footnote{Third footnote.} at the bottom
+  of this page \app{\lem{look}\rdg{should look}}
+  funny,\footnote{Fourth footnote.}  because most of
+  them\footnote[mark=*, type=default]{This note \emph{doesn't count},
+    literally. And for some reason, I decided it should sneak into the
+    default layer of critical notes.} are quite short.\footnote{Fifth
+    footnote. (This is incredibly boring, but it's just an example.)}
+  When a document has lots of footnotes,\footnote{Another.} and when
+  most of them\footnote{And another.} take only a small part of a
+  line,\footnote{Ho hum.}  the output routine\footnote{Umpteenth
+    footnote.} ought to reformat them in some more appropriate
+  way.\footnote{Oodles of them.}
+\end{ekdosis}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \needspace{7\baselineskip}
+% PDF output:---
+% \medskip
+% \SetFootnotes{
+% layout = paragraph,
+% type = notes,
+% textfnmark = \textsuperscript{#1},
+% appfnmark = \unskip\hskip 1em\textsuperscript{#1}
+% }
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+% \setcounter{footnote}{0}
+%   \begin{specimen}
+%     (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And
+%     now for our next trick,\footnote{First footnote.} let's consider
+%     an application to short footnotes.\footnote{Second
+%     footnote. (Every once in a while, a long footnote might occur,
+%     just to make things difficult.)} The footnotes\footnote{Third
+%     footnote.} at the bottom of this page \app{\lem{look}\rdg{should
+%     look}} funny,\footnote{Fourth footnote.}  because most of
+%     them\footnote[mark=*, type=default]{This note \emph{doesn't
+%     count}, literally. And for some reason, I decided it should
+%     sneak into the default layer of critical notes.} are quite
+%     short.\footnote{Fifth footnote. (This is incredibly boring, but
+%     it's just an example.)}  When a document has lots of
+%     footnotes,\footnote{Another.} and when most of them\footnote{And
+%     another.} take only a small part of a line,\footnote{Ho hum.}
+%     the output routine\footnote{Umpteenth footnote.} ought to
+%     reformat them in some more appropriate way.\footnote{Oodles of
+%     them.}
+%   \end{specimen}
+% \end{alignment}
+% \SetFootnotes{layout = default}
+% 
+% \texttt{TEI xml} output:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p>(From 
+<bibl corresp="#KnuthTeXBook">
+  <biblScope>
+  <quote>Dirty Tricks</quote>, p.&#160;395</biblScope>
+</bibl>) And now for our next trick,
+<note place="bottom">First footnote.</note>let's consider
+an application to short footnotes.
+<note place="bottom">Second footnote. (Every once in a
+while, a long footnote might occur, just to make things
+difficult.)</note>The footnotes
+<note place="bottom">Third footnote.</note>at the bottom of
+this page 
+<app>
+  <lem>look</lem>
+  <rdg>should look</rdg>
+</app>funny,
+<note place="bottom">Fourth footnote.</note>because most of
+them
+<note type="default" place="bottom">This note 
+<emph>doesn't count</emph>, literally. And for some reason,
+I decided it should sneak into the default layer of
+critical notes.</note>are quite short.
+<note place="bottom">Fifth footnote. (This is incredibly
+boring, but it's just an example.)</note>When a document
+has lots of footnotes,
+<note place="bottom">Another.</note>and when most of them
+<note place="bottom">And another.</note>take only a small
+part of a line,
+<note place="bottom">Ho hum.</note>the output routine
+<note place="bottom">Umpteenth footnote.</note>ought to
+reformat them in some more appropriate way.
+<note place="bottom">Oodles of them.</note></p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \mansee Obviously, the mechanism just described only operates on
+% texts equipped with an apparatus criticus. A way to have footnotes
+% shaped as a single paragraph attached to a text that includes no
+% variants, such a translation arranged on the facing page, is
+% therefore to format this translation environment as if it were to
+% receive an apparatus criticus, then remove the line numbering from
+% it, like so:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+% Preamble:
+\SetAlignment{
+  texts=edition;translation,
+  apparatus=edition;translation
+}
+\AtBeginEnvironment{translation}{
+  \SetLineation{lineation=none}
+}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
 %
 % \needspace{4\baselineskip}
 % \section{Poetry}
@@ -4929,6 +5167,7 @@ substantiall fewell,}
 % \fi
 % \end{remarks}
 %
+% \needspace{14\baselineskip}
 % PDF output:---
 % \medskip
 %
@@ -4945,7 +5184,6 @@ substantiall fewell,}
 % \settowidth{\versewidth}{Feed'st thy lights flame with selfe
 % substantiall fewell,}
 % \FormatDiv{1}{\begin{ekdcenter}}{\end{ekdcenter}}
-% \needspace{7\baselineskip}
 % \resetlinenumber\resetvlinenumber
 % \begin{alignment}[flush,
 %   tcols=1,
@@ -8024,10 +8262,8 @@ Sample text with a \textcolor{red}{word} in red.
 %   \begin{enumerate}
 %   \item Poetry: \pkg{ekdosis} is now able to load and use the
 %     facilities provided by the \pkg{verse} package. Refined options
-%     will be added, such as metrical analysis.  Arabic poetry through
-%     the environments and commands provided by the \pkg{arabluatex}
-%     package will also be supported. Other packages will also be
-%     considered for inclusion, such as \pkg{poetry} or
+%     will be added, such as metrical analysis. Other packages will
+%     also be considered for inclusion, such as \pkg{poetry} or
 %     \pkg{teubner}. In the end, \pkg{ekdosis} will provide a way for
 %     the typesetting of poetry which will allow for more flexibility
 %     and compatibility with \texttt{TEI xml}.
@@ -8244,7 +8480,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \paragraph{\textsf{ekdosis} Symbol}
 % \begin{macro}{\eKd}
-% \changes{v1.5}{2023/06/22}{Prints \textsf{ekdosis} indentifying
+% \changes{v1.5}{2023/06/24}{Prints \textsf{ekdosis} indentifying
 % symbol} As of v1.5, \pkg{ekdosis} has its own identifying
 % symbol. It is produced by \cs{eKd} and best printed with the Old
 % Standard Greek font.
@@ -8507,7 +8743,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \begin{macro}{\teidirectE}
 % \changes{v1.3}{2021/08/18}{direct insertion of elements in the
 % \texttt{TEI xml} file}
-% \changes{v1.5}{2023/06/22}{direct insertion of empty elements in the
+% \changes{v1.5}{2023/06/24}{direct insertion of empty elements in the
 % \texttt{TEI xml} file}
 % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
 % does nothing in \LaTeX. It is only used to insert elements in the
@@ -8522,7 +8758,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \end{macro}
 % \end{macro}
 % \begin{macro}{\getTEIxmlid}
-% \changes{v1.5}{2023/06/22}{returns \texttt{TEI xml:ids} from a
+% \changes{v1.5}{2023/06/24}{returns \texttt{TEI xml:ids} from a
 % csv-list of ids} This command returns from a csv-list of unique
 % identifiers declared in commands such as \cs{DeclareWitness} and the
 % like a space-separated list of their corresponding |xml:id|s, each
@@ -8998,7 +9234,7 @@ Sample text with a \textcolor{red}{word} in red.
 \newlength{\ekd@app@localheight}
 %    \end{macrocode}
 % \begin{macro}{\localappheight}
-% \changes{v1.5}{2023/06/22}{changes the height of the apparatus
+% \changes{v1.5}{2023/06/24}{changes the height of the apparatus
 % criticus}
 % \cs{localappheight}\marg{dimen} can be used to change locally the
 % length of \cs{ekd@app@height} set by the |appheight| option of
@@ -9017,7 +9253,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addtoappheight}
-% \changes{v1.5}{2023/06/22}{increases or decreases the height of the
+% \changes{v1.5}{2023/06/24}{increases or decreases the height of the
 % apparatus criticus}
 % As the name suggests, in contrast to \cs{localappheight},
 % \cs{addtoappheight}\marg{dimen} is used to increase or decrease
@@ -9304,7 +9540,7 @@ Sample text with a \textcolor{red}{word} in red.
 % The following commands are provided to set and control the maximum
 % number of lines printed on each page.
 % \begin{macro}{\setmaxlines}
-% \changes{v1.5}{2023/06/22}{limits the number of lines per page}
+% \changes{v1.5}{2023/06/24}{limits the number of lines per page}
 % \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer
 % $\geq 1$, can be used either in the preamble or at any point of the
 % document to set the maximum number of lines to be printed on each
@@ -9315,7 +9551,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\localmaxlines}
-% \changes{v1.5}{2023/06/22}{changes the maximum number of lines
+% \changes{v1.5}{2023/06/24}{changes the maximum number of lines
 % locally}
 % Once a maximum number of lines per page has been set,
 % \cs{localmaxlines}\marg{n} can be used to adjust this number on a
@@ -9328,7 +9564,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addtomaxlines}
-% \changes{v1.5}{2023/06/22}{adds or subtracts lines from a given page}
+% \changes{v1.5}{2023/06/24}{adds or subtracts lines from a given page}
 % Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as
 % argument the number of lines one wishes to add or substract from the
 % number that has been set by \cs{setmaxlines}. As a result, \meta{n}
@@ -9341,7 +9577,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\nomaxlines}
-% \changes{v1.5}{2023/06/22}{unsets \cs{setmaxlines}}
+% \changes{v1.5}{2023/06/24}{unsets \cs{setmaxlines}}
 % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
 %    \begin{macrocode}
 \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9405,7 +9641,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\App}
-% \changes{v1.5}{2023/06/22}{To be used conjointly with
+% \changes{v1.5}{2023/06/24}{To be used conjointly with
 % \texttt{ekdosis.el}}
 % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and
 % accepts one optional argument like so:
@@ -10202,16 +10438,24 @@ Sample text with a \textcolor{red}{word} in red.
   code appfnmark = \protected\def\ekdappfnmark##1{#1},
   initial appfnmark = \textsuperscript{#1}
 }
-\newif\ifekd@fnmark
+%    \end{macrocode}
+% A conditional \cs{ifekd@chfnmark} is defined so that \pkg{ekdosis}
+% may know whether the footnote number has to be replaced with some
+% other mark.
+%    \begin{macrocode}
+\newif\ifekd@chfnmark
+%    \end{macrocode}
+% These are the keys to be used by \cs{ekd@parafootnote}:---
+%    \begin{macrocode}
 \ekvdefinekeys{ekd@infootnotes}{
   store type = \ekdfn@type,
   initial type = default,
-  code mark = \ekd@fnmarktrue
+  code mark = \ekd@chfnmarktrue
               \protected\def\ekd@fnmark@value{#1}
 }
 %    \end{macrocode}
 % \begin{macro}{\SetFootnotes}
-%   \changes{v1.5}{2023/06/22}{footnotes combined into a single
+%   \changes{v1.5}{2023/06/24}{footnotes combined into a single
 %   paragraph} \cs{SetFootnotes}\marg{options} can be used in the
 %   preamble or at any point of the document. |layout=paragraph|
 %   instructs \pkg{ekdosis} to combine all footnotes into a single
@@ -10223,20 +10467,22 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro} 
 % \begin{macro}{\ekd@parafootnote}
-%   \cs{ekd@parafootnote}\oarg{layer}\marg{contents} holds the new
+%   \cs{ekd@parafootnote}\oarg{options}\marg{contents} holds the new
 %   definition of \cs{footnote}. This command accepts an optional
 %   argument that can be used to specify the layer in which the
-%   contents of the footnote is to be printed.
+%   contents of the footnote is to be printed or any other mark to be
+%   printed in place of the footnote number.
 %    \begin{macrocode}
 \NewDocumentCommand{\ekd@parafootnote}{O{} m}{%
   \ifekd@state
     \bgroup
     \ekvset{ekd@infootnotes}{#1}%
-    \ifekd@fnmark
+    \ifekd@chfnmark
       \edef\ekd@parafn@mark{%
         \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}%
       \edef\ekd@inparafn@mark{%
-        \ekdappfnmark{\LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}%
+        \ekdappfnmark{%
+          \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}%
     \else
       \refstepcounter{footnote}%
       \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
@@ -10249,7 +10495,8 @@ Sample text with a \textcolor{red}{word} in red.
       \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}%
     \add@apparatus
     \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}%
-    \luadirect{tex.sprint(ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}%
+    \luadirect{tex.sprint(
+      ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}%
     \ekd@around@fnmark{\ekd@parafn@mark}%
     \ifekd@mapps
       \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}%
@@ -10263,6 +10510,70 @@ Sample text with a \textcolor{red}{word} in red.
 }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\ekd@parafootnotemark}
+% \cs{ekd@parafootnotemark}\oarg{mark} replaces the definition of the
+% standard \cs{footnotemark} command. 
+%    \begin{macrocode}
+\NewDocumentCommand{\ekd@parafootnotemark}{o}{%
+  \ifekd@state
+    \bgroup
+    \IfNoValueTF{#1}{%
+      \refstepcounter{footnote}%
+      \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
+    }{%
+      \edef\ekd@parafn@mark{%
+        \LRnum{\unexpanded\expandafter{#1}}}%
+    }%
+    \leavevmode
+    \ekd@around@fnmark{\ekd@parafn@mark}%
+    \egroup
+  \else
+    \IfNoValueTF{#1}{\footnotemark}{\footnotemark[#1]}%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ekd@parafootnotetext}
+%   \cs{ekd@parafootnotetext}\oarg{options}\marg{text} replaces the
+%   definition of the standard \cs{footnotetext} command. It does the
+%   same as \cs{ekd@parafootnote} except that it does not print any
+%   mark in the main text.
+%    \begin{macrocode}
+\NewDocumentCommand{\ekd@parafootnotetext}{O{} m}{%
+  \ifekd@state
+    \bgroup
+    \ekvset{ekd@infootnotes}{#1}%
+    \ifekd@chfnmark
+      \edef\ekd@parafn@mark{%
+        \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}%
+      \edef\ekd@inparafn@mark{%
+        \ekdappfnmark{%
+          \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}%
+    \else
+      \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
+      \edef\ekd@inparafn@mark{\ekdappfnmark{\LRnum{\thefootnote}}}%
+    \fi
+    \leavevmode
+    \stepcounter{ekd@lab}%
+    \zlabel{ekd:\theekd@lab}%
+    \luadirect{ekdosis.storeabspg(
+      \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}%
+    \add@apparatus
+    \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}%
+    \luadirect{tex.sprint(
+      ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}%
+    \ifekd@mapps
+      \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}%
+    \else
+      \unconditional@appin{\ekd@inparafn@mark #2}%
+    \fi
+    \egroup
+  \else
+    \footnotetext[#1]{#2}%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
 % \paragraph{Emendations and Conjectures}
 % Here follows the |key-value| options to be used by
 % \cs{SetCritSymbols} below:---
@@ -10375,7 +10686,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \end{macro}
 % \paragraph{Lacunae}
 % \begin{macro}{\ilabel}
-% \changes{v1.5}{2023/06/22}{recalls and sets the ending label of
+% \changes{v1.5}{2023/06/24}{recalls and sets the ending label of
 % lemmas used to mark lacunae in witnesses} When \cs{lem} has been
 % used with the optional argument |ilabel=<label>|,
 % \cs{ilabel}\marg{label} must be used to mark the point where the
@@ -10421,6 +10732,8 @@ Sample text with a \textcolor{red}{word} in red.
   \ekd@statetrue
   \ifekd@parafootnotes
     \RenewCommandCopy\footnote\ekd@parafootnote
+    \RenewCommandCopy\footnotemark\ekd@parafootnotemark
+    \RenewCommandCopy\footnotetext\ekd@parafootnotetext
   \fi
 }
 \NewDocumentCommand{\EkdosisOff}{}{%
@@ -10524,6 +10837,8 @@ Sample text with a \textcolor{red}{word} in red.
   \fi
   \ifekd@parafootnotes
     \RenewCommandCopy\footnote\ekd@parafootnote
+    \RenewCommandCopy\footnotemark\ekd@parafootnotemark
+    \RenewCommandCopy\footnotetext\ekd@parafootnotetext
   \fi
 }
 \NewDocumentCommand{\EkdosisColStop}{}{%
@@ -10704,7 +11019,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\ekdEOprint}
-% \changes{v1.5}{2023/06/22}{Sets headers and footers on
+% \changes{v1.5}{2023/06/24}{Sets headers and footers on
 % \enquote{paired} facing pages}
 % To set headers and footers on \enquote{paired} facing pages,
 % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like
@@ -10744,7 +11059,7 @@ Sample text with a \textcolor{red}{word} in red.
 % counter to set the value of the page numbers. This counter should be
 % incremented every two pages.
 % \begin{counter}{pairedpage}
-% \changes{v1.5}{2023/06/22}{A counter incremented every two pages}
+% \changes{v1.5}{2023/06/24}{A counter incremented every two pages}
 % |pairedpage| is first set as a global counter:---
 %    \begin{macrocode}
 \newcounter{pairedpage}
@@ -10752,19 +11067,19 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{counter}
 % \begin{macro}{\setpairedpagenum}
-%   \changes{v1.5}{2023/06/22}{sets the same page number on paired
+%   \changes{v1.5}{2023/06/24}{sets the same page number on paired
 %   pages} \cs{setpairedpagenum}\marg{number} is used just ahead of
 %   the alignment environment to set the number of the first left-hand
 %   paired page.
 % \begin{macro}{\setpairedpage}
-%   \changes{v1.5}{2023/06/22}{sets the page number of the first paired
+%   \changes{v1.5}{2023/06/24}{sets the page number of the first paired
 %   page} \cs{setpairedpage} is an argument-less command meant to be
 %   issued in commands used to set headers or footers before
 %   \cs{thepage}. This command has the counter |pairedpage|
 %   incremented on right-hand pages only, and sets |page| $\leftarrow$
 %   |pairedpage| on every page.
 % \begin{macro}{\resetpagenumber}
-%   \changes{v1.5}{2023/06/22}{resets normal running page numbers}
+%   \changes{v1.5}{2023/06/24}{resets normal running page numbers}
 %   \cs{resetpagenumber} must be used right out of \enquote{mirrored}
 %   paired pages alignment environments. This argument-less command
 %   corrects any numbering error on the page following the edition
-- 
cgit v1.2.3

