aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx47
1 files changed, 27 insertions, 20 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index f56aafb..8325bc1 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -59,7 +59,7 @@ Alessi <alessi@robertalessi.net>
59%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 59%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
60%<package>\ProvidesPackage{ekdosis} 60%<package>\ProvidesPackage{ekdosis}
61%<*package> 61%<*package>
62 [2023/03/30 v1.5-dev Typesetting TEI xml-compliant critical editions] 62 [2023/04/01 v1.5-dev Typesetting TEI xml-compliant critical editions]
63%</package> 63%</package>
64%<*driver> 64%<*driver>
65\begin{filecontents}[noheader,overwrite]{bibdata.xml} 65\begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -4793,7 +4793,8 @@ argument of the
4793 refnumstyle=\normalfont, 4793 refnumstyle=\normalfont,
4794 postrefnum=.~, 4794 postrefnum=.~,
4795 lemmastyle=\bfseries, 4795 lemmastyle=\bfseries,
4796 readingstyle=\itshape 4796 readingstyle=\itshape,
4797 familysep={, }
4797} 4798}
4798% The lines are to be centered horizontally: 4799% The lines are to be centered horizontally:
4799\settowidth{\versewidth}{Feed'st thy lights flame with selfe 4800\settowidth{\versewidth}{Feed'st thy lights flame with selfe
@@ -4916,7 +4917,8 @@ substantiall fewell,}
4916% refnumstyle=\normalfont, 4917% refnumstyle=\normalfont,
4917% postrefnum=.~, 4918% postrefnum=.~,
4918% lemmastyle=\bfseries, 4919% lemmastyle=\bfseries,
4919% readingstyle=\itshape 4920% readingstyle=\itshape,
4921% familysep={, }
4920% } 4922% }
4921% \renewcommand\thelinenumber{} 4923% \renewcommand\thelinenumber{}
4922% \settowidth{\versewidth}{Feed'st thy lights flame with selfe 4924% \settowidth{\versewidth}{Feed'st thy lights flame with selfe
@@ -4999,6 +5001,7 @@ substantiall fewell,}
4999% \end{ekdverse} 5001% \end{ekdverse}
5000% \end{shakespeare} 5002% \end{shakespeare}
5001% \end{alignment} 5003% \end{alignment}
5004% \SetHooks{familysep=reset}
5002% \endgroup 5005% \endgroup
5003% 5006%
5004% \texttt{TEI xml} output:--- 5007% \texttt{TEI xml} output:---
@@ -8024,7 +8027,7 @@ Sample text with a \textcolor{red}{word} in red.
8024% \end{macrocode} 8027% \end{macrocode}
8025% \paragraph{\textsf{ekdosis} Symbol} 8028% \paragraph{\textsf{ekdosis} Symbol}
8026% \begin{macro}{\eKd} 8029% \begin{macro}{\eKd}
8027% \changes{v1.5}{2023/03/30}{Prints \textsf{ekdosis} indentifying 8030% \changes{v1.5}{2023/04/01}{Prints \textsf{ekdosis} indentifying
8028% symbol} As of v1.5, \pkg{ekdosis} has its own identifying 8031% symbol} As of v1.5, \pkg{ekdosis} has its own identifying
8029% symbol. It is produced by \cs{eKd} and best printed with the Old 8032% symbol. It is produced by \cs{eKd} and best printed with the Old
8030% Standard Greek font. 8033% Standard Greek font.
@@ -8287,7 +8290,7 @@ Sample text with a \textcolor{red}{word} in red.
8287% \begin{macro}{\teidirectE} 8290% \begin{macro}{\teidirectE}
8288% \changes{v1.3}{2021/08/18}{direct insertion of elements in the 8291% \changes{v1.3}{2021/08/18}{direct insertion of elements in the
8289% \texttt{TEI xml} file} 8292% \texttt{TEI xml} file}
8290% \changes{v1.5}{2023/03/30}{direct insertion of empty elements in the 8293% \changes{v1.5}{2023/04/01}{direct insertion of empty elements in the
8291% \texttt{TEI xml} file} 8294% \texttt{TEI xml} file}
8292% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} 8295% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
8293% does nothing in \LaTeX. It is only used to insert elements in the 8296% does nothing in \LaTeX. It is only used to insert elements in the
@@ -8302,7 +8305,7 @@ Sample text with a \textcolor{red}{word} in red.
8302% \end{macro} 8305% \end{macro}
8303% \end{macro} 8306% \end{macro}
8304% \begin{macro}{\getTEIxmlid} 8307% \begin{macro}{\getTEIxmlid}
8305% \changes{v1.5}{2023/03/30}{returns \texttt{TEI xml:ids} from a 8308% \changes{v1.5}{2023/04/01}{returns \texttt{TEI xml:ids} from a
8306% csv-list of ids} This command returns from a csv-list of unique 8309% csv-list of ids} This command returns from a csv-list of unique
8307% identifiers declared in commands such as \cs{DeclareWitness} and the 8310% identifiers declared in commands such as \cs{DeclareWitness} and the
8308% like a space-separated list of their corresponding |xml:id|s, each 8311% like a space-separated list of their corresponding |xml:id|s, each
@@ -8778,7 +8781,7 @@ Sample text with a \textcolor{red}{word} in red.
8778\newlength{\ekd@app@localheight} 8781\newlength{\ekd@app@localheight}
8779% \end{macrocode} 8782% \end{macrocode}
8780% \begin{macro}{\localappheight} 8783% \begin{macro}{\localappheight}
8781% \changes{v1.5}{2023/03/30}{changes the height of the apparatus 8784% \changes{v1.5}{2023/04/01}{changes the height of the apparatus
8782% criticus} 8785% criticus}
8783% \cs{localappheight}\marg{dimen} can be used to change locally the 8786% \cs{localappheight}\marg{dimen} can be used to change locally the
8784% length of \cs{ekd@app@height} set by the |appheight| option of 8787% length of \cs{ekd@app@height} set by the |appheight| option of
@@ -8797,7 +8800,7 @@ Sample text with a \textcolor{red}{word} in red.
8797% \end{macrocode} 8800% \end{macrocode}
8798% \end{macro} 8801% \end{macro}
8799% \begin{macro}{\addtoappheight} 8802% \begin{macro}{\addtoappheight}
8800% \changes{v1.5}{2023/03/30}{increases or decreases the height of the 8803% \changes{v1.5}{2023/04/01}{increases or decreases the height of the
8801% apparatus criticus} 8804% apparatus criticus}
8802% As the name suggests, in contrast to \cs{localappheight}, 8805% As the name suggests, in contrast to \cs{localappheight},
8803% \cs{addtoappheight}\marg{dimen} is used to increase or decrease 8806% \cs{addtoappheight}\marg{dimen} is used to increase or decrease
@@ -9083,7 +9086,7 @@ Sample text with a \textcolor{red}{word} in red.
9083% The following commands are provided to set and control the maximum 9086% The following commands are provided to set and control the maximum
9084% number of lines printed on each page. 9087% number of lines printed on each page.
9085% \begin{macro}{\setmaxlines} 9088% \begin{macro}{\setmaxlines}
9086% \changes{v1.5}{2023/03/30}{limits the number of lines per page} 9089% \changes{v1.5}{2023/04/01}{limits the number of lines per page}
9087% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer 9090% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer
9088% $\geq 1$, can be used either in the preamble or at any point of the 9091% $\geq 1$, can be used either in the preamble or at any point of the
9089% document to set the maximum number of lines to be printed on each 9092% document to set the maximum number of lines to be printed on each
@@ -9094,7 +9097,7 @@ Sample text with a \textcolor{red}{word} in red.
9094% \end{macrocode} 9097% \end{macrocode}
9095% \end{macro} 9098% \end{macro}
9096% \begin{macro}{\localmaxlines} 9099% \begin{macro}{\localmaxlines}
9097% \changes{v1.5}{2023/03/30}{changes the maximum number of lines 9100% \changes{v1.5}{2023/04/01}{changes the maximum number of lines
9098% locally} 9101% locally}
9099% Once a maximum number of lines per page has been set, 9102% Once a maximum number of lines per page has been set,
9100% \cs{localmaxlines}\marg{n} can be used to adjust this number on a 9103% \cs{localmaxlines}\marg{n} can be used to adjust this number on a
@@ -9107,7 +9110,7 @@ Sample text with a \textcolor{red}{word} in red.
9107% \end{macrocode} 9110% \end{macrocode}
9108% \end{macro} 9111% \end{macro}
9109% \begin{macro}{\addtomaxlines} 9112% \begin{macro}{\addtomaxlines}
9110% \changes{v1.5}{2023/03/30}{adds or subtracts lines from a given page} 9113% \changes{v1.5}{2023/04/01}{adds or subtracts lines from a given page}
9111% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as 9114% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as
9112% argument the number of lines one wishes to add or substract from the 9115% argument the number of lines one wishes to add or substract from the
9113% number that has been set by \cs{setmaxlines}. As a result, \meta{n} 9116% number that has been set by \cs{setmaxlines}. As a result, \meta{n}
@@ -9120,7 +9123,7 @@ Sample text with a \textcolor{red}{word} in red.
9120% \end{macrocode} 9123% \end{macrocode}
9121% \end{macro} 9124% \end{macro}
9122% \begin{macro}{\nomaxlines} 9125% \begin{macro}{\nomaxlines}
9123% \changes{v1.5}{2023/03/30}{unsets \cs{setmaxlines}} 9126% \changes{v1.5}{2023/04/01}{unsets \cs{setmaxlines}}
9124% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. 9127% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
9125% \begin{macrocode} 9128% \begin{macrocode}
9126\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} 9129\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9184,7 +9187,7 @@ Sample text with a \textcolor{red}{word} in red.
9184% \end{macrocode} 9187% \end{macrocode}
9185% \end{macro} 9188% \end{macro}
9186% \begin{macro}{\App} 9189% \begin{macro}{\App}
9187% \changes{v1.5}{2023/03/30}{To be used conjointly with 9190% \changes{v1.5}{2023/04/01}{To be used conjointly with
9188% \texttt{ekdosis.el}} 9191% \texttt{ekdosis.el}}
9189% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and 9192% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and
9190% accepts one optional argument like so: 9193% accepts one optional argument like so:
@@ -10068,7 +10071,7 @@ Sample text with a \textcolor{red}{word} in red.
10068% \end{macro} 10071% \end{macro}
10069% \paragraph{Lacunae} 10072% \paragraph{Lacunae}
10070% \begin{macro}{\ilabel} 10073% \begin{macro}{\ilabel}
10071% \changes{v1.5}{2023/03/30}{recalls and sets the ending label of 10074% \changes{v1.5}{2023/04/01}{recalls and sets the ending label of
10072% lemmas used to mark lacunae in witnesses} When \cs{lem} has been 10075% lemmas used to mark lacunae in witnesses} When \cs{lem} has been
10073% used with the optional argument |ilabel=<label>|, 10076% used with the optional argument |ilabel=<label>|,
10074% \cs{ilabel}\marg{label} must be used to mark the point where the 10077% \cs{ilabel}\marg{label} must be used to mark the point where the
@@ -10384,7 +10387,7 @@ Sample text with a \textcolor{red}{word} in red.
10384% \end{macrocode} 10387% \end{macrocode}
10385% \end{macro} 10388% \end{macro}
10386% \begin{macro}{\ekdEOprint} 10389% \begin{macro}{\ekdEOprint}
10387% \changes{v1.5}{2023/03/30}{Sets headers and footers on 10390% \changes{v1.5}{2023/04/01}{Sets headers and footers on
10388% \enquote{paired} facing pages} 10391% \enquote{paired} facing pages}
10389% To set headers and footers on \enquote{paired} facing pages, 10392% To set headers and footers on \enquote{paired} facing pages,
10390% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like 10393% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like
@@ -10424,7 +10427,7 @@ Sample text with a \textcolor{red}{word} in red.
10424% counter to set the value of the page numbers. This counter should be 10427% counter to set the value of the page numbers. This counter should be
10425% incremented every two pages. 10428% incremented every two pages.
10426% \begin{counter}{pairedpage} 10429% \begin{counter}{pairedpage}
10427% \changes{v1.5}{2023/03/30}{A counter incremented every two pages} 10430% \changes{v1.5}{2023/04/01}{A counter incremented every two pages}
10428% |pairedpage| is first set as a global counter:--- 10431% |pairedpage| is first set as a global counter:---
10429% \begin{macrocode} 10432% \begin{macrocode}
10430\newcounter{pairedpage} 10433\newcounter{pairedpage}
@@ -10432,19 +10435,19 @@ Sample text with a \textcolor{red}{word} in red.
10432% \end{macrocode} 10435% \end{macrocode}
10433% \end{counter} 10436% \end{counter}
10434% \begin{macro}{\setpairedpagenum} 10437% \begin{macro}{\setpairedpagenum}
10435% \changes{v1.5}{2023/03/30}{sets the same page number on paired 10438% \changes{v1.5}{2023/04/01}{sets the same page number on paired
10436% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of 10439% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of
10437% the alignment environment to set the number of the first left-hand 10440% the alignment environment to set the number of the first left-hand
10438% paired page. 10441% paired page.
10439% \begin{macro}{\setpairedpage} 10442% \begin{macro}{\setpairedpage}
10440% \changes{v1.5}{2023/03/30}{sets the page number of the first paired 10443% \changes{v1.5}{2023/04/01}{sets the page number of the first paired
10441% page} \cs{setpairedpage} is an argument-less command meant to be 10444% page} \cs{setpairedpage} is an argument-less command meant to be
10442% issued in commands used to set headers or footers before 10445% issued in commands used to set headers or footers before
10443% \cs{thepage}. This command has the counter |pairedpage| 10446% \cs{thepage}. This command has the counter |pairedpage|
10444% incremented on right-hand pages only, and sets |page| $\leftarrow$ 10447% incremented on right-hand pages only, and sets |page| $\leftarrow$
10445% |pairedpage| on every page. 10448% |pairedpage| on every page.
10446% \begin{macro}{\resetpagenumber} 10449% \begin{macro}{\resetpagenumber}
10447% \changes{v1.5}{2023/03/30}{resets normal running page numbers} 10450% \changes{v1.5}{2023/04/01}{resets normal running page numbers}
10448% \cs{resetpagenumber} must be used right out of \enquote{mirrored} 10451% \cs{resetpagenumber} must be used right out of \enquote{mirrored}
10449% paired pages alignment environments. This argument-less command 10452% paired pages alignment environments. This argument-less command
10450% corrects any numbering error on the page following the edition 10453% corrects any numbering error on the page following the edition
@@ -11160,7 +11163,9 @@ function ekdosis.getsiglum(str, opt)
11160 else 11163 else
11161 for i = 1,#idsRend do 11164 for i = 1,#idsRend do
11162 local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") 11165 local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1")
11163 str = string.gsub(str, tempc.."%,", idsRend[i].abbr) 11166 local tempd = string.gsub(idsRend[i].abbr, "%,", "ekd@comma")
11167 tempd = string.gsub(tempd, "%s+", "ekd@space")
11168 str = string.gsub(str, tempc.."%,", tempd)
11164 ctrl = string.gsub(ctrl, tempc.."%,", "") 11169 ctrl = string.gsub(ctrl, tempc.."%,", "")
11165 end 11170 end
11166 str = string.gsub(str, "^%,", "") 11171 str = string.gsub(str, "^%,", "")
@@ -11168,6 +11173,8 @@ function ekdosis.getsiglum(str, opt)
11168 then 11173 then
11169 str = string.gsub(str, "%s+", familysep) 11174 str = string.gsub(str, "%s+", familysep)
11170 end 11175 end
11176 str = string.gsub(str, "ekd@comma", ",")
11177 str = string.gsub(str, "ekd@space", " ")
11171 end 11178 end
11172 -- if string.find(ctrl, "[A-Za-z0-9]") 11179 -- if string.find(ctrl, "[A-Za-z0-9]")
11173 if string.find(ctrl, "%S") 11180 if string.find(ctrl, "%S")