aboutsummaryrefslogtreecommitdiff
path: root/ekdosis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r--ekdosis.dtx63
1 files changed, 35 insertions, 28 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 0f6917b..32f77bb 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -1,7 +1,7 @@
1% \iffalse meta-comment 1% \iffalse meta-comment
2% 2%
3% ekdosis -- Typesetting TEI xml-compliant critical editions 3% ekdosis -- Typesetting TEI xml-compliant critical editions
4% Copyright (c) 2020, 2021, 2022, 2023, 2024 Robert Alessi 4% Copyright (c) 2020, 2021, 2022, 2023, 2024, 2025 Robert Alessi
5% <alessi@robertalessi.net> 5% <alessi@robertalessi.net>
6% 6%
7% Permission to use, copy, modify, and distribute this software for any 7% Permission to use, copy, modify, and distribute this software for any
@@ -27,7 +27,7 @@
27This file is part of the `ekdosis' package 27This file is part of the `ekdosis' package
28 28
29ekdosis -- Typesetting TEI xml-compliant critical editions 29ekdosis -- Typesetting TEI xml-compliant critical editions
30Copyright (c) 2020, 2021, 2022, 2023, 2024 Robert Alessi 30Copyright (c) 2020, 2021, 2022, 2023, 2024, 2025 Robert Alessi
31<alessi@robertalessi.net> 31<alessi@robertalessi.net>
32 32
33Permission to use, copy, modify, and distribute this software for any 33Permission to use, copy, modify, and distribute this software for any
@@ -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 [2024/05/25 v1.5-dev Typesetting TEI xml-compliant critical editions] 62 [2025/03/09 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}
@@ -860,7 +860,7 @@ Alessi <alessi@robertalessi.net>
860 Para ver una copia de esta licencia, siga el vĂ­nculo: 860 Para ver una copia de esta licencia, siga el vĂ­nculo:
861 \metapick[#1]{licenseurl}.} 861 \metapick[#1]{licenseurl}.}
862\metaset{copyrightowner}{\metapick[#1]{author}} 862\metaset{copyrightowner}{\metapick[#1]{author}}
863\metaset{copyrightdate}{2020, 2021, 2022, 2023, 2024} 863\metaset{copyrightdate}{2020, 2021, 2022, 2023, 2024, 2025}
864\metaset{licensemessage}{Permission to use, copy, modify, and 864\metaset{licensemessage}{Permission to use, copy, modify, and
865 distribute this software for any purpose with or without fee is 865 distribute this software for any purpose with or without fee is
866 hereby granted, provided that the above copyright notice and this 866 hereby granted, provided that the above copyright notice and this
@@ -1063,7 +1063,7 @@ Alessi <alessi@robertalessi.net>
1063ekdosis -- Typesetting TEI xml-Compliant Critical Editions 1063ekdosis -- Typesetting TEI xml-Compliant Critical Editions
1064---------------------------------------------------------- 1064----------------------------------------------------------
1065 1065
1066Copyright (c) 2020, 2021, 2022, 2023, 2024 Robert Alessi 1066Copyright (c) 2020, 2021, 2022, 2023, 2024, 2025 Robert Alessi
1067<alessi@robertalessi.net> 1067<alessi@robertalessi.net>
1068 1068
1069Permission to use, copy, modify, and distribute this software for any 1069Permission to use, copy, modify, and distribute this software for any
@@ -8519,7 +8519,7 @@ Sample text with a \textcolor{red}{word} in red.
8519% \end{macrocode} 8519% \end{macrocode}
8520% \paragraph{\textsf{ekdosis} Symbol} 8520% \paragraph{\textsf{ekdosis} Symbol}
8521% \begin{macro}{\eKd} 8521% \begin{macro}{\eKd}
8522% \changes{v1.5}{2024/05/25}{Prints \textsf{ekdosis} indentifying 8522% \changes{v1.5}{2025/03/09}{Prints \textsf{ekdosis} indentifying
8523% symbol} As of v1.5, \pkg{ekdosis} has its own identifying 8523% symbol} As of v1.5, \pkg{ekdosis} has its own identifying
8524% symbol. It is produced by \cs{eKd} and best printed with the Old 8524% symbol. It is produced by \cs{eKd} and best printed with the Old
8525% Standard Greek font. 8525% Standard Greek font.
@@ -8782,7 +8782,7 @@ Sample text with a \textcolor{red}{word} in red.
8782% \begin{macro}{\teidirectE} 8782% \begin{macro}{\teidirectE}
8783% \changes{v1.3}{2021/08/18}{direct insertion of elements in the 8783% \changes{v1.3}{2021/08/18}{direct insertion of elements in the
8784% \texttt{TEI xml} file} 8784% \texttt{TEI xml} file}
8785% \changes{v1.5}{2024/05/25}{direct insertion of empty elements in the 8785% \changes{v1.5}{2025/03/09}{direct insertion of empty elements in the
8786% \texttt{TEI xml} file} 8786% \texttt{TEI xml} file}
8787% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} 8787% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
8788% does nothing in \LaTeX. It is only used to insert elements in the 8788% does nothing in \LaTeX. It is only used to insert elements in the
@@ -8797,7 +8797,7 @@ Sample text with a \textcolor{red}{word} in red.
8797% \end{macro} 8797% \end{macro}
8798% \end{macro} 8798% \end{macro}
8799% \begin{macro}{\getTEIxmlid} 8799% \begin{macro}{\getTEIxmlid}
8800% \changes{v1.5}{2024/05/25}{returns \texttt{TEI xml:ids} from a 8800% \changes{v1.5}{2025/03/09}{returns \texttt{TEI xml:ids} from a
8801% csv-list of ids} This command returns from a csv-list of unique 8801% csv-list of ids} This command returns from a csv-list of unique
8802% identifiers declared in commands such as \cs{DeclareWitness} and the 8802% identifiers declared in commands such as \cs{DeclareWitness} and the
8803% like a space-separated list of their corresponding |xml:id|s, each 8803% like a space-separated list of their corresponding |xml:id|s, each
@@ -9273,7 +9273,7 @@ Sample text with a \textcolor{red}{word} in red.
9273\newlength{\ekd@app@localheight} 9273\newlength{\ekd@app@localheight}
9274% \end{macrocode} 9274% \end{macrocode}
9275% \begin{macro}{\localappheight} 9275% \begin{macro}{\localappheight}
9276% \changes{v1.5}{2024/05/25}{changes the height of the apparatus 9276% \changes{v1.5}{2025/03/09}{changes the height of the apparatus
9277% criticus} 9277% criticus}
9278% \cs{localappheight}\marg{dimen} can be used to change locally the 9278% \cs{localappheight}\marg{dimen} can be used to change locally the
9279% length of \cs{ekd@app@height} set by the |appheight| option of 9279% length of \cs{ekd@app@height} set by the |appheight| option of
@@ -9292,7 +9292,7 @@ Sample text with a \textcolor{red}{word} in red.
9292% \end{macrocode} 9292% \end{macrocode}
9293% \end{macro} 9293% \end{macro}
9294% \begin{macro}{\addtoappheight} 9294% \begin{macro}{\addtoappheight}
9295% \changes{v1.5}{2024/05/25}{increases or decreases the height of the 9295% \changes{v1.5}{2025/03/09}{increases or decreases the height of the
9296% apparatus criticus} 9296% apparatus criticus}
9297% As the name suggests, in contrast to \cs{localappheight}, 9297% As the name suggests, in contrast to \cs{localappheight},
9298% \cs{addtoappheight}\marg{dimen} is used to increase or decrease 9298% \cs{addtoappheight}\marg{dimen} is used to increase or decrease
@@ -9505,8 +9505,10 @@ Sample text with a \textcolor{red}{word} in red.
9505\AddToHook{shipout/before}{\ekdatbegshihook} 9505\AddToHook{shipout/before}{\ekdatbegshihook}
9506\newif\ifekd@elidednumbers 9506\newif\ifekd@elidednumbers
9507\ekvdefinekeys{ekd@lineation}{ 9507\ekvdefinekeys{ekd@lineation}{
9508 choice lineation = {page = \ekd@pagelineationtrue, 9508 choice lineation = {page = \ekd@pagelineationtrue
9509 document = \ekd@pagelineationfalse, 9509 \ekd@hidelinenumbersfalse,
9510 document = \ekd@pagelineationfalse
9511 \ekd@hidelinenumbersfalse,
9510 none = \ekd@pagelineationtrue 9512 none = \ekd@pagelineationtrue
9511 \ekd@hidelinenumberstrue}, 9513 \ekd@hidelinenumberstrue},
9512 unknown-choice lineation = \PackageError{ekdosis}{unknown 9514 unknown-choice lineation = \PackageError{ekdosis}{unknown
@@ -9579,7 +9581,7 @@ Sample text with a \textcolor{red}{word} in red.
9579% The following commands are provided to set and control the maximum 9581% The following commands are provided to set and control the maximum
9580% number of lines printed on each page. 9582% number of lines printed on each page.
9581% \begin{macro}{\setmaxlines} 9583% \begin{macro}{\setmaxlines}
9582% \changes{v1.5}{2024/05/25}{limits the number of lines per page} 9584% \changes{v1.5}{2025/03/09}{limits the number of lines per page}
9583% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer 9585% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer
9584% $\geq 1$, can be used either in the preamble or at any point of the 9586% $\geq 1$, can be used either in the preamble or at any point of the
9585% document to set the maximum number of lines to be printed on each 9587% document to set the maximum number of lines to be printed on each
@@ -9590,7 +9592,7 @@ Sample text with a \textcolor{red}{word} in red.
9590% \end{macrocode} 9592% \end{macrocode}
9591% \end{macro} 9593% \end{macro}
9592% \begin{macro}{\localmaxlines} 9594% \begin{macro}{\localmaxlines}
9593% \changes{v1.5}{2024/05/25}{changes the maximum number of lines 9595% \changes{v1.5}{2025/03/09}{changes the maximum number of lines
9594% locally} 9596% locally}
9595% Once a maximum number of lines per page has been set, 9597% Once a maximum number of lines per page has been set,
9596% \cs{localmaxlines}\marg{n} can be used to adjust this number on a 9598% \cs{localmaxlines}\marg{n} can be used to adjust this number on a
@@ -9603,7 +9605,7 @@ Sample text with a \textcolor{red}{word} in red.
9603% \end{macrocode} 9605% \end{macrocode}
9604% \end{macro} 9606% \end{macro}
9605% \begin{macro}{\addtomaxlines} 9607% \begin{macro}{\addtomaxlines}
9606% \changes{v1.5}{2024/05/25}{adds or subtracts lines from a given page} 9608% \changes{v1.5}{2025/03/09}{adds or subtracts lines from a given page}
9607% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as 9609% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as
9608% argument the number of lines one wishes to add or substract from the 9610% argument the number of lines one wishes to add or substract from the
9609% number that has been set by \cs{setmaxlines}. As a result, \meta{n} 9611% number that has been set by \cs{setmaxlines}. As a result, \meta{n}
@@ -9616,7 +9618,7 @@ Sample text with a \textcolor{red}{word} in red.
9616% \end{macrocode} 9618% \end{macrocode}
9617% \end{macro} 9619% \end{macro}
9618% \begin{macro}{\nomaxlines} 9620% \begin{macro}{\nomaxlines}
9619% \changes{v1.5}{2024/05/25}{unsets \cs{setmaxlines}} 9621% \changes{v1.5}{2025/03/09}{unsets \cs{setmaxlines}}
9620% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. 9622% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
9621% \begin{macrocode} 9623% \begin{macrocode}
9622\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} 9624\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9680,7 +9682,7 @@ Sample text with a \textcolor{red}{word} in red.
9680% \end{macrocode} 9682% \end{macrocode}
9681% \end{macro} 9683% \end{macro}
9682% \begin{macro}{\App} 9684% \begin{macro}{\App}
9683% \changes{v1.5}{2024/05/25}{To be used conjointly with 9685% \changes{v1.5}{2025/03/09}{To be used conjointly with
9684% \texttt{ekdosis.el}} 9686% \texttt{ekdosis.el}}
9685% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and 9687% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and
9686% accepts one optional argument like so: 9688% accepts one optional argument like so:
@@ -10665,7 +10667,7 @@ Sample text with a \textcolor{red}{word} in red.
10665} 10667}
10666% \end{macrocode} 10668% \end{macrocode}
10667% \begin{macro}{\SetFootnotes} 10669% \begin{macro}{\SetFootnotes}
10668% \changes{v1.5}{2024/05/25}{footnotes combined into a single 10670% \changes{v1.5}{2025/03/09}{footnotes combined into a single
10669% paragraph} \cs{SetFootnotes}\marg{options} can be used in the 10671% paragraph} \cs{SetFootnotes}\marg{options} can be used in the
10670% preamble or at any point of the document. |layout=paragraph| 10672% preamble or at any point of the document. |layout=paragraph|
10671% instructs \pkg{ekdosis} to combine all footnotes into a single 10673% instructs \pkg{ekdosis} to combine all footnotes into a single
@@ -10896,7 +10898,7 @@ Sample text with a \textcolor{red}{word} in red.
10896% \end{macro} 10898% \end{macro}
10897% \paragraph{Lacunae} 10899% \paragraph{Lacunae}
10898% \begin{macro}{\ilabel} 10900% \begin{macro}{\ilabel}
10899% \changes{v1.5}{2024/05/25}{recalls and sets the ending label of 10901% \changes{v1.5}{2025/03/09}{recalls and sets the ending label of
10900% lemmas used to mark lacunae in witnesses} When \cs{lem} has been 10902% lemmas used to mark lacunae in witnesses} When \cs{lem} has been
10901% used with the optional argument |ilabel=<label>|, 10903% used with the optional argument |ilabel=<label>|,
10902% \cs{ilabel}\marg{label} must be used to mark the point where the 10904% \cs{ilabel}\marg{label} must be used to mark the point where the
@@ -10968,11 +10970,14 @@ Sample text with a \textcolor{red}{word} in red.
10968% \texttt{TEI xml} output file be desired. 10970% \texttt{TEI xml} output file be desired.
10969% \begin{macrocode} 10971% \begin{macrocode}
10970\NewDocumentEnvironment{ekdosis}{+b}{% 10972\NewDocumentEnvironment{ekdosis}{+b}{%
10971 \ekd@setlineno% 10973 \ekd@setlineno
10974 \ifekd@hidelinenumbers
10975 \def\thelinenumber{}%
10976 \fi
10972 \runninglinenumbers 10977 \runninglinenumbers
10973 \EkdosisOn#1}{% 10978 \EkdosisOn#1}{%
10974 \EkdosisOff 10979 \EkdosisOff
10975 \endrunninglinenumbers% 10980 \endrunninglinenumbers
10976 \iftei@export 10981 \iftei@export
10977 \luadirect{ekdosis.exporttei(\luastringN{\par #1\par })}\fi} 10982 \luadirect{ekdosis.exporttei(\luastringN{\par #1\par })}\fi}
10978% \end{macrocode} 10983% \end{macrocode}
@@ -10988,8 +10993,10 @@ Sample text with a \textcolor{red}{word} in red.
10988 store texts = \texts@value, 10993 store texts = \texts@value,
10989 store apparatus = \apparatus@value, 10994 store apparatus = \apparatus@value,
10990 bool paired = \ifekd@paired, 10995 bool paired = \ifekd@paired,
10991 choice lineation = {page = \ekd@pagelineationtrue, 10996 choice lineation = {page = \ekd@pagelineationtrue
10992 document = \ekd@pagelineationfalse, 10997 \ekd@hidelinenumbersfalse,
10998 document = \ekd@pagelineationfalse
10999 \ekd@hidelinenumbersfalse,
10993 none = \ekd@pagelineationtrue 11000 none = \ekd@pagelineationtrue
10994 \ekd@hidelinenumberstrue}, 11001 \ekd@hidelinenumberstrue},
10995 unknown-choice lineation = \PackageError{ekdosis}{unknown 11002 unknown-choice lineation = \PackageError{ekdosis}{unknown
@@ -11231,7 +11238,7 @@ Sample text with a \textcolor{red}{word} in red.
11231% \end{macrocode} 11238% \end{macrocode}
11232% \end{macro} 11239% \end{macro}
11233% \begin{macro}{\ekdEOprint} 11240% \begin{macro}{\ekdEOprint}
11234% \changes{v1.5}{2024/05/25}{Sets headers and footers on 11241% \changes{v1.5}{2025/03/09}{Sets headers and footers on
11235% \enquote{paired} facing pages} 11242% \enquote{paired} facing pages}
11236% To set headers and footers on \enquote{paired} facing pages, 11243% To set headers and footers on \enquote{paired} facing pages,
11237% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like 11244% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like
@@ -11271,7 +11278,7 @@ Sample text with a \textcolor{red}{word} in red.
11271% counter to set the value of the page numbers. This counter should be 11278% counter to set the value of the page numbers. This counter should be
11272% incremented every two pages. 11279% incremented every two pages.
11273% \begin{counter}{pairedpage} 11280% \begin{counter}{pairedpage}
11274% \changes{v1.5}{2024/05/25}{A counter incremented every two pages} 11281% \changes{v1.5}{2025/03/09}{A counter incremented every two pages}
11275% |pairedpage| is first set as a global counter:--- 11282% |pairedpage| is first set as a global counter:---
11276% \begin{macrocode} 11283% \begin{macrocode}
11277\newcounter{pairedpage} 11284\newcounter{pairedpage}
@@ -11279,19 +11286,19 @@ Sample text with a \textcolor{red}{word} in red.
11279% \end{macrocode} 11286% \end{macrocode}
11280% \end{counter} 11287% \end{counter}
11281% \begin{macro}{\setpairedpagenum} 11288% \begin{macro}{\setpairedpagenum}
11282% \changes{v1.5}{2024/05/25}{sets the same page number on paired 11289% \changes{v1.5}{2025/03/09}{sets the same page number on paired
11283% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of 11290% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of
11284% the alignment environment to set the number of the first left-hand 11291% the alignment environment to set the number of the first left-hand
11285% paired page. 11292% paired page.
11286% \begin{macro}{\setpairedpage} 11293% \begin{macro}{\setpairedpage}
11287% \changes{v1.5}{2024/05/25}{sets the page number of the first paired 11294% \changes{v1.5}{2025/03/09}{sets the page number of the first paired
11288% page} \cs{setpairedpage} is an argument-less command meant to be 11295% page} \cs{setpairedpage} is an argument-less command meant to be
11289% issued in commands used to set headers or footers before 11296% issued in commands used to set headers or footers before
11290% \cs{thepage}. This command has the counter |pairedpage| 11297% \cs{thepage}. This command has the counter |pairedpage|
11291% incremented on right-hand pages only, and sets |page| $\leftarrow$ 11298% incremented on right-hand pages only, and sets |page| $\leftarrow$
11292% |pairedpage| on every page. 11299% |pairedpage| on every page.
11293% \begin{macro}{\resetpagenumber} 11300% \begin{macro}{\resetpagenumber}
11294% \changes{v1.5}{2024/05/25}{resets normal running page numbers} 11301% \changes{v1.5}{2025/03/09}{resets normal running page numbers}
11295% \cs{resetpagenumber} must be used right out of \enquote{mirrored} 11302% \cs{resetpagenumber} must be used right out of \enquote{mirrored}
11296% paired pages alignment environments. This argument-less command 11303% paired pages alignment environments. This argument-less command
11297% corrects any numbering error on the page following the edition 11304% corrects any numbering error on the page following the edition