From e18561ecc00ac0336507daedd2d7e9e352a04251 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 7 Jul 2020 11:44:16 +0200
Subject: added new commands in the conversion tables. corrected a few typos

---
 ekdosis.dtx | 43 +++++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 20 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 70b30ad..3ea05ca 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -710,7 +710,7 @@ along with this program.  If not, see
 % \fi
 %
 % As can be seen from \vref{lst:pj1}, the edition text is inserted in
-% the \env{ekdosis} environment (l.~1 to 13). Then two
+% the \env{ekdosis} environment (l.~1 to 8). Then two
 % \cs{app}\marg{apparatus entry} commands (ll.~3 and 7) contain the
 % lemma (\cs{lem}\marg{lemma}), namely the reading that is accepted by
 % the editor, and at least one variant reading
@@ -729,7 +729,7 @@ along with this program.  If not, see
 % square bracket is used inside entries to distinguish the lemma from
 % the variant readings.
 %
-% Furthermore, as said above, if a \texttt{TEI xml} output is
+% Furthermore, as said above, if a \texttt{TEI xml} output be
 % required, \pkg{ekdosis} compiles an additional |.xml| file an
 % excerpt of which is provided above.
 %
@@ -774,11 +774,11 @@ along with this program.  If not, see
 % the specific requirements of classical and literary texts, the
 % divisions of which may depend on many different received
 % traditions. \pkg{ekdosis} provides a flexible mechanism in which
-% format and presentation have been carefully separated. It is
-% designed to build un-numbered \texttt{TEI} divisions allowed to nest
-% recursively. However, if |divs| be set to |latex|, \LaTeX{} standard
-% textual divisions can be used and will be translated into
-% \texttt{TEI} numbered |<div>| elements.
+% format and presentation have been carefully separated from
+% content. It is designed to build un-numbered \texttt{TEI} divisions
+% allowed to nest recursively. However, if |divs| be set to |latex|,
+% \LaTeX{} standard textual divisions can be used and will be
+% translated into \texttt{TEI} numbered |<div>| elements.
 %
 % \danger It must be noted that the two styles are mutually exclusive.
 % \vskip\baselineskip
@@ -907,7 +907,7 @@ along with this program.  If not, see
 % |.tex| source file and as an |xml:id| in the \texttt{TEI xml} output
 % if any.
 % \item The unique idendifier of the witness the hand is related
-% to. Of course, this witness must have been previously declared.
+% to. Of course, this witness must have been declared beforehand.
 % \item The rendition to be used in the printed apparatus criticus,
 % which also will be found within the |<handNote>| element of the
 % \texttt{TEI} header where the description of the hand occurs, within
@@ -999,7 +999,7 @@ along with this program.  If not, see
 % As an example, the manuscripts of Caesar's \emph{Gallic War} are
 % divided into two families: α, which includes mss.\ A, M, B, R, S, L
 % and N, and β, which includes mss.\ T, f, U and l. Therefore,
-% provided that all theses witnesses have been already declared, here
+% provided that all these witnesses have been already declared, here
 % is how the two families α  and β could be
 % declared:---\footnote{These witnesses are used in the example
 % provided below in \vref{lst:caesar-bg}.}
@@ -1508,7 +1508,7 @@ yesterday.
 % \item As can be seen from the apparatus entry related to l.~4 above,
 %   a subvariant has been inserted in the lemma part: \enquote{(aut et
 %   \getsiglum{cA1})}. This was done by using |alt| in
-%   \vref{lst:caesar-bg}, l.~9. But as this variant is already
+%   \vref{lst:caesar-bg}, ll.~9--10. But as this variant is already
 %   recorded\---and printed\---in the lemma part, it was necessary to
 %   remove the entire otherwise redundant variant from the apparatus
 %   criticus in print. Hence the use of |nordg| at l.~11.
@@ -3671,6 +3671,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % \iffalse
 %<*lua>
 % \fi
+% \begin{comment}
 % \begin{ekdlua}
 -- `'
 -- This table will hold the functions:
@@ -3919,8 +3920,8 @@ local cmdtotags = {
    {a="textsubscript", b="hi", c=" rend=\"sub\""},
    {a="LRfootnote", b="note", c=" place=\"bottom\""},
    {a="RLfootnote", b="note", c=" place=\"bottom\""},
-   {a="footnote", b="note", c=" place=\"bottom\""},
    {a="enquote *", b="quote", c=""},
+   {a="footnote", b="note", c=" place=\"bottom\""},
    {a="enquote", b="quote", c=""},
    {a="txtrans", b="s", c=" xml:lang=\"ar-Latn\" type=\"transliterated\""},
    {a="textbf", b="hi", c=" rend=\"bold\""},
@@ -3929,21 +3930,28 @@ local cmdtotags = {
    {a="textsf", b="hi", c=" rend=\"sf\""},
    {a="arbup", b="hi", c=" rend=\"sup\""},
    {a="txarb", b="s", c=" xml:lang=\"arb\""},
-   {a="arb", b="s",
+   {a="arb", b="foreign",
     c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""}
 }
 
 local texpatttotags = {
    {a="\\icite%s?%[(.-)%]%[(.-)%]{(.-)}", b="%1 <ref target=\"#%3\">%2</ref>"},
    {a="\\icite%s?%[(.-)%]{(.-)}", b="<ref target=\"#%2\">%1</ref>"},
-   {a="\\icite%s?{(.-)}", b="<ptr target=\"#%1\"/>"}
+   {a="\\icite%s?{(.-)}", b="<ptr target=\"#%1\"/>"},
+   {a="\\linelabel%s?{(.-)}", b="<anchor xml:id=\"%1\"/>"},
+   {a="\\label%s?{(.-)}", b="<anchor xml:id=\"%1\"/>"},
+   {a="\\v?pageref%s?{(.-)}", b="<ptr target=\"#%1\"/>"},
+   {a="\\v?ref%s?{(.-)}", b="<ptr target=\"#%1\"/>"}
 }
 
 local envtotags = {
+   {a="flushright", b="p", c=" rend=\"align(right)\""},
+   {a="flushleft", b="p", c=" rend=\"align(left)\""},
+   {a="quotation", b="quote", c=""},
    {a="ekdverse", b="lg", c=""},
    {a="txarabtr", b="p", c=" xml:lang=\"ar-Latn\" type=\"transliterated\""},
    {a="txarab", b="p", c=" xml:lang=\"arb\""},
-   {a="center", b="p", c=" rend=\"centered\""},
+   {a="center", b="p", c=" rend=\"align(center)\""},
    {a="verse", b="lg", c=""},
    {a="arab", b="p",
     c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""}
@@ -4222,12 +4230,6 @@ local function cmdtotei(str)
       end)
    end
    -- temporarily:
-   str = string.gsub(str, "\\(linelabel)%s?(%b{})",
-		     function(cmd, body)
-			body = string.sub(body, 2, -2)
-			-- body = cmdtotei(body)
-			return string.format("<anchor xml:id=\"%s\"/>", body)
-   end)
    str = string.gsub(str, "\\(getsiglum)%s?(%b{})",
 		     function(cmd, body)
 			body = string.sub(body, 2, -2)
@@ -5343,6 +5345,7 @@ function ekdosis.mdvappend(str, teitype)
 end
 
 % \end{ekdlua}
+% \end{comment}
 % \iffalse
 %</lua>
 % \fi
-- 
cgit v1.2.3

