aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2023-06-17 09:27:01 +0200
committerRobert Alessi <alessi@robertalessi.net>2023-06-17 09:32:39 +0200
commitdfccfa00e569921faa22ce88a996818e5debac79 (patch)
tree48eb877725717bedb44733ce88d754626b4188c8
parenta7deb7f848332c3a9b808d21c7e7d0e144633e94 (diff)
downloadekdosis-dfccfa00e569921faa22ce88a996818e5debac79.tar.gz
a glitch in ekd@align
-rw-r--r--ekdosis.dtx59
1 files changed, 34 insertions, 25 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index e85d6fb..203415b 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/05/21 v1.5-dev Typesetting TEI xml-compliant critical editions] 62 [2023/06/17 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}
@@ -3385,12 +3385,14 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3385% number.\footnote{For setting headers and footers in this arrangement 3385% number.\footnote{For setting headers and footers in this arrangement
3386% of text, but also for the current limitations attached to this 3386% of text, but also for the current limitations attached to this
3387% option, see \vpageref{sec:header-paired-pages}.}\\ 3387% option, see \vpageref{sec:header-paired-pages}.}\\
3388% \DescribeOption{lineation} |lineation|$=$\verb+page|document+ 3388% \DescribeOption{lineation} |lineation|$=$\verb+page|document|none+
3389% \hfill\tcboxverb{Default: document}\\ 3389% \hfill\tcboxverb{Default: document}\\
3390% This option applies to edition texts initially set to receive an 3390% This option applies to edition texts initially set to receive an
3391% apparatus criticus. By default, lines are continuously numbered 3391% apparatus criticus. By default, lines are continuously numbered
3392% throughout the document. |lineation=page| sets the numbering to 3392% throughout the document. |lineation=page| sets the numbering to
3393% start afresh at the top of each page.\\ 3393% start afresh at the top of each page. |none| does the same as |page|
3394% but prevents the numbers from being printed in
3395% the margins while keeping them in use in the apparatus criticus.\\
3394% \DescribeOption{flush} |flush|$=$\verb+true|false+ 3396% \DescribeOption{flush} |flush|$=$\verb+true|false+
3395% \hfill\tcboxverb{Default: false}\\ 3397% \hfill\tcboxverb{Default: false}\\
3396% This named argument does not need a value as it defaults to |true| 3398% This named argument does not need a value as it defaults to |true|
@@ -8223,7 +8225,7 @@ Sample text with a \textcolor{red}{word} in red.
8223% \end{macrocode} 8225% \end{macrocode}
8224% \paragraph{\textsf{ekdosis} Symbol} 8226% \paragraph{\textsf{ekdosis} Symbol}
8225% \begin{macro}{\eKd} 8227% \begin{macro}{\eKd}
8226% \changes{v1.5}{2023/05/21}{Prints \textsf{ekdosis} indentifying 8228% \changes{v1.5}{2023/06/17}{Prints \textsf{ekdosis} indentifying
8227% symbol} As of v1.5, \pkg{ekdosis} has its own identifying 8229% symbol} As of v1.5, \pkg{ekdosis} has its own identifying
8228% symbol. It is produced by \cs{eKd} and best printed with the Old 8230% symbol. It is produced by \cs{eKd} and best printed with the Old
8229% Standard Greek font. 8231% Standard Greek font.
@@ -8486,7 +8488,7 @@ Sample text with a \textcolor{red}{word} in red.
8486% \begin{macro}{\teidirectE} 8488% \begin{macro}{\teidirectE}
8487% \changes{v1.3}{2021/08/18}{direct insertion of elements in the 8489% \changes{v1.3}{2021/08/18}{direct insertion of elements in the
8488% \texttt{TEI xml} file} 8490% \texttt{TEI xml} file}
8489% \changes{v1.5}{2023/05/21}{direct insertion of empty elements in the 8491% \changes{v1.5}{2023/06/17}{direct insertion of empty elements in the
8490% \texttt{TEI xml} file} 8492% \texttt{TEI xml} file}
8491% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} 8493% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
8492% does nothing in \LaTeX. It is only used to insert elements in the 8494% does nothing in \LaTeX. It is only used to insert elements in the
@@ -8501,7 +8503,7 @@ Sample text with a \textcolor{red}{word} in red.
8501% \end{macro} 8503% \end{macro}
8502% \end{macro} 8504% \end{macro}
8503% \begin{macro}{\getTEIxmlid} 8505% \begin{macro}{\getTEIxmlid}
8504% \changes{v1.5}{2023/05/21}{returns \texttt{TEI xml:ids} from a 8506% \changes{v1.5}{2023/06/17}{returns \texttt{TEI xml:ids} from a
8505% csv-list of ids} This command returns from a csv-list of unique 8507% csv-list of ids} This command returns from a csv-list of unique
8506% identifiers declared in commands such as \cs{DeclareWitness} and the 8508% identifiers declared in commands such as \cs{DeclareWitness} and the
8507% like a space-separated list of their corresponding |xml:id|s, each 8509% like a space-separated list of their corresponding |xml:id|s, each
@@ -8977,7 +8979,7 @@ Sample text with a \textcolor{red}{word} in red.
8977\newlength{\ekd@app@localheight} 8979\newlength{\ekd@app@localheight}
8978% \end{macrocode} 8980% \end{macrocode}
8979% \begin{macro}{\localappheight} 8981% \begin{macro}{\localappheight}
8980% \changes{v1.5}{2023/05/21}{changes the height of the apparatus 8982% \changes{v1.5}{2023/06/17}{changes the height of the apparatus
8981% criticus} 8983% criticus}
8982% \cs{localappheight}\marg{dimen} can be used to change locally the 8984% \cs{localappheight}\marg{dimen} can be used to change locally the
8983% length of \cs{ekd@app@height} set by the |appheight| option of 8985% length of \cs{ekd@app@height} set by the |appheight| option of
@@ -8996,7 +8998,7 @@ Sample text with a \textcolor{red}{word} in red.
8996% \end{macrocode} 8998% \end{macrocode}
8997% \end{macro} 8999% \end{macro}
8998% \begin{macro}{\addtoappheight} 9000% \begin{macro}{\addtoappheight}
8999% \changes{v1.5}{2023/05/21}{increases or decreases the height of the 9001% \changes{v1.5}{2023/06/17}{increases or decreases the height of the
9000% apparatus criticus} 9002% apparatus criticus}
9001% As the name suggests, in contrast to \cs{localappheight}, 9003% As the name suggests, in contrast to \cs{localappheight},
9002% \cs{addtoappheight}\marg{dimen} is used to increase or decrease 9004% \cs{addtoappheight}\marg{dimen} is used to increase or decrease
@@ -9193,6 +9195,7 @@ Sample text with a \textcolor{red}{word} in red.
9193% numbering should start afresh at the top of each page. 9195% numbering should start afresh at the top of each page.
9194% \begin{macrocode} 9196% \begin{macrocode}
9195\newif\ifekd@pagelineation 9197\newif\ifekd@pagelineation
9198\newif\ifekd@hidelinenumbers
9196\newif\ifekd@pagevlineation 9199\newif\ifekd@pagevlineation
9197% \end{macrocode} 9200% \end{macrocode}
9198% Two counters (|ekd@lnperpage| and |ekd@locallnperpage|) are defined 9201% Two counters (|ekd@lnperpage| and |ekd@locallnperpage|) are defined
@@ -9211,7 +9214,7 @@ Sample text with a \textcolor{red}{word} in red.
9211 choice lineation = {page = \ekd@pagelineationtrue, 9214 choice lineation = {page = \ekd@pagelineationtrue,
9212 document = \ekd@pagelineationfalse, 9215 document = \ekd@pagelineationfalse,
9213 none = \ekd@pagelineationtrue 9216 none = \ekd@pagelineationtrue
9214 \renewcommand\thelinenumber{}}, 9217 \ekd@hidelinenumberstrue},
9215 unknown-choice lineation = \PackageError{ekdosis}{unknown 9218 unknown-choice lineation = \PackageError{ekdosis}{unknown
9216 lineation=#1}{`lineation' must be either `page' or `document'.}, 9219 lineation=#1}{`lineation' must be either `page' or `document'.},
9217 choice vlineation = {page = \ekd@pagevlineationtrue, 9220 choice vlineation = {page = \ekd@pagevlineationtrue,
@@ -9282,7 +9285,7 @@ Sample text with a \textcolor{red}{word} in red.
9282% The following commands are provided to set and control the maximum 9285% The following commands are provided to set and control the maximum
9283% number of lines printed on each page. 9286% number of lines printed on each page.
9284% \begin{macro}{\setmaxlines} 9287% \begin{macro}{\setmaxlines}
9285% \changes{v1.5}{2023/05/21}{limits the number of lines per page} 9288% \changes{v1.5}{2023/06/17}{limits the number of lines per page}
9286% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer 9289% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer
9287% $\geq 1$, can be used either in the preamble or at any point of the 9290% $\geq 1$, can be used either in the preamble or at any point of the
9288% document to set the maximum number of lines to be printed on each 9291% document to set the maximum number of lines to be printed on each
@@ -9293,7 +9296,7 @@ Sample text with a \textcolor{red}{word} in red.
9293% \end{macrocode} 9296% \end{macrocode}
9294% \end{macro} 9297% \end{macro}
9295% \begin{macro}{\localmaxlines} 9298% \begin{macro}{\localmaxlines}
9296% \changes{v1.5}{2023/05/21}{changes the maximum number of lines 9299% \changes{v1.5}{2023/06/17}{changes the maximum number of lines
9297% locally} 9300% locally}
9298% Once a maximum number of lines per page has been set, 9301% Once a maximum number of lines per page has been set,
9299% \cs{localmaxlines}\marg{n} can be used to adjust this number on a 9302% \cs{localmaxlines}\marg{n} can be used to adjust this number on a
@@ -9306,7 +9309,7 @@ Sample text with a \textcolor{red}{word} in red.
9306% \end{macrocode} 9309% \end{macrocode}
9307% \end{macro} 9310% \end{macro}
9308% \begin{macro}{\addtomaxlines} 9311% \begin{macro}{\addtomaxlines}
9309% \changes{v1.5}{2023/05/21}{adds or subtracts lines from a given page} 9312% \changes{v1.5}{2023/06/17}{adds or subtracts lines from a given page}
9310% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as 9313% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as
9311% argument the number of lines one wishes to add or substract from the 9314% argument the number of lines one wishes to add or substract from the
9312% number that has been set by \cs{setmaxlines}. As a result, \meta{n} 9315% number that has been set by \cs{setmaxlines}. As a result, \meta{n}
@@ -9319,7 +9322,7 @@ Sample text with a \textcolor{red}{word} in red.
9319% \end{macrocode} 9322% \end{macrocode}
9320% \end{macro} 9323% \end{macro}
9321% \begin{macro}{\nomaxlines} 9324% \begin{macro}{\nomaxlines}
9322% \changes{v1.5}{2023/05/21}{unsets \cs{setmaxlines}} 9325% \changes{v1.5}{2023/06/17}{unsets \cs{setmaxlines}}
9323% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. 9326% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
9324% \begin{macrocode} 9327% \begin{macrocode}
9325\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} 9328\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9383,7 +9386,7 @@ Sample text with a \textcolor{red}{word} in red.
9383% \end{macrocode} 9386% \end{macrocode}
9384% \end{macro} 9387% \end{macro}
9385% \begin{macro}{\App} 9388% \begin{macro}{\App}
9386% \changes{v1.5}{2023/05/21}{To be used conjointly with 9389% \changes{v1.5}{2023/06/17}{To be used conjointly with
9387% \texttt{ekdosis.el}} 9390% \texttt{ekdosis.el}}
9388% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and 9391% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and
9389% accepts one optional argument like so: 9392% accepts one optional argument like so:
@@ -10267,7 +10270,7 @@ Sample text with a \textcolor{red}{word} in red.
10267% \end{macro} 10270% \end{macro}
10268% \paragraph{Lacunae} 10271% \paragraph{Lacunae}
10269% \begin{macro}{\ilabel} 10272% \begin{macro}{\ilabel}
10270% \changes{v1.5}{2023/05/21}{recalls and sets the ending label of 10273% \changes{v1.5}{2023/06/17}{recalls and sets the ending label of
10271% lemmas used to mark lacunae in witnesses} When \cs{lem} has been 10274% lemmas used to mark lacunae in witnesses} When \cs{lem} has been
10272% used with the optional argument |ilabel=<label>|, 10275% used with the optional argument |ilabel=<label>|,
10273% \cs{ilabel}\marg{label} must be used to mark the point where the 10276% \cs{ilabel}\marg{label} must be used to mark the point where the
@@ -10354,9 +10357,12 @@ Sample text with a \textcolor{red}{word} in red.
10354 store apparatus = \apparatus@value, 10357 store apparatus = \apparatus@value,
10355 bool paired = \ifekd@paired, 10358 bool paired = \ifekd@paired,
10356 choice lineation = {page = \ekd@pagelineationtrue, 10359 choice lineation = {page = \ekd@pagelineationtrue,
10357 document = \ekd@pagelineationfalse}, 10360 document = \ekd@pagelineationfalse,
10361 none = \ekd@pagelineationtrue
10362 \ekd@hidelinenumberstrue},
10358 unknown-choice lineation = \PackageError{ekdosis}{unknown 10363 unknown-choice lineation = \PackageError{ekdosis}{unknown
10359 lineation=#1}{`lineation' must be either `page' or `document'.}, 10364 lineation=#1}{`lineation' must be either `page', `document' or
10365 `none'.},
10360 choice segmentation = {auto = \def\segmentation@val{auto}, 10366 choice segmentation = {auto = \def\segmentation@val{auto},
10361 noauto = \def\segmentation@val{noauto}}, 10367 noauto = \def\segmentation@val{noauto}},
10362 unknown-choice segmentation = \PackageError{ekdosis}{unknown 10368 unknown-choice segmentation = \PackageError{ekdosis}{unknown
@@ -10393,9 +10399,9 @@ Sample text with a \textcolor{red}{word} in red.
10393% by \pkg{ekdosis}. 10399% by \pkg{ekdosis}.
10394% \begin{macrocode} 10400% \begin{macrocode}
10395\NewDocumentCommand{\EkdosisColStart}{}{% 10401\NewDocumentCommand{\EkdosisColStart}{}{%
10396 \ekd@setlineno% 10402 \ekd@setlineno
10397 \runninglinenumbers 10403 \runninglinenumbers
10398 \ekd@storecol% 10404 \ekd@storecol
10399 \stepcounter{ekd@lab}% 10405 \stepcounter{ekd@lab}%
10400 \zlabel{ekd:\theekd@lab}% 10406 \zlabel{ekd:\theekd@lab}%
10401 \luadirect{% 10407 \luadirect{%
@@ -10404,6 +10410,9 @@ Sample text with a \textcolor{red}{word} in red.
10404 \ifekd@pagelineation 10410 \ifekd@pagelineation
10405 \luadirect{tex.sprint(ekdosis.checkresetlineno())} 10411 \luadirect{tex.sprint(ekdosis.checkresetlineno())}
10406 \fi 10412 \fi
10413 \ifekd@hidelinenumbers
10414 \def\thelinenumber{}%
10415 \fi
10407} 10416}
10408\NewDocumentCommand{\EkdosisColStop}{}{% 10417\NewDocumentCommand{\EkdosisColStop}{}{%
10409 \stepcounter{ekd@lab}% 10418 \stepcounter{ekd@lab}%
@@ -10411,7 +10420,7 @@ Sample text with a \textcolor{red}{word} in red.
10411 \luadirect{% 10420 \luadirect{%
10412 ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, 10421 ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}},
10413 "pg_ii")}% 10422 "pg_ii")}%
10414 \endrunninglinenumbers% 10423 \endrunninglinenumbers
10415} 10424}
10416% \end{macrocode} 10425% \end{macrocode}
10417% \begin{environment}{alignment} 10426% \begin{environment}{alignment}
@@ -10583,7 +10592,7 @@ Sample text with a \textcolor{red}{word} in red.
10583% \end{macrocode} 10592% \end{macrocode}
10584% \end{macro} 10593% \end{macro}
10585% \begin{macro}{\ekdEOprint} 10594% \begin{macro}{\ekdEOprint}
10586% \changes{v1.5}{2023/05/21}{Sets headers and footers on 10595% \changes{v1.5}{2023/06/17}{Sets headers and footers on
10587% \enquote{paired} facing pages} 10596% \enquote{paired} facing pages}
10588% To set headers and footers on \enquote{paired} facing pages, 10597% To set headers and footers on \enquote{paired} facing pages,
10589% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like 10598% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like
@@ -10623,7 +10632,7 @@ Sample text with a \textcolor{red}{word} in red.
10623% counter to set the value of the page numbers. This counter should be 10632% counter to set the value of the page numbers. This counter should be
10624% incremented every two pages. 10633% incremented every two pages.
10625% \begin{counter}{pairedpage} 10634% \begin{counter}{pairedpage}
10626% \changes{v1.5}{2023/05/21}{A counter incremented every two pages} 10635% \changes{v1.5}{2023/06/17}{A counter incremented every two pages}
10627% |pairedpage| is first set as a global counter:--- 10636% |pairedpage| is first set as a global counter:---
10628% \begin{macrocode} 10637% \begin{macrocode}
10629\newcounter{pairedpage} 10638\newcounter{pairedpage}
@@ -10631,19 +10640,19 @@ Sample text with a \textcolor{red}{word} in red.
10631% \end{macrocode} 10640% \end{macrocode}
10632% \end{counter} 10641% \end{counter}
10633% \begin{macro}{\setpairedpagenum} 10642% \begin{macro}{\setpairedpagenum}
10634% \changes{v1.5}{2023/05/21}{sets the same page number on paired 10643% \changes{v1.5}{2023/06/17}{sets the same page number on paired
10635% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of 10644% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of
10636% the alignment environment to set the number of the first left-hand 10645% the alignment environment to set the number of the first left-hand
10637% paired page. 10646% paired page.
10638% \begin{macro}{\setpairedpage} 10647% \begin{macro}{\setpairedpage}
10639% \changes{v1.5}{2023/05/21}{sets the page number of the first paired 10648% \changes{v1.5}{2023/06/17}{sets the page number of the first paired
10640% page} \cs{setpairedpage} is an argument-less command meant to be 10649% page} \cs{setpairedpage} is an argument-less command meant to be
10641% issued in commands used to set headers or footers before 10650% issued in commands used to set headers or footers before
10642% \cs{thepage}. This command has the counter |pairedpage| 10651% \cs{thepage}. This command has the counter |pairedpage|
10643% incremented on right-hand pages only, and sets |page| $\leftarrow$ 10652% incremented on right-hand pages only, and sets |page| $\leftarrow$
10644% |pairedpage| on every page. 10653% |pairedpage| on every page.
10645% \begin{macro}{\resetpagenumber} 10654% \begin{macro}{\resetpagenumber}
10646% \changes{v1.5}{2023/05/21}{resets normal running page numbers} 10655% \changes{v1.5}{2023/06/17}{resets normal running page numbers}
10647% \cs{resetpagenumber} must be used right out of \enquote{mirrored} 10656% \cs{resetpagenumber} must be used right out of \enquote{mirrored}
10648% paired pages alignment environments. This argument-less command 10657% paired pages alignment environments. This argument-less command
10649% corrects any numbering error on the page following the edition 10658% corrects any numbering error on the page following the edition