From 1d9a30fcb6c09e12be510c344d5e3ff545363a7d Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sat, 22 Aug 2020 17:55:07 +0200
Subject: \SetxmlBibResource renamed \AddxmlBibResource. done documenting the
 new features

---
 ekdosis.dtx | 389 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 344 insertions(+), 45 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index b30f7c0..13aa966 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -139,6 +139,15 @@ along with this program.  If not, see
   location =	 {Oxford}
 }
 
+@Book{West1973,
+  author =	 {West, Martin L.},
+  title =	 {Textual Criticism and Editorial Technique},
+  date =	 1973,
+  titleaddon =	 {Applicable to Greek and Latin Texts},
+  publisher =	 {B. G. Teubner},
+  location =	 {Stuttgart}
+}
+
 @Online{DLL-TC,
   author =	 {{Digital Latin Library}},
   title =	 {Textual Criticism},
@@ -279,14 +288,18 @@ along with this program.  If not, see
 % Hippocrates Epidemics, Book 2:
 \DeclareWitness{hV}{V}{\emph{Vaticanus Gr.} 276}
 \DeclareWitness{hI}{I}{\emph{Parisinus Gr.} 2140}
+\DeclareHand{hIac}{hI}{I\textsuperscript{ac}}[Lectio ante correctionem]
+\DeclareHand{hIpc}{hI}{I\textsuperscript{pc}}[Lectio post correctionem]
 \DeclareWitness{hR}{R}{\emph{Vaticanus Gr.} 277}
 \DeclareWitness{hH}{H}{\emph{Parisinus Gr.} 2142}
 \DeclareSource{Lit}{Littré}
 \DeclareSource{Erm}{Ermerins}
 \DeclareSource{Sm}{Smith}
+\DeclareSource{Gal}{Gal.}
 \DeclareScholar{ego}{ego}[
                 forename=Robert,
                 surname=Alessi]
+\DeclareShorthand{egomute}{\unskip}{ego}
 \DeclareShorthand{hcodd}{codd.}{hV,hI,hR,hH}
 \DeclareShorthand{hedd}{edd.}{Lit,Erm,Sm}
 \DeclareShorthand{hegoscr}{\emph{scripsi}}{ego}
@@ -330,7 +343,7 @@ along with this program.  If not, see
 \usepackage{arabluatex}
 \usepackage[parnotes=roman,teiexport=tidy]{ekdosis}
 \input{ekdosis-cfg}
-\SetxmlBibResource{bibdata}
+\AddxmlBibResource{bibdata.xml}
 \usepackage{booktabs}
 \usepackage{xltabular}
 \usepackage[prevent-all]{widows-and-orphans}
@@ -1613,6 +1626,8 @@ yesterday.
 % \iffalse
 %</example> 
 % \fi
+%
+% \needspace{7\baselineskip}
 % \resetlinenumber
 % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
 %   \begin{specimen}
@@ -2119,7 +2134,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % scholars, not from manuscripts, they are naturally associated with
 % |source| or |resp| attributes as described above
 % \vpagerefrange{ref:lem-source}{ref:lem-resp},\footnote{See also
-% \vpagerefrange{ref:declare-scholar}{ref:declare-source}.} and can be
+% \vpagerefrange{ref:declare-source}{ref:declare-scholar}.} and can be
 % distinguished from one another by the |type| attribute, eg.\ either
 % |emendation| or |conjecture|.
 %
@@ -2134,6 +2149,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % Witnesses:
 \DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276}
 \DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140}
+\DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem]
+\DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem]
 \DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277}
 \DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142}
 % Sources (the first arguments below must refer to biblatex labels and
@@ -2154,28 +2171,34 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 %</example>
 % \fi
 %
-% As can be seen from lines~16--18, three useful shorthands have been
+% As can be seen from lines~18--20, three useful shorthands have been
 % defined: |codd| prints \enquote{codd.} for Latin pl.\ \emph{codices}
 % viz.\ \enquote{all manuscripts} and refers to the three \texttt{xml}
-% identifiers |V|, |I|, |R| and |H| declared at ll.~2--5; |edd| prints
-% \enquote{edd.} for Latin pl.\ \emph{editores} viz.\ \enquote{all
-% editors} and refers to the three \texttt{xml} identifiers |Lit|,
-% |Erm| and |Sm| declared at ll.~8--10;\footnote{For detailed
-% information on how to use \cs{DeclareSource} and insert references
-% to cited works, the reader is invited to refer to
-% \vref{sec:references-cited-works}.} finally, |egoscr| (l.~18) is
-% used to print the technical Latin term \enquote{\emph{scripsi}},
-% \enquote{I wrote}, to denote a personal conjecture. Then, the |.tex|
-% source file can be structured as follows:---
+% identifiers |V|, |I|, |R| and |H| declared at ll.~2--3 and 6--7;
+% |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\
+% \enquote{all editors} and refers to the three \texttt{xml}
+% identifiers |Lit|, |Erm| and |Sm| declared at
+% ll.~10--12;\footnote{For detailed information on how to use
+% \cs{DeclareSource} and insert references to cited works, the reader
+% is invited to refer to \vref{sec:references-cited-works}.} finally,
+% |egoscr| (l.~20) is used to print the technical Latin term
+% \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a personal
+% conjecture. Then, the |.tex| source file can be structured as
+% follows:---
 %
 % \iffalse
 %<*example>
 % \fi
-\begin{minted}[linenos=false]{latex}
+\begin{minted}{latex}
 \begin{ekdosis}
+  καὶ ἐγίνετο μᾶλλον \app{
+    \lem[wit={V, Ipc,R,H}]{νότῳ}
+    \rdg[wit=Iac]{νότου}
+    \rdg[source=Erm, type=conjecture]{ἐν νώτῳ}}· [...] % conjecture
+  
   εἰ
   \app{
-    \lem[resp=egoscr, type=emendation]{μὲν}
+    \lem[resp=egoscr, type=emendation]{μὲν} % emendation
     \rdg[wit=codd, source=edd]{μὴ}
   } εἴη διὰ ταῦτα [...]
 \end{ekdosis}
@@ -2183,7 +2206,42 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % \iffalse
 %</example>
 % \fi
-%
+% 
+% \begin{remarks}
+% \item Line~5 introduces a \emph{conjecture} which has been annotated
+%   with |type=conjecture| to facilitate its identification. Other
+%   optional arguments could have been used, such as
+%   |prewit=|\texttt{coni.} or |prewit=|\texttt{falso coni.}, to print
+%   explanatory words in the apparatus criticus before the abridged
+%   name of the scholar.
+% \item Conversely, line~9 introduces an \emph{emendation} for which
+%   the shorthand |egoscr| has been used to print the exact term
+%   \emph{scripsi} in the apparatus criticus while keeping |ego| as an
+%   |xml:id| for the \texttt{TEI xml} ouput file. Other strategies
+%   could have been used. For example, one could have defined a
+%   specific shorthand to print nothing in place of |ego| and leave
+%   the insertion of technical terms to the |post| optional argument
+%   of \cs{lem}, like so:---
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+% Preamble:
+% (\unskip is for removing the space left by the empty 2nd argument
+% below.)
+\DeclareShorthand{egomute}{\unskip}{ego}
+
+% Document:
+  \app{
+    \lem[resp=egomute, post=\emph{scripsi}, type=emendation]{μὲν}
+    \rdg[wit=codd, source=edd]{μὴ}
+  } εἴη διὰ ταῦτα [...]
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+% \end{remarks}
+% 
 % PDF output:---
 % \medskip
 %
@@ -2192,6 +2250,11 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
 %   \begin{specimen}
 %     \begin{ancientgreek}
+%       καὶ ἐγίνετο μᾶλλον \app{
+%       \lem[wit={hV, hIpc,hR,hH}]{νότῳ}
+%       \rdg[wit=hIac]{νότου}
+%       \rdg[source=Erm, type=conjecture]{ἐν νώτῳ}}· [...]
+%
 %       εἰ \app{
 %       \lem[resp=hegoscr, type=emendation]{μὲν}
 %       \rdg[wit=hcodd, source=hedd]{μὴ}
@@ -2206,16 +2269,248 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 %<*example>
 % \fi
 \begin{minted}[linenos=false]{xml}
-<p xml:lang="grc">εἰ 
+<p xml:lang="grc">καὶ ἐγίνετο μᾶλλον 
+<app>
+  <lem wit="#V #Ipc #R #H">νότῳ</lem>
+  <rdg wit="#Iac">νότου</rdg>
+  <rdg source="#Erm" type="conjecture">ἐν νώτῳ</rdg>
+</app>· [...]</p>
+<p>εἰ 
 <app>
   <lem resp="#ego" type="emendation">μὲν</lem>
-  <rdg wit="#V #I #R #H" source="#Lit #Erm #Sm">μὴ</rdg>
+  <rdg wit="#V #I #R #H" source="#Lit #Erm #Sm">
+  μὴ</rdg>
 </app>εἴη διὰ ταῦτα [...]</p>
 \end{minted}
 % \iffalse
 %</example>
 % \fi
 %
+% \subsection{Editorial Addition and Deletion}
+% \label{sec:editorial-add-del}
+% \pkg{ekdosis} provides a set of commands to indicate that text has
+% been supplied or removed by conjecture. As regards critical
+% symbols conventionally used for representing emendations, lacunae,
+% omissions, gaps, editorial deletions or additions and the like,
+% \pkg{ekdosis} follows the standards as described by
+% \textcite[80--82]{West1973}:---
+% \begin{description}[font=\ttfamily]
+% \item[<>] text added by conjecture or from a parallel source.
+% \item[***] lacuna in the whole textual tradition.
+% \item[<***>] conjectured lacuna.
+% \item[\{\}] editorial deletion.
+% \item[\dag\dag] text juged by the editor to be corrupt. Note that if
+% only one word is suspect, only one crux is needed. 
+% \end{description}
+%
+% \DescribeMacro{\SetCritSymbols} \cs{SetCritSymbols}\marg{csv list of
+% options} can be used to change the critical symbols described
+% above. This command accepts the following list of |key-value|
+% optional arguments:---\\
+% \DescribeOption{suppbegin}|suppbegin|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: <}\\
+% The opening symbol used to mark the text that is supplied.\\
+% \DescribeOption{suppend}|suppend|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: >}\\
+% The closing symbol used to mark the text that is supplied.\\
+% \DescribeOption{delbegin}|delbegin|$=$\meta{symbol}
+% \hfill\tcboxverb|Default: {|\\
+% The opening symbol used to mark the text that is deleted.\\
+% \DescribeOption{delend}|delend|$=$\meta{symbol}
+% \hfill\tcboxverb|Default: }|\\
+% The closing symbol used to mark the text that is deleted.\\
+% \DescribeOption{sicbegin}|sicbegin|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: †}\\
+% The opening symbol used to mark the text that is deemed to be
+% suspect.\\
+% \DescribeOption{sicend}|sicend|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: †}\\
+% The closing symbol used to mark the text that is deemed to be
+% suspect.\\
+% \DescribeOption{gapmark}|gapmark|$=$\meta{symbols}
+% \hfill\tcboxverb{Default: ***}\\
+% The symbols used to mark lacunae.\\
+%
+% As an example, what follows sets |[]| for deletions and |...| for
+% lacunae:---
+% 
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+\SetCritSymbols{
+  delbegin = [,
+  delend = ],
+  gapmark = \dots
+}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \danger If modified, brackets can be adapted to languages that are
+% written from right to left. To that effect, \pkg{ekdosis} provides a
+% boolean expression |al@rlmode| which is evaluated as |true| if the
+% writing direction is set from right to left and as |false|
+% otherwise. As the \pkg{etoolbox} package is loaded by \pkg{ekdosis},
+% \cs{ifboolean}|{al@rlmode}|\marg{rtl symbol}\marg{ltr symbol} can be
+% used to perform the test.
+%
+% \paragraph{Editorial Addition}
+% \DescribeMacro{\supplied} \cs{supplied}\marg{text} is used to mark
+% \meta{text} that is by definition missing from the tradition as
+% supplied by the editor or some other scholar. This command is
+% normally expected in \cs{lem}|{}| or \cs{rdg}|{}|.
+%
+% \paragraph{Editorial Deletion}
+% \DescribeMacro{\surplus} \cs{surplus}\marg{text} is used to mark
+% \meta{text} that is deemed to be inauthentic, but nevertheless
+% retained between braces in the edition text as it is transmitted by
+% all witnesses. This command is normally expected in \cs{lem}|{}| or
+% \cs{rdg}|{}|.
+%
+% \paragraph{Crux}
+% \DescribeMacro{\sic} \cs{sic}\marg{text} takes as mandatory argument
+% the text deemed by the editor to be readable but not
+% understandable. \cs{sic} inserts \meta{text} between cruces while
+% \cs{sic*} prints only one crux before \meta{text}.
+%
+% \paragraph{Lacuna}
+% \DescribeMacro{\gap} \cs{gap}\marg{csv list of options} indicates
+% that some amount of text has fallen away from the entire
+% tradition. It takes as mandatory argument a comma-separated list of
+% options that can be used to further specify the reason for omission,
+% the unit of measurement, the quantity or the extent, as follows:---\\
+% \DescribeOption{reason}|reason|$=$\meta{reason}\\
+% |reason| gives the reason for omission.\\
+% \DescribeOption{unit} |unit|$=$\meta{unit}\\
+% |unit| provides some regularized measurement, such as |character|,
+% |word|, |line| and the like.
+% \DescribeOption{quantity} |quantity|$=$\meta{n}\\
+% |quantity| specifies the number of the given unit that comprise the
+% measurement.\\
+% \DescribeOption{extent} |extent|$=$\meta{description}\\
+% |extent| describes the size, including quantity and units in a
+% single string of words.
+%
+% \paragraph{Conjectured Lacuna}
+% Assumably, the conjectured lacuna should be enclosed by
+% \cs{supplied} and as such contained by \cs{lem} with
+% |type=emendation| to indicate that the lacuna has been accepted by
+% the editor.
+%
+% Examples follow:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}{latex}
+% Preamble:
+\DeclareShorthand{egomute}{\unskip}{ego}
+
+% Document:
+\begin{ekdosis}
+  σχεδὸν \app{
+    \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba
+      excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost,
+          unit=word, quantity=4}}}
+  } οὗτοι
+
+  subsidiis magnis \sic*{epicuri} constabilitas
+
+  declinare quis est qui \sic{possit cernere sese}.
+
+  \app{
+    \lem[resp=egomute, type=emendation, nosep, post={ante
+      ὑπογίν.}]{\surplus{καὶ}}
+    \note{deleui e Gal.P}
+  } ὑπογίνονται
+
+  Πάντων δὲ \app{
+    \lem[resp=egomute, type=emendation, post={addidi (\arb{^gamI`a
+        'l-.hummayAti} Gal.)}]{\supplied{τῶν πυρετῶν}}
+    \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}}
+    \rdg[wit=codd, source=edd, alt=om.]{}
+  },
+\end{ekdosis}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% PDF output:---
+% \medskip
+% \needspace{7\baselineskip}
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+%   \begin{specimen}
+%  σχεδὸν \app{
+%    \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba
+%      excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost,
+%          unit=word, quantity=4}}}
+%  } οὗτοι
+%
+%  subsidiis magnis \sic*{epicuri} constabilitas
+%
+%  declinare quis est qui \sic{possit cernere sese}.
+%
+%  \app{
+%    \lem[resp=egomute, type=emendation, nosep, post={ante
+%      ὑπογίν.}]{\surplus{καὶ}}
+%    \note{deleui e Gal.P}
+%  } ὑπογίνονται
+%
+%
+%  Πάντων δὲ \app{
+%    \lem[resp=egomute, type=emendation, post={addidi (\arb{^gamI`a
+%        'l-.hummayAti} Gal.)}]{\supplied{τῶν πυρετῶν}}
+%    \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}}
+%    \rdg[wit=hcodd, source=hedd, alt=om.]{}
+%  },
+%   \end{specimen}
+% \end{alignment}
+%
+% \texttt{TEI xml} ouput:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p>σχεδὸν 
+<app>
+  <lem resp="#ego" type="emendation">
+    <supplied>
+      <gap reason="lost" unit="word" quantity="4" />
+    </supplied>
+  </lem>
+</app>οὗτοι</p>
+<p>subsidiis magnis 
+<sic>epicuri</sic>constabilitas</p>
+<p>declinare quis est qui 
+<sic>possit cernere sese</sic>.</p>
+<p>
+<app>
+  <lem resp="#ego" type="emendation">
+    <surplus>καὶ</surplus>
+  </lem>
+  <note>deleui e Gal.P</note>
+</app>ὑπογίνονται</p>
+<p>Πάντων δὲ 
+<app>
+  <lem resp="#ego" type="emendation">
+    <supplied>τῶν πυρετῶν</supplied>
+  </lem>
+  <rdg source="#Gal">
+    <foreign xml:lang="ar-Latn" type="transliterated"
+    subtype="arabtex">^gamI`a 'l-.hummayAti</foreign>
+  </rdg>
+  <rdg wit="#V #I #R #H" source="#Lit #Erm #Sm" />
+</app>,</p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
 % \section{Laying Out the Apparatus Criticus }
 % \label{sec:apparatus-layout}
 %
@@ -4153,12 +4448,13 @@ Sample text with a \textcolor{red}{word} in red.
 % the |<listWit>| element of the \texttt{TEI} header, whereas the
 % latter is to be found within the |<listBibl>| element.
 %
-% \DescribeMacro{\SetxmlBibResource}
-% \cs{SetxmlBibResource}\marg{basename} is a preamble-only command. If
-% a base name for a \texttt{TEI xml} compliant bibliographical
-% database be provided, \pkg{ekdosis} will use it and insert formatted
-% data in the back matter section of its own \texttt{TEI xml} output
-% file, as |<biblStruct>| elements within a |listBibl| section.
+% \DescribeMacro{\AddxmlBibResource}
+% \cs{AddxmlBibResource}\marg{basename or name.xml} is a preamble-only
+% command. If a base name (either suffixed with |.xml| or not) for a
+% \texttt{TEI xml} compliant bibliographical database be provided,
+% \pkg{ekdosis} will use it and insert formatted data in the back
+% matter section of its own \texttt{TEI xml} output file, as
+% |<biblStruct>| elements within a |listBibl| section.
 %
 % As an example, the following Bib\hologo{(La)TeX} entry and its
 % \texttt{TEI} equivalent are provided:\footnote{\label{fn:zotero}To
@@ -4225,7 +4521,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \fi
 \begin{minted}{latex}
 % Use 'bibl.xml' as a TEI xml bibliographical database:
-\SetxmlBibResource{bibl} % 'bibl' is the basename of 'bibl.xml'
+\AddxmlBibResource{bibdata.xml}
 
 % Declare A. Drakenborch as source:
 \DeclareSource{Drak}{\emph{Drakenborch}}
@@ -4245,12 +4541,12 @@ Sample text with a \textcolor{red}{word} in red.
 \begin{minted}{latex}
 % Preamble:
 \usepackage[style=oxnotes]{biblatex}
-\addbibresource{bibl.bib}
+\addbibresource{bibdata.bib}
 
 \usepackage[teiexport=tidy]{ekdosis}
 
 % basename of the .xml bibliographical database:
-\SetxmlBibResource{bibl} % viz. "load bibl.xml"
+\AddxmlBibResource{bibdata.xml}
 
 % Witnesses:
 \DeclareWitness{L}{L}{Laurentianus, plut, XXXVII, cod. 16}[
@@ -4364,7 +4660,7 @@ Sample text with a \textcolor{red}{word} in red.
 % |<biblStruct>| elements.\footnote{See above n.~\vref{fn:zotero} for
 % information on how to do this.} Finally, this |.xml| bibliographical
 % database must have been connected to the |.tex| source file by means
-% of \cs{SetxmlBibResource} described above in
+% of \cs{AddxmlBibResource} described above in
 % \vref{sec:references-cited-works}.
 %
 % As an example, the following |sample.bib| file is used:---
@@ -4433,8 +4729,7 @@ Sample text with a \textcolor{red}{word} in red.
 \documentclass{article}
 
 \usepackage[teiexport=tidy]{ekdosis}
-\SetxmlBibResource{sample} % base name supplied here, without the
-                           % extension
+\AddxmlBibResource{sample.xml}
 
 \usepackage[style=oxnotes]{biblatex}
 \addbibresource{sample.bib}
@@ -4536,8 +4831,6 @@ Sample text with a \textcolor{red}{word} in red.
 % \begin{enumerate}
 % \item Very short-term (weeks):---
 %   \begin{enumerate}
-%   \item Editorial changes, for inserting corrections and
-%   conjectures.
 %   \item Text structure: milestone elements.
 %   \end{enumerate}
 % \item Short-term (months):---
@@ -5514,18 +5807,18 @@ Sample text with a \textcolor{red}{word} in red.
 \@onlypreamble\SetTEIFileName
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\SetxmlBibResource} This is a preamble-only command.
-%   If a base name for a \texttt{TEI xml} compliant bibliographical
-%   database file is provided with
-%   \cs{SetxmlBibResource}\marg{basename}, \pkg{ekdosis} will use it
-%   and insert formatted data in the back matter section of its own
-%   \texttt{TEI xml} output file, as |<biblStruct>| elements within a
-%   |<listBibl>| section.
+% \begin{macro}{\AddxmlBibResource} This is a preamble-only command.
+%   If a base name (either suffixed with |.xml| or not) for a
+%   \texttt{TEI xml} compliant bibliographical database file be
+%   provided with \cs{AddxmlBibResource}\marg{basename or name.xml},
+%   \pkg{ekdosis} will use it and insert formatted data in the back
+%   matter section of its own \texttt{TEI xml} output file, as
+%   |<biblStruct>| elements within a |<listBibl>| section.
 %    \begin{macrocode}
-\NewDocumentCommand{\SetxmlBibResource}{m}{
-  \luadirect{ekdosis.setxmlbibresource(\luastringN{#1})}
+\NewDocumentCommand{\AddxmlBibResource}{m}{
+  \luadirect{ekdosis.addxmlbibresource(\luastringN{#1})}
 }
-\@onlypreamble\SetxmlBibResource
+\@onlypreamble\AddxmlBibResource
 %    \end{macrocode}
 % \end{macro}
 %
@@ -5955,6 +6248,7 @@ Sample text with a \textcolor{red}{word} in red.
 % \cs{rdg} or \cs{note}\meta{*}:---
 %    \begin{macrocode}
 \NewDocumentCommand{\app}{O{} > { \TrimSpaces } +m}{%
+  \leavevmode
   \begingroup
   \ekvset{appnote}{#1}%
   \ekd@isinapptrue%
@@ -6958,7 +7252,7 @@ local citecmds = lpeg.Cs(lpeg.P("icite")
 local next = next
 
 -- General
-xmlids = {}
+local xmlids = {}
 table.insert(xmlids, {xmlid = "scholars"} )
 
 local function xmlidfound(element)
@@ -7179,8 +7473,13 @@ end
 
 local xmlbibresource = nil
 
-function ekdosis.setxmlbibresource(str)
-   xmlbibresource = str..".xml"
+function ekdosis.addxmlbibresource(str)
+   if string.find(str, "%.xml$")
+   then
+      xmlbibresource = str
+   else
+      xmlbibresource = str..".xml"
+   end
    return true
 end
 
-- 
cgit v1.2.3

