From e00574a47b824272c5a30d7bd206e8e27b8c6c28 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sat, 19 Apr 2025 09:32:24 +0200
Subject: added additional to the options of \DeclareWitness

---
 ekdosis.dtx | 71 +++++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 26 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 730de36..e6669c6 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>
-    [2025/04/02 v1.5-dev Typesetting TEI xml-compliant critical editions]
+    [2025/04/19 v1.5-dev Typesetting TEI xml-compliant critical editions]
 %</package>
 %<*driver>
 \begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -1603,7 +1603,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 % used to identify the date of origin for the witness.\\
 % \DescribeOption{locus} |locus|$=$\meta{locus}\newfeature[v1.3]: The
 % sequence of folio references where the edition text is found in the
-% manuscript.
+% manuscript.\\
+% \DescribeOption{additional}
+% |additional|$=$\meta{additional}\newfeature[v1.5]: Any additional
+% information about the manuscript that can be provided as either one
+% or more paragraphs. \danger In this latter case, the paragraphs must
+% be inserted in \env{ekdpar} environments as described
+% \vref{ref:ekdpar}. It is then necessary to set |autopar=true| in the
+% preamble before declaring the witnesses. If required, |autopar| can
+% be set back to |false| in the document.\footnote{For more
+% information on this technique, see \vref{ref:autopar}.}
 %
 % \phts\label{ref:marcianus-b}
 % To take here one example, a witness such as the \emph{Marcianus
@@ -1622,7 +1631,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
         msName=Marcianus Gr.,
         idno=269,
         origDate=s. X,
-        locus=fol. 416\textsuperscript{v}–426\textsuperscript{v}]
+        locus=fol. 416\textsuperscript{v}–426\textsuperscript{v},
+        additional={The accidents suffered by this manuscript
+          predate the three series of signatures.}]
 \end{minted}
 % \iffalse
 %</example>
@@ -7273,8 +7284,8 @@ I saw my friend +\textcolor{lavender}{Peter}+ yesterday.
 % \cs{SetAlignment}.\footnote{See above
 % \vref{sec:multiple-alignment}.}  At the time of writing, there is
 % only one option, as follows:---\\
-% \DescribeOption{autopar} |autopar|$=$\verb+true|false+
-% \hfill\tcboxverb{Default: true}\\
+% \DescribeOption{autopar} \phts\label{ref:autopar}
+% |autopar|$=$\verb+true|false+ \hfill\tcboxverb{Default: true}\\
 % The algorithm described above applies for edition texts composed in
 % running paragraphs or lines of poetry, but it may fail to produce a
 % valid \texttt{TEI xml} output with other arrangements, such as
@@ -7289,6 +7300,7 @@ I saw my friend +\textcolor{lavender}{Peter}+ yesterday.
 % |autopar=false| is provided below in
 % \vref{sec:specific-tei-modules}.
 %
+% \phts\label{ref:ekdpar}
 % \DescribeEnv{ekdpar} \cs{begin}|{ekdpar}| \dots\ \cs{end}|{ekdpar}|
 % is a simple environment that does nothing but insert \cs{par}
 % primitives. It can be used to instruct \pkg{ekdosis} to place
@@ -8520,7 +8532,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \paragraph{\textsf{ekdosis} Symbol}
 % \begin{macro}{\eKd}
-% \changes{v1.5}{2025/04/02}{Prints \textsf{ekdosis} indentifying
+% \changes{v1.5}{2025/04/19}{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.
@@ -8601,7 +8613,8 @@ Sample text with a \textcolor{red}{word} in red.
   store idno = \idno@value,
   store msName = \msName@value,
   store origDate = \origDate@value,
-  store locus = \locus@value
+  store locus = \locus@value,
+  store additional = \additional@value
 }
 %    \end{macrocode}
 % \begin{macro}{\DeclareWitness} \cs{DeclareWitness} is a
@@ -8625,7 +8638,8 @@ Sample text with a \textcolor{red}{word} in red.
       \luastringO{\idno@value},
       \luastringO{\msName@value},
       \luastringO{\origDate@value},
-      \luastringO{\locus@value})}
+      \luastringO{\locus@value},
+      \luastringO{\additional@value})}
     \egroup
   }
 \@onlypreamble\DeclareWitness
@@ -8783,7 +8797,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}{2025/04/02}{direct insertion of empty elements in the
+% \changes{v1.5}{2025/04/19}{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
@@ -8798,7 +8812,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \end{macro}
 % \end{macro}
 % \begin{macro}{\getTEIxmlid}
-% \changes{v1.5}{2025/04/02}{returns \texttt{TEI xml:ids} from a
+% \changes{v1.5}{2025/04/19}{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
@@ -9274,7 +9288,7 @@ Sample text with a \textcolor{red}{word} in red.
 \newlength{\ekd@app@localheight}
 %    \end{macrocode}
 % \begin{macro}{\localappheight}
-% \changes{v1.5}{2025/04/02}{changes the height of the apparatus
+% \changes{v1.5}{2025/04/19}{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
@@ -9293,7 +9307,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addtoappheight}
-% \changes{v1.5}{2025/04/02}{increases or decreases the height of the
+% \changes{v1.5}{2025/04/19}{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
@@ -9582,7 +9596,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}{2025/04/02}{limits the number of lines per page}
+% \changes{v1.5}{2025/04/19}{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
@@ -9593,7 +9607,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\localmaxlines}
-% \changes{v1.5}{2025/04/02}{changes the maximum number of lines
+% \changes{v1.5}{2025/04/19}{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
@@ -9606,7 +9620,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addtomaxlines}
-% \changes{v1.5}{2025/04/02}{adds or subtracts lines from a given page}
+% \changes{v1.5}{2025/04/19}{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}
@@ -9619,7 +9633,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\nomaxlines}
-% \changes{v1.5}{2025/04/02}{unsets \cs{setmaxlines}}
+% \changes{v1.5}{2025/04/19}{unsets \cs{setmaxlines}}
 % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
 %    \begin{macrocode}
 \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9683,7 +9697,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\App}
-% \changes{v1.5}{2025/04/02}{To be used conjointly with
+% \changes{v1.5}{2025/04/19}{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:
@@ -10668,7 +10682,7 @@ Sample text with a \textcolor{red}{word} in red.
 }
 %    \end{macrocode}
 % \begin{macro}{\SetFootnotes}
-%   \changes{v1.5}{2025/04/02}{footnotes combined into a single
+%   \changes{v1.5}{2025/04/19}{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
@@ -10899,7 +10913,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \end{macro}
 % \paragraph{Lacunae}
 % \begin{macro}{\ilabel}
-% \changes{v1.5}{2025/04/02}{recalls and sets the ending label of
+% \changes{v1.5}{2025/04/19}{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
@@ -11239,7 +11253,7 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\ekdEOprint}
-% \changes{v1.5}{2025/04/02}{Sets headers and footers on
+% \changes{v1.5}{2025/04/19}{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
@@ -11279,7 +11293,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}{2025/04/02}{A counter incremented every two pages}
+% \changes{v1.5}{2025/04/19}{A counter incremented every two pages}
 % |pairedpage| is first set as a global counter:---
 %    \begin{macrocode}
 \newcounter{pairedpage}
@@ -11287,19 +11301,19 @@ Sample text with a \textcolor{red}{word} in red.
 %    \end{macrocode}
 % \end{counter}
 % \begin{macro}{\setpairedpagenum}
-%   \changes{v1.5}{2025/04/02}{sets the same page number on paired
+%   \changes{v1.5}{2025/04/19}{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}{2025/04/02}{sets the page number of the first paired
+%   \changes{v1.5}{2025/04/19}{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}{2025/04/02}{resets normal running page numbers}
+%   \changes{v1.5}{2025/04/19}{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
@@ -11808,7 +11822,8 @@ function ekdosis.newwitness(id,
 			    Idno,
 			    MsName,
 			    OrigDate,
-			    Locus)
+			    Locus,
+			    Additional)
    if xmlidfound(id)
    then
       tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
@@ -11837,7 +11852,8 @@ function ekdosis.newwitness(id,
 				repository = Repository,
 				collection = Collection,
 				idno = Idno,
-				msName = MsName}
+				msName = MsName},
+			     additional = Additional
                              })
       local indexwit = getindex(id, listWit)
       if OrigDate ~= "" then
@@ -13388,6 +13404,9 @@ function ekdosis.openteistream()
 	       f:write("</origin>", "\n")
 	       f:write("</history>", "\n")
 	    end
+	    if listWit[i].additional ~= "" then
+	       f:write("<additional>", textotei(listWit[i].additional), "</additional>", "\n")
+	    end
 	    f:write("</msDesc>", "\n")
 	    f:write("</witness>", "\n")
 	 end
-- 
cgit v1.2.3

