aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx690
-rw-r--r--ekdosis.el12
2 files changed, 564 insertions, 138 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 5f7b313..c8f3850 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -61,7 +61,7 @@ along with this program. If not, see
61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
62%<package>\ProvidesPackage{ekdosis} 62%<package>\ProvidesPackage{ekdosis}
63%<*package> 63%<*package>
64 [2022/01/05 v1.5-dev Typesetting TEI xml-compliant critical editions] 64 [2022/01/15 v1.5-dev Typesetting TEI xml-compliant critical editions]
65%</package> 65%</package>
66%<*driver> 66%<*driver>
67\begin{filecontents}[noheader,overwrite]{bibdata.xml} 67\begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -227,6 +227,7 @@ along with this program. If not, see
227 editor = {Constans, L.-A.}, 227 editor = {Constans, L.-A.},
228 volume = 2, 228 volume = 2,
229 pagination = {none}, 229 pagination = {none},
230 entrysubtype = {primary},
230 series = {Collection des Universités de France}, 231 series = {Collection des Universités de France},
231 publisher = {Les Belles Lettres}, 232 publisher = {Les Belles Lettres},
232 location = {Paris} 233 location = {Paris}
@@ -238,14 +239,39 @@ along with this program. If not, see
238 date = 1869, 239 date = 1869,
239 editor = {McDevitte, W. A., and Bohn, W. S.}, 240 editor = {McDevitte, W. A., and Bohn, W. S.},
240 edition = 1, 241 edition = 1,
242 entrysubtype = {primary},
241 series = {Harper's New Classical Library}, 243 series = {Harper's New Classical Library},
242 publisher = {Harper \& Brothers}, 244 publisher = {Harper \& Brothers},
243 location = {New York}} 245 location = {New York}}
244 246
247@Book{CiceroAtt,
248 author = {Cicero},
249 title = {Ad Atticum epistularum libri sedecim},
250 date = 1916,
251 entrysubtype = {primary},
252 editor = {Sjögren, H.},
253 editortype = {recensuit},
254 series = {Collectio scriptorum ueterum Vpsaliensis},
255 publisher = {Eranos' Förlag}
256}
257
258@Book{CiceroAttTr,
259 author = {Cicero},
260 title = {Letters to Atticus},
261 date = 1919,
262 entrysubtype = {primary},
263 editor = {Winstedt, E.O.},
264 series = {The Loeb Classical Library},
265 number = 2,
266 publisher = {William Heinemann \& The MacMillan Co.},
267 location = {London -- New York}
268}
269
245@MVBook{HomerMurray, 270@MVBook{HomerMurray,
246 author = {{Homer}}, 271 author = {{Homer}},
247 title = {The Odyssey}, 272 title = {The Odyssey},
248 date = 1919, 273 date = 1919,
274 entrysubtype = {primary},
249 editor = {Murray, A. T.}, 275 editor = {Murray, A. T.},
250 volumes = 2, 276 volumes = 2,
251 publisher = {Harvard University Press -- William Heinemann}, 277 publisher = {Harvard University Press -- William Heinemann},
@@ -253,15 +279,16 @@ along with this program. If not, see
253} 279}
254 280
255@Book{McDonald1916, 281@Book{McDonald1916,
282 author = {Shakespeare},
256 editor = {MacDonald Alden, Raymond}, 283 editor = {MacDonald Alden, Raymond},
257 shorteditor = {MacDonald}, 284 shorteditor = {MacDonald},
258 title = {The Sonnets of Shakespeare}, 285 title = {The Sonnets},
259 date = 1916, 286 date = 1916,
287 entrysubtype = {primary},
260 titleaddon = {From the Quarto of 1609 with Variorum Readings and 288 titleaddon = {From the Quarto of 1609 with Variorum Readings and
261 Commentary}, 289 Commentary},
262 organization = {Houghton Mifflin Co.}, 290 organization = {Houghton Mifflin Co.},
263 publisher = {The Riverside Press Cambridge}, 291 publisher = {The Riverside Press Cambridge},
264 options = {useauthor=false, useeditor=true},
265 location = {Boston \& New York} 292 location = {Boston \& New York}
266} 293}
267 294
@@ -412,6 +439,14 @@ along with this program. If not, see
412 version = {2.4b} 439 version = {2.4b}
413} 440}
414 441
442@Software{xparse,
443 title = {The Xparse package},
444 titleaddon = {A generic document command parser},
445 author = {{The LaTeX Team}},
446 url = {https://ctan.org/pkg/xparse},
447 date = {2022-01-12},
448}
449
415@Software{arabluatex, 450@Software{arabluatex,
416 title = {The Arabluatex package}, 451 title = {The Arabluatex package},
417 titleaddon = {ArabTeX for LuaLaTeX}, 452 titleaddon = {ArabTeX for LuaLaTeX},
@@ -451,10 +486,6 @@ along with this program. If not, see
451} 486}
452\end{filecontents} 487\end{filecontents}
453\begin{filecontents}[overwrite]{\jobname-ekd.cfg} 488\begin{filecontents}[overwrite]{\jobname-ekd.cfg}
454%% fixfoot:---
455\DeclareFixedFootnote{\seeekdsep}{See below
456 \vpageref{ref:ekdsep-subsep} for more information and
457 \vref{lst:emend-coni-corr}, ll.~23--5 for an illustrative example.}
458%% ekdosis:--- 489%% ekdosis:---
459\footnotelayout{m} 490\footnotelayout{m}
460\SetCritSymbols{suppbegin = ⟨,suppend = ⟩} 491\SetCritSymbols{suppbegin = ⟨,suppend = ⟩}
@@ -562,12 +593,22 @@ along with this program. If not, see
562\DeclareSource{shWalsh1908}{Wa} 593\DeclareSource{shWalsh1908}{Wa}
563\DeclareScholar{shGod}{Godwin}[rawname=Godwin] 594\DeclareScholar{shGod}{Godwin}[rawname=Godwin]
564\DeclareScholar{shStee}{Stee}[rawname=Steevens, note=Notes in Malone] 595\DeclareScholar{shStee}{Stee}[rawname=Steevens, note=Notes in Malone]
596% Cicero, ad Atticum, VII.9.4
597\DeclareWitness{cicC}{C}{Lectiones quas Cratander in margine editionis,
598 quae a. 1528 Basileae prodiit, adscripsit}
599\DeclareWitness{cicΩ}{Ω}{Consensus codicum Σ et Δ uel archetypum
600 codicum Italicorum}
565\end{filecontents} 601\end{filecontents}
566\documentclass{ltxdoc} 602\documentclass{ltxdoc}
567 %\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} 603 %\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry}
568\usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry} 604\usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry}
569\usepackage{dox} 605%^^A dox does not work with the latest latex-dev:
570\doxitem{Option}{option}{options} 606\ifdefined\SpecialMacroIndex
607 \NewDocElement{Option}{option}
608\else
609 \usepackage{dox}
610 \doxitem{Option}{option}{options}
611\fi
571\usepackage{fontspec} 612\usepackage{fontspec}
572\defaultfontfeatures{Renderer=Harfbuzz} 613\defaultfontfeatures{Renderer=Harfbuzz}
573\usepackage{microtype} 614\usepackage{microtype}
@@ -585,14 +626,23 @@ along with this program. If not, see
585\babeltags{ancientgreek = greek} 626\babeltags{ancientgreek = greek}
586\def\sg#1{\textancientgreek{#1}} 627\def\sg#1{\textancientgreek{#1}}
587\usepackage[biblatex=true]{embrac} 628\usepackage[biblatex=true]{embrac}
588\usepackage{chifoot}
589\usepackage{fixfoot}
590\usepackage[nospace,american]{varioref} 629\usepackage[nospace,american]{varioref}
591\usepackage{addlines} 630\usepackage{addlines}
592\newcommand\phts{\phantomsection} 631\newcommand\phts{\phantomsection}
632\usepackage{chifoot}
633\usepackage{savefnmark}
593\usepackage{nameref} 634\usepackage{nameref}
594\usepackage{arabluatex} 635\usepackage{arabluatex}
595\usepackage[parnotes=roman, teiexport=tidy, poetry=verse]{ekdosis} 636\usepackage[parnotes=roman, teiexport=tidy, poetry=verse]{ekdosis}
637\makeatletter
638\NewDocumentCommand{\ekdelide}{m}{%
639 \IfSubStr{#1}{--}{%
640 \StrBefore{#1}{--}[\@before]%
641 \StrBehind{#1}{--}[\@behind]%
642 \luadirect{tex.sprint(ekdosis.numrange(
643 \luastring{\@before},
644 \luastring{\@behind}))}}{#1}}
645\makeatother
596\AddxmlBibResource{bibdata.xml} 646\AddxmlBibResource{bibdata.xml}
597\usepackage{booktabs} 647\usepackage{booktabs}
598\usepackage{xltabular} 648\usepackage{xltabular}
@@ -628,7 +678,6 @@ along with this program. If not, see
628 \colorlet{cinnamon}{black}}{} 678 \colorlet{cinnamon}{black}}{}
629\definecolor{gainsboro}{RGB}{222,222,222} 679\definecolor{gainsboro}{RGB}{222,222,222}
630\PassOptionsToPackage{bookmarks=true}{hyperref} 680\PassOptionsToPackage{bookmarks=true}{hyperref}
631\usepackage[obeyspaces]{url}
632\usepackage[numbered]{hypdoc} 681\usepackage[numbered]{hypdoc}
633\usepackage[titlematter,loadlang=en|de|fr|es]{metastr} 682\usepackage[titlematter,loadlang=en|de|fr|es]{metastr}
634\hypersetup{ 683\hypersetup{
@@ -637,7 +686,6 @@ along with this program. If not, see
637 linktocpage=true, 686 linktocpage=true,
638 pdftype={Text} 687 pdftype={Text}
639} 688}
640\usepackage{uri}
641\labelformat{section}{sect.~#1} 689\labelformat{section}{sect.~#1}
642\labelformat{subsection}{sect.~#1} 690\labelformat{subsection}{sect.~#1}
643\labelformat{subsubsection}{sect.~#1} 691\labelformat{subsubsection}{sect.~#1}
@@ -645,10 +693,10 @@ along with this program. If not, see
645\usepackage[defaultindex=none,citecmd=autocite]{icite} 693\usepackage[defaultindex=none,citecmd=autocite]{icite}
646\bibinput{ekdosis} 694\bibinput{ekdosis}
647\newcommand\vnref[1]{\vref{#1}, \enquote{\nameref{#1}}} 695\newcommand\vnref[1]{\vref{#1}, \enquote{\nameref{#1}}}
696\newcommand\lnref[1]{\getrefnumber{#1}}
648\usepackage[style=oxnotes-inote,dashed]{biblatex} 697\usepackage[style=oxnotes-inote,dashed]{biblatex}
649\setcounter{biburllcpenalty}{100} 698\usepackage{uri}
650\setcounter{biburlucpenalty}{200} 699\usepackage[obeyspaces]{xurl}
651\setcounter{biburlnumpenalty}{100}
652\DefineBibliographyStrings{english}{ 700\DefineBibliographyStrings{english}{
653 seenote={cf\adddotspace n\adddotspace}} 701 seenote={cf\adddotspace n\adddotspace}}
654\DeclareSourcemap{ 702\DeclareSourcemap{
@@ -1119,15 +1167,15 @@ along with this program. If not, see
1119% \iffalse 1167% \iffalse
1120%<*example> 1168%<*example>
1121% \fi 1169% \fi
1122\begin{minted}{latex} 1170\begin{minted}[escapeinside=++]{latex}
1123\begin{ekdosis} 1171\begin{ekdosis} +\label{ln:pj1:1}+
1124 I 1172 I
1125 \app{ 1173 \app{ +\label{ln:pj1:3}+
1126 \lem{saw} 1174 \lem{saw}
1127 \rdg{met} 1175 \rdg{met} +\label{ln:pj1:5}+
1128 } 1176 }
1129 my friend \app{\lem{Peter}\rdg{John}} at the station yesterday. 1177 my friend \app{\lem{Peter}\rdg{John}} at the station yesterday. +\label{ln:pj1:7}+
1130\end{ekdosis} 1178\end{ekdosis} +\label{ln:pj1:8}+
1131\end{minted} 1179\end{minted}
1132% \iffalse 1180% \iffalse
1133%</example> 1181%</example>
@@ -1173,14 +1221,16 @@ along with this program. If not, see
1173% \fi 1221% \fi
1174% 1222%
1175% As can be seen from \vref{lst:pj1}, the edition text is inserted in 1223% As can be seen from \vref{lst:pj1}, the edition text is inserted in
1176% the \env{ekdosis} environment (l.~1 to 8). Then two 1224% the \env{ekdosis} environment (ll.~\lnref{ln:pj1:1} to
1177% \cs{app}\marg{apparatus entry} commands (ll.~3 and 7) contain the 1225% \lnref{ln:pj1:8}). Then two \cs{app}\marg{apparatus entry}
1178% lemma (\cs{lem}\marg{lemma}), namely the reading that is accepted by 1226% commands (ll.~\lnref{ln:pj1:3} and \lnref{ln:pj1:7})
1179% the editor, and at least one variant reading 1227% contain the lemma (\cs{lem}\marg{lemma}), namely the reading that is
1180% (\cs{rdg}\marg{reading}, ll.~5 and 7). As the listing shows, the 1228% accepted by the editor, and at least one variant reading
1181% editor is free to lay out the code in a legible manner to the eye: 1229% (\cs{rdg}\marg{reading}, ll.~\lnref{ln:pj1:5} and
1182% the first lemma above spans several lines whereas the second one is 1230% \lnref{ln:pj1:7}). As the listing shows, the editor is free
1183% written in sequence without spaces. 1231% to lay out the code in a legible manner to the eye: the first lemma
1232% above spans several lines whereas the second one is written in
1233% sequence without spaces.
1184% 1234%
1185% In the PDF output, the edition text is printed in the upper part of 1235% In the PDF output, the edition text is printed in the upper part of
1186% the page, above the line, and naturally shows the accepted 1236% the page, above the line, and naturally shows the accepted
@@ -1712,22 +1762,23 @@ along with this program. If not, see
1712% \iffalse 1762% \iffalse
1713%<*example> 1763%<*example>
1714% \fi 1764% \fi
1715\begin{minted}{latex} 1765\begin{minted}[escapeinside=++]{latex}
1716\DeclareScholar{ego}{ego}[ 1766\DeclareScholar{ego}{ego}[
1717 forename=John, 1767 forename=John,
1718 surname=Smith, 1768 surname=Smith,
1719 note=Main editor of the text] 1769 note=Main editor of the text]
1720\DeclareShorthand{egoscr}{\emph{scripsi}}{ego} 1770\DeclareShorthand{egoscr}{\emph{scripsi}}{ego}+\label{ln:egoscr}+
1721\end{minted} 1771\end{minted}
1722% \iffalse 1772% \iffalse
1723%</example> 1773%</example>
1724% \fi 1774% \fi
1725% 1775%
1726% Then, the shorthand |egoscr| (l.~5) can be used to print in the 1776% Then, the shorthand |egoscr| (l.~\lnref{ln:egoscr}) can be
1727% apparatus criticus the technical term \emph{scripsi} and use at the 1777% used to print in the apparatus criticus the technical term
1728% same time the pointer |#ego| that is expected in the \texttt{TEI 1778% \emph{scripsi} and use at the same time the pointer |#ego| that is
1729% xml} output file. Detailed examples of this technique will be 1779% expected in the \texttt{TEI xml} output file. Detailed examples of
1730% provided below in \vref{sec:emendations-conjectures}. 1780% this technique will be provided below in
1781% \vref{sec:emendations-conjectures}.
1731% 1782%
1732% \subsubsection{Printing Formatted Witnesses 1783% \subsubsection{Printing Formatted Witnesses
1733% --- Conspectus Siglorum} 1784% --- Conspectus Siglorum}
@@ -1922,10 +1973,19 @@ yesterday.
1922% the related entry of the apparatus criticus. This mechanism is 1973% the related entry of the apparatus criticus. This mechanism is
1923% useful in more than one respect. For instance, it can be used to 1974% useful in more than one respect. For instance, it can be used to
1924% insert abbreviated lemmata in the apparatus criticus, or to 1975% insert abbreviated lemmata in the apparatus criticus, or to
1925% \addlines[-1]
1926% introduce an alternate way of writing entries with Latin technical 1976% introduce an alternate way of writing entries with Latin technical
1927% terms in the apparatus criticus as will be demonstrated below in the 1977% terms in the apparatus criticus as will be demonstrated below in the
1928% example provided by \vref{lst:pj2}.\\ 1978% example provided by \vref{lst:pj2}.\\
1979% \DescribeOption{ilabel}\phts\label{ref:ilabel-opt}
1980% |ilabel|$=$\meta{indexed label}\\
1981% \newfeature[v1.5] If used, |ilabel| instructs \pkg{ekdosis} not to
1982% set a label at the place where \meta{lemma text} ends. Instead, the
1983% label is indexed as \meta{indexed label} and only used to compute
1984% the ending line number at the place where the index is recalled by
1985% \cs{ilabel}\meta{indexed label}.\footnote{See below
1986% \vpageref{ref:ilabel-opt}.} This allows for abbreviated lemmas
1987% corresponding to spans of texts that cross verse, paragraph or
1988% section boundaries as described below in \vnref{sec:lacunae}.\\
1929% \DescribeOption{nodelim} |nodelim|$=$\verb+true|false+\\ 1989% \DescribeOption{nodelim} |nodelim|$=$\verb+true|false+\\
1930% \newfeature[v1.5] This named argument does not need a value as it 1990% \newfeature[v1.5] This named argument does not need a value as it
1931% defaults to |true| if used. |nodelim| removes the delimiter that is 1991% defaults to |true| if used. |nodelim| removes the delimiter that is
@@ -1943,16 +2003,23 @@ yesterday.
1943% if used. |nosep| removes the separator mentioned above. Obviously, 2003% if used. |nosep| removes the separator mentioned above. Obviously,
1944% |nosep| must be used when for some reason no \cs{rdg} command 2004% |nosep| must be used when for some reason no \cs{rdg} command
1945% follows a \cs{lem} command that has just been used, as shown below 2005% follows a \cs{lem} command that has just been used, as shown below
1946% in \vref{lst:emend-coni-corr}, l.~7. \danger If |nosep| be used so 2006% in \vref{lst:emend-coni-corr},
1947% as to insert an explanatory note after the lemma text with the 2007% l.~\lnref{ln:emend:nosep}. \danger If |nosep| be used so as
2008% to insert an explanatory note after the lemma text with the
1948% \cs{note} command described below \vpageref{ref:editorial-notes}, 2009% \cs{note} command described below \vpageref{ref:editorial-notes},
1949% then the |sep| optional argument of \cs{note} can be used to put 2010% then the |sep| optional argument of \cs{note} can be used to put
1950% back in the separator. This technique is demonstrated below in 2011% back in the separator. This technique is demonstrated below in
1951% \vref{lst:emend-coni-corr}, ll.~23--5.\\ 2012% \vref{lst:emend-coni-corr},
2013% ll.~\ekdelide{\lnref{ln:emend:sep:b}%^^A
2014% --\lnref{ln:emend:sep:e}}.\\
1952% \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\ 2015% \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\
1953% This named argument does not need a value as it defaults to |true| 2016% This named argument does not need a value as it defaults to |true|
1954% if used. |nolem| completely removes the lemma text from the related 2017% if used. |nolem| completely removes the lemma text from the related
1955% entry in the apparatus criticus.\\ 2018% entry in the apparatus criticus.\\
2019% \DescribeOption{Nolem} (no-value argument)\\
2020% \newfeature[v1.5] |Nolem| takes no value and is equivalent to
2021% |nodelim,| |nolem,| |nonum|. For an example of its usage, see
2022% \vnref{sec:lacunae} and \vref{lst:cic-att}.\\
1956% \DescribeOption{type} |type|$=$\meta{value}\\ 2023% \DescribeOption{type} |type|$=$\meta{value}\\
1957% This named argument has no effect on the apparatus criticus of the 2024% This named argument has no effect on the apparatus criticus of the
1958% edition in print, but it is used in the \texttt{TEI xml} output to 2025% edition in print, but it is used in the \texttt{TEI xml} output to
@@ -2057,9 +2124,13 @@ yesterday.
2057% \DescribeOption{post} |post|$=$\meta{words}\\ 2124% \DescribeOption{post} |post|$=$\meta{words}\\
2058% |post| inserts \meta{words} immediately after the note.\\ 2125% |post| inserts \meta{words} immediately after the note.\\
2059% \DescribeOption{sep} This argument-less option is equivalent to 2126% \DescribeOption{sep} This argument-less option is equivalent to
2060% |post=\ekdsep|.\seeekdsep\\ 2127% |post=\ekdsep|.\footnote{See below
2128% \vpageref{ref:ekdsep-subsep} for more information and
2129% \vref{lst:emend-coni-corr}, ll.~%^^A
2130% \ekdelide{\lnref{ln:emend:sep:b}--\lnref{ln:emend:sep:e}}
2131% for an illustrative example.}\saveFN\fnEmend\\
2061% \DescribeOption{subsep} This argument-less option is equivalent to 2132% \DescribeOption{subsep} This argument-less option is equivalent to
2062% |pre=\ekdsubsep|.\seeekdsep\\ 2133% |pre=\ekdsubsep|.\useFN\fnEmend\\
2063% 2134%
2064% \danger Under no circumstances is it permitted to insert this 2135% \danger Under no circumstances is it permitted to insert this
2065% command \cs{note} or \cs{note*} inside the argument of \cs{lem} or 2136% command \cs{note} or \cs{note*} inside the argument of \cs{lem} or
@@ -2079,7 +2150,7 @@ yesterday.
2079% \iffalse 2150% \iffalse
2080%<*example> 2151%<*example>
2081% \fi 2152% \fi
2082\begin{minted}{latex} 2153\begin{minted}[escapeinside=++]{latex}
2083\begin{ekdosis} 2154\begin{ekdosis}
2084 I 2155 I
2085 \app{ 2156 \app{
@@ -2096,16 +2167,16 @@ yesterday.
2096 \rdg[wit=B]{good}} 2167 \rdg[wit=B]{good}}
2097 mood. 2168 mood.
2098 \app{ 2169 \app{
2099 \lem[wit=A, alt={How nice... said}]{\enquote{How nice to find 2170 \lem[wit=A, alt={How nice... said}]{\enquote{How nice to find+\label{ln:pj2:alt:b}+
2100 you here!} he said.} 2171 you here!} he said.}+\label{ln:pj2:alt:e}+
2101 \note*{There are no quotation marks in the mss.} 2172 \note*{There are no quotation marks in the mss.}+\label{ln:pj2:note1}+
2102 \rdg[wit=B, alt=\emph{om.}]{}} 2173 \rdg[wit=B, alt=\emph{om.}]{}}
2103 I chuckled to myself, recalling the last time we 2174 I chuckled to myself, recalling the last time we
2104 \app{ 2175 \app{
2105 \lem[wit=A,nolem]{met} 2176 \lem[wit=A,nolem]{met}+\label{ln:pj2:nolem}+
2106 \rdg[wit=B, alt={\emph{post} met \emph{add.} there}]{met 2177 \rdg[wit=B, alt={\emph{post} met \emph{add.} there}]{met+\label{ln:pj2:alt2}+
2107 there} 2178 there}
2108 \note*{Ms. \getsiglum{B} provides other additions of this kind.}}. 2179 \note*{Ms. \getsiglum{B} provides other additions of this kind.}}.+\label{ln:pj2:note2}+
2109\end{ekdosis} 2180\end{ekdosis}
2110\end{minted} 2181\end{minted}
2111% \iffalse 2182% \iffalse
@@ -2141,18 +2212,22 @@ yesterday.
2141% \end{alignment} 2212% \end{alignment}
2142% 2213%
2143% \begin{remarks} 2214% \begin{remarks}
2144% \item Close examination of lines~17--8 from \vref{lst:pj2} shows how 2215% \item Close examination of lines~\ekdelide{%^^A
2145% |alt| has been used to insert an abridged lemma text in the 2216% \lnref{ln:pj2:alt:b}--\lnref{ln:pj2:alt:e}} from
2146% apparatus criticus in print while keeping safe what is to be found 2217% \vref{lst:pj2} shows how |alt| has been used to insert an abridged
2147% in the \texttt{TEI xml} output. 2218% lemma text in the apparatus criticus in print while keeping safe
2148% \item The same technique has been used at line~24 to insert 2219% what is to be found in the \texttt{TEI xml} output.
2149% alternate words, including Latin technical terms, in place of the 2220% \item The same technique has been used at
2150% variant reading. Hence the use of |nolem| at line~23 to remove the 2221% line~\lnref{ln:pj2:alt2} to insert alternate words,
2151% lemma text from the apparatus criticus in print. 2222% including Latin technical terms, in place of the variant
2223% reading. Hence the use of |nolem| at
2224% line~\lnref{ln:pj2:nolem} to remove the lemma text from the
2225% apparatus criticus in print.
2152% \item \cs{note*} has been used to insert short annotations in two 2226% \item \cs{note*} has been used to insert short annotations in two
2153% places (ll.~19 and 26). 2227% places (ll.~\lnref{ln:pj2:note1} and
2228% \lnref{ln:pj2:note2}).
2154% \item For an example of the use of |nordg|, see below 2229% \item For an example of the use of |nordg|, see below
2155% \vref{lst:caesar-bg}, l.~11. 2230% \vref{lst:caesar-bg}, l.~\lnref{ln:caes:nordg}.
2156% \end{remarks} 2231% \end{remarks}
2157% 2232%
2158% The corresponding \texttt{TEI xml} output produced by \pkg{ekdosis} 2233% The corresponding \texttt{TEI xml} output produced by \pkg{ekdosis}
@@ -2404,46 +2479,53 @@ friend
2404% \iffalse 2479% \iffalse
2405%<*example> 2480%<*example>
2406% \fi 2481% \fi
2407\begin{minted}{latex} 2482\begin{minted}[escapeinside=++]{latex}
2408% Witnesses: 2483% Witnesses:
2409\DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276} 2484\DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276}+\label{ln:wsc:wit1}+
2410\DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140} 2485\DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140}+\label{ln:wsc:wit2}+
2411\DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem] 2486\DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem]
2412\DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem] 2487\DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem]
2413\DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277} 2488\DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277}+\label{ln:wsc:wit3}+
2414\DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142} 2489\DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142}+\label{ln:wsc:wit4}+
2415% Sources (the first arguments below must refer to biblatex labels and 2490% Sources (the first arguments below must refer to biblatex labels and
2416% an xml bibliographical database must be supplied): 2491% an xml bibliographical database must be supplied):
2417\DeclareSource{Lit}{Littré} 2492\DeclareSource{Lit}{Littré}+\label{ln:wsc:src1}+
2418\DeclareSource{Erm}{Ermerins} 2493\DeclareSource{Erm}{Ermerins}
2419\DeclareSource{Sm}{Smith} 2494\DeclareSource{Sm}{Smith}+\label{ln:wsc:src2}+
2420% Persons: 2495% Persons:
2421\DeclareScholar{ego}{ego}[ 2496\DeclareScholar{ego}{ego}[
2422 forename=Robert, 2497 forename=Robert,
2423 surname=Alessi] 2498 surname=Alessi]
2424% Useful shorthands: 2499% Useful shorthands:
2425\DeclareShorthand{codd}{codd.}{V,I,R,H} 2500\DeclareShorthand{codd}{codd.}{V,I,R,H}+\label{ln:wsc:short1}+
2426\DeclareShorthand{edd}{edd.}{Lit,Erm,Sm} 2501\DeclareShorthand{edd}{edd.}{Lit,Erm,Sm}
2427\DeclareShorthand{egoscr}{\emph{scripsi}}{ego} 2502\DeclareShorthand{egoscr}{\emph{scripsi}}{ego}+\label{ln:wsc:short2}+
2428\end{minted} 2503\end{minted}
2429% \iffalse 2504% \iffalse
2430%</example> 2505%</example>
2431% \fi 2506% \fi
2432% 2507%
2433% As can be seen from lines~18--20, three useful shorthands have been 2508% As can be seen from lines~\ekdelide{%^^A
2434% defined: |codd| prints \enquote{codd.} for Latin pl.\ \emph{codices} 2509% \lnref{ln:wsc:short1}--\lnref{ln:wsc:short2}},
2435% viz.\ \enquote{all manuscripts} and refers to the three \texttt{xml} 2510% three useful shorthands have been defined: |codd| prints
2436% identifiers |V|, |I|, |R| and |H| declared at ll.~2--3 and 6--7; 2511% \enquote{codd.} for Latin pl.\ \emph{codices} viz.\ \enquote{all
2512% manuscripts} and refers to the three \texttt{xml} identifiers |V|,
2513% |I|, |R| and |H| declared at
2514% ll.~\ekdelide{%^^A
2515% \lnref{ln:wsc:wit1}--\lnref{ln:wsc:wit2}} and
2516% \ekdelide{\lnref{ln:wsc:wit3}--\lnref{ln:wsc:wit4}};
2437% |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\ 2517% |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\
2438% \enquote{all editors} and refers to the three \texttt{xml} 2518% \enquote{all editors} and refers to the three \texttt{xml}
2439% identifiers |Lit|, |Erm| and |Sm| declared at 2519% identifiers |Lit|, |Erm| and |Sm| declared at
2440% ll.~10--12;\footnote{For detailed information on how to use 2520% ll.~\ekdelide{%^^A
2441% \cs{DeclareSource} and insert references to cited works, the reader 2521% \lnref{ln:wsc:src1}--\lnref{ln:wsc:src2}};%^^A
2442% is invited to refer to \vref{sec:references-cited-works}.} finally, 2522% \footnote{For detailed information on how to use \cs{DeclareSource}
2443% |egoscr| (l.~20) is used to print the technical Latin term 2523% and insert references to cited works, the reader is invited to refer
2444% \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a personal 2524% to \vref{sec:references-cited-works}.} finally, |egoscr|
2445% conjecture. Then, the |.tex| source file can be structured as 2525% (l.~\lnref{ln:wsc:short2}) is used to print the technical
2446% follows:--- 2526% Latin term \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a
2527% personal conjecture. Then, the |.tex| source file can be structured
2528% as follows:---
2447% 2529%
2448% \iffalse 2530% \iffalse
2449%<*example> 2531%<*example>
@@ -2670,22 +2752,22 @@ friend
2670% |type=emendation| to indicate that the lacuna has been accepted by 2752% |type=emendation| to indicate that the lacuna has been accepted by
2671% the editor. 2753% the editor.
2672% 2754%
2673% Examples follow:\footnote{On the use of \texttt{egomute} (l.~2), see 2755% Examples follow:\footnote{On the use of \texttt{egomute}
2674% above \vref{it:egomute}.}--- 2756% (l.~\lnref{ln:emend:egomute}), see above \vref{it:egomute}.}---
2675% 2757%
2676% \captof{Emendations, conjectures and 2758% \captof{Emendations, conjectures and
2677% corrections}[\label{lst:emend-coni-corr}] 2759% corrections}[\label{lst:emend-coni-corr}]
2678% \iffalse 2760% \iffalse
2679%<*example> 2761%<*example>
2680% \fi 2762% \fi
2681\begin{minted}{latex} 2763\begin{minted}[escapeinside=++]{latex}
2682% Preamble: 2764% Preamble:
2683\DeclareShorthand{egomute}{\unskip}{ego} 2765\DeclareShorthand{egomute}{\unskip}{ego}+\label{ln:emend:egomute}+
2684 2766
2685% Document: 2767% Document:
2686\begin{ekdosis} 2768\begin{ekdosis}
2687 σχεδὸν \app{ 2769 σχεδὸν \app{
2688 \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba 2770 \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba+\label{ln:emend:nosep}+
2689 excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost, 2771 excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost,
2690 unit=word, quantity=4}}} 2772 unit=word, quantity=4}}}
2691 } οὗτοι 2773 } οὗτοι
@@ -2701,9 +2783,9 @@ friend
2701 } ὑπογίνονται 2783 } ὑπογίνονται
2702 2784
2703 Πάντων δὲ \app{ 2785 Πάντων δὲ \app{
2704 \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}} 2786 \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}}+\label{ln:emend:sep:b}+
2705 \note[sep]{addidi (\arb{^gamI`a 'l-.hummayAti} 2787 \note[sep]{addidi (\arb{^gamI`a 'l-.hummayAti}
2706 \getsiglum{Gal})} 2788 \getsiglum{Gal})}+\label{ln:emend:sep:e}+
2707 \rdg[nordg, source=Gal]{\arb{al-.hummayAti}} 2789 \rdg[nordg, source=Gal]{\arb{al-.hummayAti}}
2708 \rdg[wit=codd, source=edd, alt=om.]{} 2790 \rdg[wit=codd, source=edd, alt=om.]{}
2709 }, 2791 },
@@ -2792,6 +2874,145 @@ friend
2792%</example> 2874%</example>
2793% \fi 2875% \fi
2794% 2876%
2877% \section[Lacunae]{\newfeature[v1.5]Lacunae}
2878% \label{sec:lacunae}
2879% The term \enquote{lacuna} is used here to indicate a series of words
2880% or phrases that are missing from one or more witnesses in the
2881% manuscript tradition. When the lacuna is limited to just a few
2882% words, it may fill an entire entry of the apparatus criticus,
2883% especially when the other witnesses do not provide variants on this
2884% span of text.
2885%
2886% On the other hand, when the lacuna is longer, or includes variants,
2887% or crosses a verse, paragraph or section boundary, it is usually not
2888% desirable to break it into pieces. The recommended method of
2889% encoding is therefore to record explicitly where the lacuna begins
2890% and where it ends. However, in well-written apparatus criticus,
2891% these two items of information must be provided only in the first
2892% entry. Moreover, the line numbering of this entry and the
2893% abbreviated lemma must make clear where the lacuna ends. As a
2894% consequence, the apparatus in print is silent at the place where the
2895% lacuna ends, unlike the \texttt{TEI xml} code which must be explicit
2896% at both places.
2897%
2898% \DescribeMacro{\lacunaStart}\DescribeMacro{\lacunaEnd}
2899% \cs{lacunaStart}\oarg{opt} and \cs{lacunaEnd}\oarg{opt} are used in
2900% the mandatory argument of the \cs{rdg} command to indicate the
2901% beginning and the end of the lacuna. The optional argument of these
2902% commands can be used to specify which witnesses are affected by the
2903% lacuna, as follows:---\\
2904% \DescribeOption{wit} |wit|$=$\meta{csv list of witnesses}\\
2905% This option is described above \vpageref{ref:lem-wit}. Of course, it
2906% is unnecessary to use it in the case where only one witness in
2907% involved in the variant reading that supply the information on the
2908% lacuna.
2909%
2910% \DescribeMacro{\ilabel} \phts\label{ref:ilabel-cmd}
2911% \cs{ilabel}\marg{indexed label} is used to recall the indexed label
2912% set by means of the |ilabel| optional argument of the \cs{lem}
2913% command as described above \vpageref{ref:ilabel-opt}. This command
2914% is used to compute the line number where the lacuna ends and must be
2915% inserted precisely at this place, supposedly outside the group
2916% formed by the \cs{app} command used to print the information on the
2917% lacuna in the apparatus criticus.
2918%
2919% This technique is demonstrated by the following example taken from
2920% Cicero's \emph{Letters to Atticus}, VII,
2921% 9.4:\footnote{\cite[121.13--15]{CiceroAtt}. English translation:
2922% \cite[51]{CiceroAttTr}.}---
2923%
2924% \captof{Cicero, \emph{ad Atticum epistulae}, VII,
2925% 9.4}[\label{lst:cic-att}]
2926% \iffalse
2927%<*example>
2928% \fi
2929\begin{minted}[linenos,escapeinside=++]{latex}
2930\begin{alignment}
2931 \begin{edition}
2932 Praeteriit tempus non legis, \app{
2933 \lem[wit={C}, ilabel={sed7.9.4.14}, alt={sed\===legis}]{sed}+\label{ln:lac:ilabel:opt}+
2934 \rdg[wit={Ω}, alt=\emph{om.}]{\lacunaStart}+\label{ln:lac:lstart}+
2935 } libidinis tuae, fac tamen \app{
2936 \lem[Nolem, wit={C}]{legis\ilabel{sed7.9.4.14}}+\label{ln:lac:ilabel:cmd}+
2937 \rdg[nordg, wit={Ω}]{\lacunaEnd}}; ut succedatur+\label{ln:lac:lend}+
2938 decernitur; impedis et ais: \enquote{habe meam rationem.}
2939 \end{edition}
2940 \begin{translation}
2941 This term, not a legal term, but a term of your own will and
2942 pleasure\===or say, this legal term\===comes to an end. The House
2943 passes a decree for the appointment of a successor. You object and
2944 cry, \enquote{Consider my candidature.}
2945 \end{translation}
2946\end{alignment}
2947\end{minted}
2948% \iffalse
2949%</example>
2950% \fi
2951%
2952% \begin{remarks}
2953% \item At line~\lnref{ln:lac:ilabel:opt}, from the |ilabel| optional
2954% argument, \pkg{ekdosis} knows that the span of text affected by
2955% the lacuna does not end after \emph{sed}, but after \emph{legis}
2956% (l.~\lnref{ln:lac:ilabel:cmd}), at the place where the indexed label
2957% is recalled by \cs{ilabel}. So line numbers are computed
2958% accordingly in the apparatus criticus.
2959% \item The starting and ending points of the lacuna from which the
2960% \sg{Ω} family suffers have been marked by \cs{lacunaStart} and
2961% \cs{lacunaEnd} respectively (ll.~\lnref{ln:lac:lstart} and
2962% \lnref{ln:lac:lend}).
2963% \item Line~\lnref{ln:lac:lend} shows that \emph{legis}
2964% (l.~\lnref{ln:lac:ilabel:cmd}) does not appear in the \sg{Ω}
2965% family. This is where the lacuna ends. Furthermore, as no other
2966% witnesses are mentioned in the \cs{rdg} command
2967% (l.~\lnref{ln:lac:lend}), using the |wit| optional argument of
2968% \cs{lacunaEnd} would introduce an unnecessary redundancy.
2969% \end{remarks}
2970%
2971% PDF output:---\nobreak\medskip
2972% \resetlinenumber
2973% \begin{alignment}[flush,lcols=2]
2974% \begin{edition}
2975% Praeteriit tempus non legis, \app{
2976% \lem[wit={cicC}, ilabel={sed7.9.4.14}, alt={sed\===legis}]{sed}
2977% \rdg[wit={cicΩ}, alt=\emph{om.}]{\lacunaStart}
2978% } libidinis tuae, fac tamen \app{
2979% \lem[Nolem, wit={cicC}]{legis\ilabel{sed7.9.4.14}}
2980% \rdg[nordg, wit={cicΩ}]{\lacunaEnd}}; ut succedatur
2981% decernitur; impedis et ais: \enquote{habe meam rationem.}
2982% \end{edition}
2983% \begin{translation}
2984% This term, not a legal term, but a term of your own will and
2985% pleasure\===or say, this legal term\===comes to an end. The
2986% House passes a decree for the appointment of a successor. You
2987% object and cry, \enquote{Consider my candidature.}
2988% \end{translation}
2989% \end{alignment}
2990%
2991% \medskip
2992% \nobreak \texttt{TEI xml} output (Latin only):---
2993% \iffalse
2994%<*example>
2995% \fi
2996\begin{minted}[linenos]{xml}
2997<p>Praeteriit tempus non legis,
2998<app>
2999 <lem wit="#C">sed</lem>
3000 <rdg wit="#Ω">
3001 <lacunaStart />
3002 </rdg>
3003</app>libidinis tuae, fac tamen
3004<app>
3005 <lem wit="#C">legis</lem>
3006 <rdg wit="#Ω">
3007 <lacunaEnd />
3008 </rdg>
3009</app>; ut succedatur decernitur; impedis et ais:
3010<quote>habe meam rationem.</quote></p>
3011\end{minted}
3012% \iffalse
3013%</example>
3014% \fi
3015%
2795% \section{Alignment of Parallel Texts} 3016% \section{Alignment of Parallel Texts}
2796% \label{sec:alignment-basic} 3017% \label{sec:alignment-basic}
2797% As already said above,\footnote{See point 3018% As already said above,\footnote{See point
@@ -2874,17 +3095,17 @@ friend
2874% \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in 3095% \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in
2875% \vref{sec:caesar-gw-tei}. The corresponding PDF output is available 3096% \vref{sec:caesar-gw-tei}. The corresponding PDF output is available
2876% in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On 3097% in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On
2877% the use of \cs{ekddiv} (ll.~3 and 20), see below 3098% the use of \cs{ekddiv} (ll.~\lnref{ln:caes:div1} and
2878% \vref{sec:ekddiv}.}--- 3099% \lnref{ln:caes:div2}), see below \vref{sec:ekddiv}.}---
2879% 3100%
2880% \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}] 3101% \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}]
2881% \iffalse 3102% \iffalse
2882%<*example> 3103%<*example>
2883% \fi 3104% \fi
2884\begin{minted}{latex} 3105\begin{minted}[escapeinside=++]{latex}
2885\begin{alignment} 3106\begin{alignment}
2886 \begin{edition} 3107 \begin{edition}
2887 \ekddiv{head=XIII, depth=2, n=6.13, type=section} 3108 \ekddiv{head=XIII, depth=2, n=6.13, type=section}+\label{ln:caes:div1}+
2888 In omni Gallia eorum hominum qui \app{ 3109 In omni Gallia eorum hominum qui \app{
2889 \lem[wit=a]{aliquo} 3110 \lem[wit=a]{aliquo}
2890 \rdg[wit=b, alt=in al-]{in aliquo}} 3111 \rdg[wit=b, alt=in al-]{in aliquo}}
@@ -2892,7 +3113,7 @@ friend
2892 seruorum habetur loco, quae \app{ 3113 seruorum habetur loco, quae \app{
2893 \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1}) 3114 \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1})
2894 per se}]{nihil audet per se} 3115 per se}]{nihil audet per se}
2895 \rdg[wit=A1,nordg]{nihil aut et per se} 3116 \rdg[wit=A1,nordg]{nihil aut et per se}+\label{ln:caes:nordg}+
2896 \rdg[wit={R,S,L,N}]{nihil habet per se} 3117 \rdg[wit={R,S,L,N}]{nihil habet per se}
2897 \rdg[wit=b]{per se nihil audet}}, \app{ 3118 \rdg[wit=b]{per se nihil audet}}, \app{
2898 \lem[wit=a]{nullo} 3119 \lem[wit=a]{nullo}
@@ -2901,7 +3122,7 @@ friend
2901 \rdg[wit={T, U}, alt=conc-]{concilio}}. 3122 \rdg[wit={T, U}, alt=conc-]{concilio}}.
2902 \end{edition} 3123 \end{edition}
2903 \begin{translation} 3124 \begin{translation}
2904 \ekddiv{head=XIII, depth=2, n=6.13, type=section} 3125 \ekddiv{head=XIII, depth=2, n=6.13, type=section}+\label{ln:caes:div2}+
2905 Throughout all Gaul there are two orders of those men who are of 3126 Throughout all Gaul there are two orders of those men who are of
2906 any rank and dignity: for the commonality is held almost in the 3127 any rank and dignity: for the commonality is held almost in the
2907 condition of slaves, and dares to undertake nothing of itself, 3128 condition of slaves, and dares to undertake nothing of itself,
@@ -3715,7 +3936,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3715% \iffalse 3936% \iffalse
3716%<*example> 3937%<*example>
3717% \fi 3938% \fi
3718\begin{minted}[numbersep=6pt]{latex} 3939\begin{minted}[numbersep=-.5\linewidth]{latex}
3719\SetHooks{ 3940\SetHooks{
3720 refnumstyle=\normalfont, 3941 refnumstyle=\normalfont,
3721 initialrule=\rule{0.7in}{0.4pt} 3942 initialrule=\rule{0.7in}{0.4pt}
@@ -3748,7 +3969,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3748% 3969%
3749% \paragraph{Limiting the Number of Entries per Page} 3970% \paragraph{Limiting the Number of Entries per Page}
3750% \phts\label{ref:maxentries} 3971% \phts\label{ref:maxentries}
3751% In some instances, it can be useful to set a limit to the number of 3972% In some instances, it may be useful to set a limit to the number of
3752% entries per page that a given layer of critical notes may accept, 3973% entries per page that a given layer of critical notes may accept,
3753% notably when entries are so abundant in number that \pkg{ekdosis} 3974% notably when entries are so abundant in number that \pkg{ekdosis}
3754% may oscillate indefinitely between different sets of page decisions 3975% may oscillate indefinitely between different sets of page decisions
@@ -6449,6 +6670,45 @@ Sample text with a \textcolor{red}{word} in red.
6449%</example> 6670%</example>
6450% \fi 6671% \fi
6451% 6672%
6673% \paragraph{Inserting \texttt{xml:id}\emph{s} in \texttt{TEI} Patterns}
6674% \DescribeMacro{\getTEIxmlid} \newfeature[v1.5] In some instances, it
6675% may be useful to retrieve the |xml| formatted pointers corresponding
6676% to unique identifiers declared in commands such as
6677% \cs{DeclareWitness}\footnote{See above
6678% \vpageref{ref:declarewitness}.} and the like so as to insert them in
6679% the second argument\===\meta{TEI pattern}\===of \cs{TeXtoTEIPat}. As
6680% an illustration, what follows creates a new \LaTeX\ command
6681% \cs{witStart} which prints nothing in the PDF ouput but inserts
6682% |<witStart/>| elements in the \texttt{TEI xml} file. This commands
6683% accepts an optional argument to make clear which are the fragmentary
6684% witnesses involved:---
6685%
6686% \iffalse
6687%<*example>
6688% \fi
6689\begin{minted}[escapeinside=++]{latex}
6690\NewDocumentCommand{\witStart}{O{}}{\ignorespaces}
6691\TeXtoTEIPat{\witStart [wit=@b1]}{<witStart wit="\getTEIxmlid{@b1}"/>}+\label{ln:getxml:a}+
6692\TeXtoTEI{witStart}{witStart}
6693\end{minted}
6694% \iffalse
6695%</example>
6696% \fi
6697%
6698% \begin{remarks}
6699% \item On the use of \cs{NewDocumentCommand} to create new commands,
6700% the reader is invited to refer to the documentation of the
6701% \pkg{xparse} package.\footcite{xparse}
6702% \item As can be seen from l.~\lnref{ln:getxml:a}, \cs{getTEIxmlid}
6703% is used to process the csv-list of unique identifiers that matches
6704% the string captured between the braces after |wit=|, as implied by
6705% |@b1|. As a consequence, \cs{witStart}|[]| is expected as follows:
6706% \mintinline{latex}|\witStart[wit={X,Y}]|. Braces must exist for
6707% pattern matching.
6708% \item Finally, |\TeXtoTEI{witStart}{witStart}| is used so that the
6709% argument-less form of the command can be processed as well.
6710% \end{remarks}
6711%
6452% \subsection{Inserting Code in the \texttt{TEI xml} Ouput File} 6712% \subsection{Inserting Code in the \texttt{TEI xml} Ouput File}
6453% \label{sec:inserting-code-tei} 6713% \label{sec:inserting-code-tei}
6454% It may be needed to insert code in the \texttt{TEI xml} output file 6714% It may be needed to insert code in the \texttt{TEI xml} output file
@@ -6464,8 +6724,17 @@ Sample text with a \textcolor{red}{word} in red.
6464% \texttt{TEI xml} element followed by the contents to be found in the 6724% \texttt{TEI xml} element followed by the contents to be found in the
6465% ouput file between the opening and closing tags. Additionally, 6725% ouput file between the opening and closing tags. Additionally,
6466% attribute-value pairs to be found inside the start-tag of the 6726% attribute-value pairs to be found inside the start-tag of the
6467% element can be specified in the optional argument of the command. An 6727% element can be specified in the optional argument of the command.
6468% example follows: 6728%
6729% \DescribeMacro{\teidirectE} \newfeature[v1.5]
6730% \cs{teidirectE}\oarg{xml attributes}\marg{xml element}\\
6731% \cs{teidirectE}\===where |E| stands for \enquote{\underLine{e}mpty
6732% element}\===is strictly equivalent to
6733% \cs{teidirect}\allowbreak\oarg{xml attributes}\marg{xml
6734% element}|{}|. Compared to the latter command, it only eliminates the
6735% need to insert the ending pair of empty braces.
6736%
6737% An example follows:
6469% 6738%
6470% \iffalse 6739% \iffalse
6471%<*example> 6740%<*example>
@@ -7605,7 +7874,10 @@ Sample text with a \textcolor{red}{word} in red.
7605% 7874%
7606% \section{References} 7875% \section{References}
7607% \label{sec:references} 7876% \label{sec:references}
7608% \printbibliography[heading=none] 7877% \subsection*{Texts Used}
7878% \printbibliography[heading=none, subtype=primary]
7879% \subsection*{References}
7880% \printbibliography[heading=none, notsubtype=primary]
7609% 7881%
7610% \section{Sample: C. J. Caesar, \emph{Gallic War}, 7882% \section{Sample: C. J. Caesar, \emph{Gallic War},
7611% VI, XIII.1} 7883% VI, XIII.1}
@@ -7791,7 +8063,7 @@ Sample text with a \textcolor{red}{word} in red.
7791% \end{macrocode} 8063% \end{macrocode}
7792% \paragraph{\textsf{ekdosis} Symbol} 8064% \paragraph{\textsf{ekdosis} Symbol}
7793% \begin{macro}{\eKd} 8065% \begin{macro}{\eKd}
7794% \changes{v1.5}{2022/01/05}{Prints \textsf{ekdosis} indentifying 8066% \changes{v1.5}{2022/01/15}{Prints \textsf{ekdosis} indentifying
7795% symbol} As of v1.5, \pkg{ekdosis} has its own identifying 8067% symbol} As of v1.5, \pkg{ekdosis} has its own identifying
7796% symbol. It is produced by \cs{eKd} and best printed with the Old 8068% symbol. It is produced by \cs{eKd} and best printed with the Old
7797% Standard Greek font. 8069% Standard Greek font.
@@ -8049,13 +8321,33 @@ Sample text with a \textcolor{red}{word} in red.
8049% \end{macrocode} 8321% \end{macrocode}
8050% \end{macro} 8322% \end{macro}
8051% \begin{macro}{\teidirect} 8323% \begin{macro}{\teidirect}
8324% \begin{macro}{\teidirectE}
8052% \changes{v1.3}{2021/08/18}{direct insertion of elements in the 8325% \changes{v1.3}{2021/08/18}{direct insertion of elements in the
8053% \texttt{TEI xml} file} 8326% \texttt{TEI xml} file}
8327% \changes{v1.5}{2022/01/15}{direct insertion of empty elements in the
8328% \texttt{TEI xml} file}
8054% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} 8329% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
8055% does nothing in \LaTeX. Its only use is to insert elements in the 8330% does nothing in \LaTeX. It is only used to insert elements in the
8056% \texttt{TEI xml} output file. 8331% \texttt{TEI xml} output file. \cs{teidirectE}\oarg{xml
8332% attributes}\marg{xml element} is strictly equivalent to
8333% \cs{teidirect}\oarg{xml attributes}\marg{xml element}|{}| and can be
8334% used to insert empty \texttt{TEI} elements.
8335% \begin{macrocode}
8336\NewDocumentCommand{\teidirect}{O{} m m}{\ignorespaces}
8337\NewDocumentCommand{\teidirectE}{O{} m}{\ignorespaces}
8338% \end{macrocode}
8339% \end{macro}
8340% \end{macro}
8341% \begin{macro}{\getTEIxmlid}
8342% \changes{v1.5}{2022/01/15}{returns \texttt{TEI xml:ids} from a
8343% csv-list of ids} This command returns from a csv-list of unique
8344% identifiers declared in commands such as \cs{DeclareWitness} and the
8345% like a space-separated list of their corresponding |xml:id|s, each
8346% preceded by the octothorpe (the |#| sign).
8057% \begin{macrocode} 8347% \begin{macrocode}
8058\NewDocumentCommand{\teidirect}{O{}mm}{\ignorespaces} 8348\NewDocumentCommand{\getTEIxmlid}{m}{%
8349 \luadirect{tex.sprint(ekdosis.getsiglum(\luastringN{#1}, "TEI"))}%
8350}
8059% \end{macrocode} 8351% \end{macrocode}
8060% \end{macro} 8352% \end{macro}
8061% \begin{macro}{\EnvtoTEI} 8353% \begin{macro}{\EnvtoTEI}
@@ -8612,11 +8904,21 @@ Sample text with a \textcolor{red}{word} in red.
8612% while \cs{append@ln@app} inserts a (sub)entry possibly preceded by a 8904% while \cs{append@ln@app} inserts a (sub)entry possibly preceded by a
8613% line number. 8905% line number.
8614% \begin{macrocode} 8906% \begin{macrocode}
8615\NewDocumentCommand{\append@ln@app}{o +m}{% 8907\NewDocumentCommand{\append@ln@app}{o o +m}{%
8616 \IfNoValueTF{#1} 8908 \IfNoValueTF{#2}
8617 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2}))}} 8909 {\IfNoValueTF{#1}
8618 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2}, 8910 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}))}}
8619 \luastringO{#1}))}}} 8911 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3},
8912 \luastringO{#1}))}}%
8913 }
8914 {\IfNoValueTF{#1}
8915 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}, nil,
8916 \luastringO{#2}))}}
8917 {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3},
8918 \luastringO{#1},
8919 \luastringO{#2}))}}%
8920 }%
8921}
8620% \end{macrocode} 8922% \end{macrocode}
8621% \paragraph{Lineation Settings} 8923% \paragraph{Lineation Settings}
8622% \begin{macro}{\outerlinenumbers} 8924% \begin{macro}{\outerlinenumbers}
@@ -8980,6 +9282,7 @@ Sample text with a \textcolor{red}{word} in red.
8980% \begin{macrocode} 9282% \begin{macrocode}
8981\newif\ifekdl@forcenum 9283\newif\ifekdl@forcenum
8982\newif\ifekdl@nonum 9284\newif\ifekdl@nonum
9285\newif\ifekdl@ilabel
8983\ekvdefinekeys{lem}{ 9286\ekvdefinekeys{lem}{
8984 code wit = \def\ekdlr@wit{#1}, 9287 code wit = \def\ekdlr@wit{#1},
8985 code source = \def\ekdlr@source{#1}, 9288 code source = \def\ekdlr@source{#1},
@@ -8989,12 +9292,14 @@ Sample text with a \textcolor{red}{word} in red.
8989 code post = \def\ekdlr@post{#1}, 9292 code post = \def\ekdlr@post{#1},
8990 code prewit = \def\ekdlr@prewit{#1}, 9293 code prewit = \def\ekdlr@prewit{#1},
8991 code postwit = \def\ekdlr@postwit{#1}, 9294 code postwit = \def\ekdlr@postwit{#1},
9295 code ilabel = \ekdl@ilabeltrue\def\ilabel@val{#1},
8992 store type = \ekdlr@type, 9296 store type = \ekdlr@type,
8993 store sep = \ekdl@sep, 9297 store sep = \ekdl@sep,
8994 noval nonum = \ekdl@nonumtrue, 9298 noval nonum = \ekdl@nonumtrue,
8995 noval num = \ekdl@forcenumtrue, 9299 noval num = \ekdl@forcenumtrue,
8996 bool nodelim = \ifekdl@nodelim, 9300 bool nodelim = \ifekdl@nodelim,
8997 bool nolem = \ifekdl@nolem, 9301 bool nolem = \ifekdl@nolem,
9302 nmeta Nolem = {nodelim, nonum, nolem},
8998 bool nosep = \ifekdl@nosep, 9303 bool nosep = \ifekdl@nosep,
8999 initial sep = \ekdsep 9304 initial sep = \ekdsep
9000} 9305}
@@ -9059,12 +9364,18 @@ Sample text with a \textcolor{red}{word} in red.
9059% \begin{macrocode} 9364% \begin{macrocode}
9060\NewDocumentCommand{\lem}{O{} m}{% 9365\NewDocumentCommand{\lem}{O{} m}{%
9061 \ekd@isinlemtrue 9366 \ekd@isinlemtrue
9062 \luadirect{ekdosis.dolnlab(\luastringN{#2})}% 9367 \bgroup
9063 \null
9064 \bgroup%
9065 \ekdl@forcenumfalse 9368 \ekdl@forcenumfalse
9066 \ekdl@nonumfalse 9369 \ekdl@nonumfalse
9370 \ekdl@ilabelfalse
9067 \ekvset{lem}{#1}% 9371 \ekvset{lem}{#1}%
9372 \ifekdl@ilabel
9373 \luadirect{ekdosis.dolnlab(\luastringN{#2},
9374 \luastringO{\ilabel@val})}%
9375 \else
9376 \luadirect{ekdosis.dolnlab(\luastringN{#2})}%
9377 \fi
9378 \null
9068 \ekd@test@lang 9379 \ekd@test@lang
9069 \ifekd@mapps% 9380 \ifekd@mapps%
9070 \ifnum% 9381 \ifnum%
@@ -9176,11 +9487,19 @@ Sample text with a \textcolor{red}{word} in red.
9176 \ifekdl@nosep\else\unexpanded\expandafter{\ekdl@sep}\fi 9487 \ifekdl@nosep\else\unexpanded\expandafter{\ekdl@sep}\fi
9177 }% 9488 }%
9178 }% 9489 }%
9179 \fi% 9490 \fi
9180 \ifekd@mapps% 9491 \ifekd@mapps
9181 \append@ln@app[\ekdan@type]{\lem@app}% 9492 \ifekdl@ilabel
9182 \else% 9493 \append@ln@app[\ekdan@type][\ilabel@val]{\lem@app}%
9183 \append@ln@app{\lem@app}% 9494 \else
9495 \append@ln@app[\ekdan@type]{\lem@app}%
9496 \fi
9497 \else
9498 \ifekdl@ilabel
9499 \append@ln@app[][\ilabel@val]{\lem@app}
9500 \else
9501 \append@ln@app{\lem@app}%
9502 \fi
9184 \fi% 9503 \fi%
9185 \egroup% 9504 \egroup%
9186 \ekd@isinlemfalse% 9505 \ekd@isinlemfalse%
@@ -9594,6 +9913,30 @@ Sample text with a \textcolor{red}{word} in red.
9594} 9913}
9595% \end{macrocode} 9914% \end{macrocode}
9596% \end{macro} 9915% \end{macro}
9916% \paragraph{Lacunae}
9917% \begin{macro}{\ilabel}
9918% \changes{v1.5}{2022/01/15}{recalls and sets the ending label of
9919% lemmas used to mark lacunae in witnesses} When \cs{lem} has been
9920% used with the optional argument |ilabel=<label>|,
9921% \cs{ilabel}\marg{label} must be used to mark the point where the
9922% span of text corresponding to the abbreviated lemma ends. This
9923% command is used to set the ending line number of physical lacunae in
9924% the apparatus criticus.
9925% \begin{macrocode}
9926\NewDocumentCommand{\ilabel}{m}{%
9927 \luadirect{tex.sprint(ekdosis.getindexedlab(\luastringN{#1}))}%
9928}
9929% \end{macrocode}
9930% \end{macro}
9931% \begin{macro}{\lacunaStart}
9932% \begin{macro}{\lacunaEnd}
9933% \begin{macrocode}
9934\NewDocumentCommand{\lacunaStart}{O{}}{\ignorespaces}
9935\NewDocumentCommand{\lacunaEnd}{O{}}{\ignorespaces}
9936% \end{macrocode}
9937% \end{macro}
9938% \end{macro}
9939% \paragraph{Apparatus Criticus}
9597% \cs{apparatus} is used internally by \pkg{ekdosis} to print the 9940% \cs{apparatus} is used internally by \pkg{ekdosis} to print the
9598% apparatus at the bottom of pages. Therefore, it is not documented, 9941% apparatus at the bottom of pages. Therefore, it is not documented,
9599% but this may change in the future for it will be possible to have 9942% but this may change in the future for it will be possible to have
@@ -10157,6 +10500,14 @@ Sample text with a \textcolor{red}{word} in red.
10157\def\ekdunspace{\hskip-\ekdspace} 10500\def\ekdunspace{\hskip-\ekdspace}
10158% \end{macrocode} 10501% \end{macrocode}
10159% \end{macro} 10502% \end{macro}
10503% \subsection*{Errors and Warnings}
10504% \begin{macrocode}
10505\def\ekd@wrong@ilabel{
10506 \PackageError{ekdosis}%
10507 {Unknown ``ilabel'' in \string\ilabel{}}%
10508 {Please check for an ``ilabel'' that exists.}
10509}
10510% \end{macrocode}
10160% \paragraph{Configuration File} Finally, if a configuration file 10511% \paragraph{Configuration File} Finally, if a configuration file
10161% named |\jobname-ekd.cfg| can be found, this file is read and its 10512% named |\jobname-ekd.cfg| can be found, this file is read and its
10162% contents loaded into the document preamble. This provides a 10513% contents loaded into the document preamble. This provides a
@@ -10165,6 +10516,7 @@ Sample text with a \textcolor{red}{word} in red.
10165% \begin{macrocode} 10516% \begin{macrocode}
10166\IfFileExists{\jobname-ekd.cfg}{\input{\jobname-ekd.cfg}}{} 10517\IfFileExists{\jobname-ekd.cfg}{\input{\jobname-ekd.cfg}}{}
10167% \end{macrocode} 10518% \end{macrocode}
10519%
10168% \iffalse 10520% \iffalse
10169%</package> 10521%</package>
10170% \fi 10522% \fi
@@ -10242,10 +10594,11 @@ local citecmds = lpeg.Cs(lpeg.P("icite")
10242 + lpeg.P("autocite") 10594 + lpeg.P("autocite")
10243 + lpeg.P("Autocite") 10595 + lpeg.P("Autocite")
10244 + lpeg.P("autocite *") 10596 + lpeg.P("autocite *")
10245 + lpeg.P("Autocite *") 10597 + lpeg.P("Autocite *"))
10246) 10598
10247-- 10599--
10248-- Bind to local variables 10600-- Bind to local variables
10601--
10249local next = next 10602local next = next
10250 10603
10251-- General 10604-- General
@@ -10600,6 +10953,8 @@ local texpatttotags = {
10600 {a="\\indentpattern%s+{(.-)}", b=""}, 10953 {a="\\indentpattern%s+{(.-)}", b=""},
10601 {a="\\ekdnohfmark%s+", b=""}, 10954 {a="\\ekdnohfmark%s+", b=""},
10602 {a="\\settowidth%s+{(.-)}{(.-)}", b=""}, 10955 {a="\\settowidth%s+{(.-)}{(.-)}", b=""},
10956 {a="\\teidirectE%s+(%b[]){(.-)}", b="<%2 ekd@os%1ekd@cs/>"},
10957 {a="\\teidirectE%s+{(.-)}", b="<%1/>"},
10603 {a="\\poemlines%s+{(.-)}", b=""}, 10958 {a="\\poemlines%s+{(.-)}", b=""},
10604 {a="\\pagebreak%s+%[[1-4]%]", b=""}, 10959 {a="\\pagebreak%s+%[[1-4]%]", b=""},
10605 {a="\\pagebreak%s+", b=""}, 10960 {a="\\pagebreak%s+", b=""},
@@ -10607,6 +10962,7 @@ local texpatttotags = {
10607 {a="\\teidirect%s+{(.-)}(%b{})", b="<%1>ekd@ob%2ekd@cb</%1>"}, 10962 {a="\\teidirect%s+{(.-)}(%b{})", b="<%1>ekd@ob%2ekd@cb</%1>"},
10608 {a="\\altrfont%s+", b=""}, 10963 {a="\\altrfont%s+", b=""},
10609 {a="\\endmark%s+", b=""}, 10964 {a="\\endmark%s+", b=""},
10965 {a="\\ilabel%s+(%b{})", b=""},
10610 {a="\\unskip%s+", b=""}, 10966 {a="\\unskip%s+", b=""},
10611 {a="\\ekdpb%s+%*?%[(.-)%]{(.-)}", b=""}, 10967 {a="\\ekdpb%s+%*?%[(.-)%]{(.-)}", b=""},
10612 {a="\\ekdpb%s+%*?{(.-)}", b=""}, 10968 {a="\\ekdpb%s+%*?{(.-)}", b=""},
@@ -11095,10 +11451,44 @@ local function cmdtotei(str)
11095 end) 11451 end)
11096 end 11452 end
11097 -- temporarily: 11453 -- temporarily:
11098 str = string.gsub(str, "\\(getsiglum)%s?(%b{})", 11454 -- lacunae
11455 str = gsub(str,
11456 spcenc^-1 *
11457 dblbkslash *
11458 lpeg.Cs(lpeg.P("lacunaStart") + lpeg.P("lacunaEnd")) *
11459 spcenc^-1 *
11460 bsqbrackets^-1 *
11461 spcenc^-1,
11462 function(bkslash, cmd, opt)
11463 if opt == nil
11464 then
11465 return string.format("<%s/>", cmd)
11466 else
11467 opt = string.sub(opt, 2, -2)
11468 teiwit = get_attr_value(opt, "wit")
11469 if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end
11470 teisource = get_attr_value(opt, "source")
11471 if teisource ~= "" then teisource = " source=\""..ekdosis.getsiglum(teisource, "tei").."\"" else end
11472 if opt == ""
11473 then
11474 return string.format("<%s></%s>", cmd, cmd)
11475 else
11476 return string.format("<%s%s%s></%s>",
11477 cmd, teiwit, teisource, cmd)
11478 end
11479 end
11480 end)
11481 str = string.gsub(str, "\\(getTEIxmlid)%s?(%b{})",
11099 function(cmd, body) 11482 function(cmd, body)
11100 body = string.sub(body, 2, -2) 11483 body = string.sub(body, 2, -2)
11101 teisiglum = ekdosis.getsiglum(body, "tei") 11484 teisiglum = ekdosis.getsiglum(body, "tei")
11485 -- body = cmdtotei(body)
11486 return string.format("%s", teisiglum)
11487 end)
11488 str = string.gsub(str, "\\(getsiglum)%s?(%b[])(%b{})",
11489 function(cmd, opt, body)
11490 body = string.sub(body, 2, -2)
11491 teisiglum = ekdosis.getsiglum(body, "tei")
11102 printsiglum = ekdosis.getsiglum(body) 11492 printsiglum = ekdosis.getsiglum(body)
11103 -- body = cmdtotei(body) 11493 -- body = cmdtotei(body)
11104 return string.format("<ref target=\"%s\">%s</ref>", 11494 return string.format("<ref target=\"%s\">%s</ref>",
@@ -12469,6 +12859,7 @@ local lnlab_salt = 0
12469local current_lnlab = nil 12859local current_lnlab = nil
12470local prev_lnlab = nil 12860local prev_lnlab = nil
12471local prev_prev_lnlab = nil 12861local prev_prev_lnlab = nil
12862local indexed_labs = {}
12472local notelabs = {} 12863local notelabs = {}
12473local current_notelab = nil 12864local current_notelab = nil
12474local prev_notelab = nil 12865local prev_notelab = nil
@@ -12482,16 +12873,24 @@ local function mdvisintable(table, value)
12482 return false 12873 return false
12483end 12874end
12484 12875
12485function ekdosis.dolnlab(str) 12876function ekdosis.dolnlab(str, indexlab)
12486 if prev_lnlab ~= nil then prev_prev_lnlab = prev_lnlab end 12877 if prev_lnlab ~= nil then prev_prev_lnlab = prev_lnlab end
12487 prev_lnlab = current_lnlab 12878 prev_lnlab = current_lnlab
12488 current_lemma = str 12879 current_lemma = str
12489 i = md5.sumhexa(str) 12880 i = md5.sumhexa(str)
12490 if not mdvisintable(lnlabs, i) then 12881 if not mdvisintable(lnlabs, i) then
12491 table.insert(lnlabs, i) 12882 table.insert(lnlabs, i)
12883 if indexlab ~= nil
12884 then
12885 indexed_labs[indexlab] = i
12886 end
12492 else 12887 else
12493 i = i..salt 12888 i = i..salt
12494 table.insert(lnlabs, i) 12889 table.insert(lnlabs, i)
12890 if indexlab ~= nil
12891 then
12892 indexed_labs[indexlab] = i
12893 end
12495 salt = salt + 1 12894 salt = salt + 1
12496 end 12895 end
12497 current_lnlab = i 12896 current_lnlab = i
@@ -12510,6 +12909,14 @@ function ekdosis.getprevprevlnlab()
12510 return prev_prev_lnlab 12909 return prev_prev_lnlab
12511end 12910end
12512 12911
12912function ekdosis.getindexedlab(str)
12913 if indexed_labs[str] == nil
12914 then return "\\csname ekd@wrong@ilabel\\endcsname"
12915 else
12916 return "\\linelabel{" .. indexed_labs[str] .. "-e}"
12917 end
12918end
12919
12513function ekdosis.setnotelab(str) 12920function ekdosis.setnotelab(str)
12514 current_notelab = str 12921 current_notelab = str
12515 if isfound(notelabs, current_notelab) 12922 if isfound(notelabs, current_notelab)
@@ -12535,38 +12942,45 @@ function ekdosis.getprevnotelab()
12535end 12942end
12536 12943
12537local cmdstorm = lpeg.P(lpeg.P("note") 12944local cmdstorm = lpeg.P(lpeg.P("note")
12538 + lpeg.P("linelabel") 12945 + lpeg.P("linelabel")
12539 + lpeg.P("index")) 12946 + lpeg.P("ilabel")
12947 + lpeg.P("index"))
12540 12948
12541local function remove_from_app(str) 12949local function remove_from_app(str)
12542 str = gsub(str, dblbkslash * cmdstorm * cmdargs, "") 12950 str = gsub(str, dblbkslash * cmdstorm * cmdargs, "")
12543 return str 12951 return str
12544end 12952end
12545 12953
12546function ekdosis.mdvappend(str, teitype) 12954function ekdosis.mdvappend(str, teitype, ilabel)
12547 if current_lemma == "" 12955 if current_lemma == ""
12548 then 12956 then
12549 current_lemma = "\\ekdunspace" 12957 current_lemma = "\\ekdunspace"
12550 end 12958 end
12959 local labelbegin = "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}"
12960 local labelend = "\\linelabel{" .. current_lnlab .. "-e}"
12961 if ilabel ~= nil
12962 then
12963 labelend = ""
12964 end
12551 if teitype == nil 12965 if teitype == nil
12552 then 12966 then
12553 return "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}" 12967 return labelbegin
12554 .. 12968 ..
12555 current_lemma 12969 current_lemma
12556 .. 12970 ..
12557 "\\linelabel{" .. current_lnlab .. "-e}" 12971 labelend
12558 .. 12972 ..
12559 "\\csname append@app\\endcsname{" 12973 "\\csname append@app\\endcsname{"
12560 .. remove_from_app(str) .. "}" 12974 .. remove_from_app(str) .. "}"
12561 else 12975 else
12562 return "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}" 12976 return labelbegin
12563 .. 12977 ..
12564 current_lemma 12978 current_lemma
12565 .. 12979 ..
12566 "\\linelabel{" .. current_lnlab .. "-e}" 12980 labelend
12567 .. 12981 ..
12568 "\\csname append@app\\endcsname" .. "[" .. teitype .. "]{" 12982 "\\csname append@app\\endcsname" .. "[" .. teitype .. "]{"
12569 .. remove_from_app(str) .. "}" 12983 .. remove_from_app(str) .. "}"
12570 end 12984 end
12571end 12985end
12572 12986
diff --git a/ekdosis.el b/ekdosis.el
index 8f6d8ab..e9fb8a7 100644
--- a/ekdosis.el
+++ b/ekdosis.el
@@ -90,9 +90,12 @@
90 ("postwit") 90 ("postwit")
91 ("sep") 91 ("sep")
92 ("type") 92 ("type")
93 ("ilabel")
94 ("nodelim")
93 ("num") 95 ("num")
94 ("nonum") 96 ("nonum")
95 ("nolem" ("true" "false")) 97 ("nolem" ("true" "false"))
98 ("Nolem")
96 ("nosep" ("true" "false"))) 99 ("nosep" ("true" "false")))
97 "Local options for lem macro") 100 "Local options for lem macro")
98 101
@@ -261,6 +264,9 @@
261 '("[l]" ("linelabel")) 264 '("[l]" ("linelabel"))
262 t) 265 t)
263 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) 266 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list)
267 '("[l]" ("ilabel"))
268 t)
269 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list)
264 '("{{1}}" ("surplus")) 270 '("{{1}}" ("surplus"))
265 t) 271 t)
266 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) 272 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list)
@@ -284,6 +290,9 @@
284 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) 290 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list)
285 '("[t]" ("teidirect")) 291 '("[t]" ("teidirect"))
286 t) 292 t)
293 (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list)
294 '("[t]" ("teidirectE"))
295 t)
287 ;; This package relies on lualatex, so check for it: 296 ;; This package relies on lualatex, so check for it:
288 (TeX-check-engine-add-engines 'luatex) 297 (TeX-check-engine-add-engines 'luatex)
289 (TeX-add-symbols 298 (TeX-add-symbols
@@ -308,6 +317,8 @@
308 0) 317 0)
309 '("linelabel" "label" 318 '("linelabel" "label"
310 0) 319 0)
320 '("ilabel" "indexed label"
321 0)
311 '("app" [ TeX-arg-key-val LaTeX-ekdosis-app-options ] 322 '("app" [ TeX-arg-key-val LaTeX-ekdosis-app-options ]
312 t) 323 t)
313 '("lem" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-lem-options ] 324 '("lem" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-lem-options ]
@@ -390,6 +401,7 @@
390 '("EnvtoTEI*" "env name" "TEI element" [ "TEI attributes" ] 0) 401 '("EnvtoTEI*" "env name" "TEI element" [ "TEI attributes" ] 0)
391 '("TeXtoTEIPat" "TeX pattern" "TEI pattern" 0) 402 '("TeXtoTEIPat" "TeX pattern" "TEI pattern" 0)
392 '("teidirect" [ "xml attributes" ] "xml element" "code" 0) 403 '("teidirect" [ "xml attributes" ] "xml element" "code" 0)
404 '("teidirectE" [ "xml attributes" ] "xml element" 0)
393 '("AddxmlBibResource" "basename or name.xml" 0) 405 '("AddxmlBibResource" "basename or name.xml" 0)
394 ) 406 )
395 (LaTeX-add-environments 407 (LaTeX-add-environments