diff options
-rw-r--r-- | ekdosis.dtx | 232 |
1 files changed, 213 insertions, 19 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 56bd0d5..f6571f6 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/09/01 v1.5-dev Typesetting TEI xml-compliant critical editions] | 64 | [2022/10/25 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} |
@@ -5110,9 +5110,15 @@ substantiall fewell,} | |||
5110 | % \cs{SetLineation}|{numb|\allowbreak|ers=outer}| and | 5110 | % \cs{SetLineation}|{numb|\allowbreak|ers=outer}| and |
5111 | % \cs{SetLineation}|{numbers=inner}| respectively. Both commands are | 5111 | % \cs{SetLineation}|{numbers=inner}| respectively. Both commands are |
5112 | % complementary to \cs{rightlinenumbers} and \cs{leftlinenumbers} | 5112 | % complementary to \cs{rightlinenumbers} and \cs{leftlinenumbers} |
5113 | % already provided by the \pkg{lineno} package.\\ | 5113 | % already provided by the \pkg{lineno} package. |
5114 | % \textbf{Options Specific to the |poetry=verse| Global | 5114 | % |
5115 | % Setting}\footnote{See above | 5115 | % \medskip\noindent\textbf{Limiting the Number of Lines per Page} |
5116 | % \phts\label{ref:gmaxlines}\\ | ||
5117 | % \DescribeOption{maxlines} \newfeature[v1.5] |maxlines|=\meta{n} | ||
5118 | % \hfill\tcboxverb{Default: not set}\\ | ||
5119 | % | ||
5120 | % \medskip\noindent\textbf{Options Specific to the |poetry=verse| | ||
5121 | % Global Setting}\footnote{See above | ||
5116 | % \vref{sec:verse-package}.}\phts\label{ref:verse-lineation}\\ | 5122 | % \vref{sec:verse-package}.}\phts\label{ref:verse-lineation}\\ |
5117 | % \DescribeOption{vlineation} |vlineation|$=$\verb+page|document+ | 5123 | % \DescribeOption{vlineation} |vlineation|$=$\verb+page|document+ |
5118 | % \hfill\tcboxverb{Default: document}\\ | 5124 | % \hfill\tcboxverb{Default: document}\\ |
@@ -8403,7 +8409,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8403 | % \end{macrocode} | 8409 | % \end{macrocode} |
8404 | % \paragraph{\textsf{ekdosis} Symbol} | 8410 | % \paragraph{\textsf{ekdosis} Symbol} |
8405 | % \begin{macro}{\eKd} | 8411 | % \begin{macro}{\eKd} |
8406 | % \changes{v1.5}{2022/09/01}{Prints \textsf{ekdosis} indentifying | 8412 | % \changes{v1.5}{2022/10/25}{Prints \textsf{ekdosis} indentifying |
8407 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying | 8413 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying |
8408 | % symbol. It is produced by \cs{eKd} and best printed with the Old | 8414 | % symbol. It is produced by \cs{eKd} and best printed with the Old |
8409 | % Standard Greek font. | 8415 | % Standard Greek font. |
@@ -8425,7 +8431,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8425 | store spbmk = \ekd@spbmk, | 8431 | store spbmk = \ekd@spbmk, |
8426 | initial spbmk = spb, | 8432 | initial spbmk = spb, |
8427 | store hpbmk = \ekd@hpbmk, | 8433 | store hpbmk = \ekd@hpbmk, |
8428 | initial hpbmk = hpb, | 8434 | initial hpbmk = hpb |
8429 | } | 8435 | } |
8430 | \NewDocumentCommand{\ekdsetup}{m}{\ekvset{ekd@setup}{#1}} | 8436 | \NewDocumentCommand{\ekdsetup}{m}{\ekvset{ekd@setup}{#1}} |
8431 | \@onlypreamble\ekdsetup | 8437 | \@onlypreamble\ekdsetup |
@@ -8666,7 +8672,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8666 | % \begin{macro}{\teidirectE} | 8672 | % \begin{macro}{\teidirectE} |
8667 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the | 8673 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the |
8668 | % \texttt{TEI xml} file} | 8674 | % \texttt{TEI xml} file} |
8669 | % \changes{v1.5}{2022/09/01}{direct insertion of empty elements in the | 8675 | % \changes{v1.5}{2022/10/25}{direct insertion of empty elements in the |
8670 | % \texttt{TEI xml} file} | 8676 | % \texttt{TEI xml} file} |
8671 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} | 8677 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} |
8672 | % does nothing in \LaTeX. It is only used to insert elements in the | 8678 | % does nothing in \LaTeX. It is only used to insert elements in the |
@@ -8681,7 +8687,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8681 | % \end{macro} | 8687 | % \end{macro} |
8682 | % \end{macro} | 8688 | % \end{macro} |
8683 | % \begin{macro}{\getTEIxmlid} | 8689 | % \begin{macro}{\getTEIxmlid} |
8684 | % \changes{v1.5}{2022/09/01}{returns \texttt{TEI xml:ids} from a | 8690 | % \changes{v1.5}{2022/10/25}{returns \texttt{TEI xml:ids} from a |
8685 | % csv-list of ids} This command returns from a csv-list of unique | 8691 | % csv-list of ids} This command returns from a csv-list of unique |
8686 | % identifiers declared in commands such as \cs{DeclareWitness} and the | 8692 | % identifiers declared in commands such as \cs{DeclareWitness} and the |
8687 | % like a space-separated list of their corresponding |xml:id|s, each | 8693 | % like a space-separated list of their corresponding |xml:id|s, each |
@@ -8853,7 +8859,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8853 | % \end{macro} | 8859 | % \end{macro} |
8854 | % \begin{macro}{\ekdpb} | 8860 | % \begin{macro}{\ekdpb} |
8855 | % \changes{v1.2}{2021/04/02}{conditional page breaks} | 8861 | % \changes{v1.2}{2021/04/02}{conditional page breaks} |
8856 | % \cs{ekdpk}\oarg{page no}\marg{line no} is used to insert conditional | 8862 | % \cs{ekdpb}\oarg{page no}\marg{line no} is used to insert conditional |
8857 | % page breaks by specifying that the page break should occur only on a | 8863 | % page breaks by specifying that the page break should occur only on a |
8858 | % given line and optionally a given page. If the specified conditions | 8864 | % given line and optionally a given page. If the specified conditions |
8859 | % be met then this command triggers \cs{pagebreak}. | 8865 | % be met then this command triggers \cs{pagebreak}. |
@@ -9151,6 +9157,49 @@ Sample text with a \textcolor{red}{word} in red. | |||
9151 | \newif\ifekd@inside@app | 9157 | \newif\ifekd@inside@app |
9152 | \newif\ifekd@keepinapp | 9158 | \newif\ifekd@keepinapp |
9153 | % \end{macrocode} | 9159 | % \end{macrocode} |
9160 | % \cs{ekd@app@localheight} is used to set the maximum height of the | ||
9161 | % apparatus block locally:--- | ||
9162 | % \begin{macrocode} | ||
9163 | \newlength{\ekd@app@localheight} | ||
9164 | % \end{macrocode} | ||
9165 | % \begin{macro}{\localappheight} | ||
9166 | % \changes{v1.5}{2022/10/25}{changes the height of the apparatus | ||
9167 | % criticus} | ||
9168 | % \cs{localappheight}\marg{dimen} can be used to change locally the | ||
9169 | % length of \cs{\ekd@app@height} set by the |appheight| option of | ||
9170 | % \cs{SetHooks}, namely the height up to which the apparatus block is | ||
9171 | % allowed to grow. \meta{dimen} must be a number followed by a unit | ||
9172 | % length. This command operates only on the apparatus block that | ||
9173 | % follows it. | ||
9174 | % \begin{macrocode} | ||
9175 | \def\localappheight#1{% | ||
9176 | \if@pkg@fitapp | ||
9177 | \luadirect{ekdosis.changeappheight()}% | ||
9178 | \setlength{\ekd@app@localheight}{#1}% | ||
9179 | \fi | ||
9180 | \ignorespaces | ||
9181 | } | ||
9182 | % \end{macrocode} | ||
9183 | % \end{macro} | ||
9184 | % \begin{macro}{\addtoappheight} | ||
9185 | % \changes{v1.5}{2022/10/25}{increases or decreases the height of the | ||
9186 | % apparatus criticus} | ||
9187 | % As the name suggests, in contrast to \cs{localappheight}, | ||
9188 | % \cs{addtoappheight}\marg{dimen} is used to increase or decrease | ||
9189 | % locally the length of \cs{\ekd@app@height}. \meta{dimen} must be a | ||
9190 | % number followed by a unit length. This command operates only on the | ||
9191 | % apparatus block that follows it. | ||
9192 | % \begin{macrocode} | ||
9193 | \def\addtoappheight#1{% | ||
9194 | \if@pkg@fitapp | ||
9195 | \luadirect{ekdosis.changeappheight()}% | ||
9196 | \setlength{\ekd@app@localheight}{\ekd@app@height}% | ||
9197 | \addtolength{\ekd@app@localheight}{#1}% | ||
9198 | \fi | ||
9199 | \ignorespaces | ||
9200 | } | ||
9201 | % \end{macrocode} | ||
9202 | % \end{macro} | ||
9154 | % Then \cs{ekd@fitapp} is defined for |layout=fitapp|:--- | 9203 | % Then \cs{ekd@fitapp} is defined for |layout=fitapp|:--- |
9155 | % \begin{macrocode} | 9204 | % \begin{macrocode} |
9156 | \if@pkg@fitapp | 9205 | \if@pkg@fitapp |
@@ -9195,7 +9244,21 @@ Sample text with a \textcolor{red}{word} in red. | |||
9195 | \apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi | 9244 | \apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi |
9196 | \ekd@inside@appfalse | 9245 | \ekd@inside@appfalse |
9197 | \if@pkg@parnotes\parnotes\parnotereset\fi | 9246 | \if@pkg@parnotes\parnotes\parnotereset\fi |
9198 | }% | 9247 | } |
9248 | % \end{macrocode} | ||
9249 | % Depending on what is instructed, either of the following two | ||
9250 | % commands is inserted by the Lua function | ||
9251 | % |ekdosis.setheightandprintapparatus()| that is used in | ||
9252 | % \cs{add@apparatus} below:--- | ||
9253 | % \begin{macrocode} | ||
9254 | \def\ekd@insert@fitapparatus@tmpheight{% | ||
9255 | \let\ekd@app@savedheight\ekd@app@height | ||
9256 | \let\ekd@app@height\ekd@app@localheight | ||
9257 | \ekd@fitapp{\ekd@insert@apparatus}% | ||
9258 | \let\ekd@app@height\ekd@app@savedheight} | ||
9259 | \def\ekd@insert@fitapparatus{% | ||
9260 | \ekd@fitapp{\ekd@insert@apparatus}% | ||
9261 | } | ||
9199 | \def\add@@apparatus{% | 9262 | \def\add@@apparatus{% |
9200 | \if@pkg@parnotes\parnotes\else\fi | 9263 | \if@pkg@parnotes\parnotes\else\fi |
9201 | \if@pkg@footins | 9264 | \if@pkg@footins |
@@ -9231,7 +9294,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9231 | \ekd@insert@keyparapp | 9294 | \ekd@insert@keyparapp |
9232 | \fi | 9295 | \fi |
9233 | \if@pkg@fitapp | 9296 | \if@pkg@fitapp |
9234 | \ekd@fitapp{\ekd@insert@apparatus}% | 9297 | \luadirect{tex.sprint(ekdosis.setheightandprintapparatus())}% |
9235 | \fi | 9298 | \fi |
9236 | % \if@pkg@breakable | 9299 | % \if@pkg@breakable |
9237 | % \ekd@breakable{\ekd@insert@apparatus}% | 9300 | % \ekd@breakable{\ekd@insert@apparatus}% |
@@ -9317,8 +9380,16 @@ Sample text with a \textcolor{red}{word} in red. | |||
9317 | % \begin{macrocode} | 9380 | % \begin{macrocode} |
9318 | \newif\ifekd@pagelineation | 9381 | \newif\ifekd@pagelineation |
9319 | \newif\ifekd@pagevlineation | 9382 | \newif\ifekd@pagevlineation |
9383 | % \end{macrocode} | ||
9384 | % Two counters (|ekd@lnperpage| and |ekd@locallnperpage|) are defined | ||
9385 | % here and will be used below to allow \pkg{ekdosis} to have control | ||
9386 | % over the maximum number of lines to be printed per page. | ||
9387 | % \begin{macrocode} | ||
9388 | \newcounter{ekd@lnperpage} | ||
9389 | \newcounter{ekd@locallnperpage} | ||
9320 | \NewDocumentCommand{\ekdatbegshihook}{}{% | 9390 | \NewDocumentCommand{\ekdatbegshihook}{}{% |
9321 | \ifekd@pagelineation\resetlinenumber\fi | 9391 | \ifekd@pagelineation\resetlinenumber\fi |
9392 | \setcounter{ekd@lnperpage}{0}% | ||
9322 | } | 9393 | } |
9323 | \AddToHook{shipout/before}{\ekdatbegshihook} | 9394 | \AddToHook{shipout/before}{\ekdatbegshihook} |
9324 | \newif\ifekd@elidednumbers | 9395 | \newif\ifekd@elidednumbers |
@@ -9357,7 +9428,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
9357 | right = \if@pkg@poetry@verse\verselinenumbersright\fi, | 9428 | right = \if@pkg@poetry@verse\verselinenumbersright\fi, |
9358 | left = \if@pkg@poetry@verse\verselinenumbersleft\fi}, | 9429 | left = \if@pkg@poetry@verse\verselinenumbersleft\fi}, |
9359 | unknown-choice vmargin = \PackageError{ekdosis}{unknown | 9430 | unknown-choice vmargin = \PackageError{ekdosis}{unknown |
9360 | vmargin=#1}{`margin' must be either `left' ot `right'} | 9431 | vmargin=#1}{`margin' must be either `left' ot `right'}, |
9432 | code maxlines = \def\maxlines@value{#1}, | ||
9433 | code nomaxlines = \undef\maxlines@value | ||
9361 | } | 9434 | } |
9362 | % \end{macrocode} | 9435 | % \end{macrocode} |
9363 | % \begin{macro}{\SetLineation} | 9436 | % \begin{macro}{\SetLineation} |
@@ -9391,6 +9464,73 @@ Sample text with a \textcolor{red}{word} in red. | |||
9391 | % \begin{macrocode} | 9464 | % \begin{macrocode} |
9392 | \renewcommand\linenumberfont{\normalfont\footnotesize} | 9465 | \renewcommand\linenumberfont{\normalfont\footnotesize} |
9393 | % \end{macrocode} | 9466 | % \end{macrocode} |
9467 | % \paragraph{Limiting the Number of Lines per Page} | ||
9468 | % The following commands are provided to set and control the maximum | ||
9469 | % number of lines printed on each page. | ||
9470 | % \begin{macro}{\setmaxlines} | ||
9471 | % \changes{v1.5}{2022/10/25}{limits the number of lines per page} | ||
9472 | % \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer | ||
9473 | % $\geq 1$, can be used either in the preamble or at any point of the | ||
9474 | % document to set the maximum number of lines to be printed on each | ||
9475 | % page. This command has the same effect as the |maxlines| option | ||
9476 | % of \cs{SetLineation}. | ||
9477 | % \begin{macrocode} | ||
9478 | \def\setmaxlines#1{\def\maxlines@value{#1}} | ||
9479 | % \end{macrocode} | ||
9480 | % \end{macro} | ||
9481 | % \begin{macro}{\localmaxlines} | ||
9482 | % \changes{v1.5}{2022/10/25}{changes the maximum number of lines | ||
9483 | % locally} | ||
9484 | % Once a maximum number of lines per page has been set, | ||
9485 | % \cs{localmaxlines}\marg{n} can be used to adjust this number on a | ||
9486 | % given page. As for \cs{setmaxlines}, \meta{n} must be a positive | ||
9487 | % integer $\geq 1$. | ||
9488 | % \begin{macrocode} | ||
9489 | \def\localmaxlines#1{% | ||
9490 | \luadirect{tex.sprint(ekdosis.setlocalmaxlines(\luastringN{#1}))}% | ||
9491 | \ignorespaces} | ||
9492 | % \end{macrocode} | ||
9493 | % \end{macro} | ||
9494 | % \begin{macro}{\addtomaxlines} | ||
9495 | % \changes{v1.5}{2022/10/25}{adds or subtracts lines from a given page} | ||
9496 | % Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as | ||
9497 | % argument the number of lines one wishes to add or substract from the | ||
9498 | % number that has been set by \cs{setmaxlines}. As a result, \meta{n} | ||
9499 | % can be a positive or negative integer. | ||
9500 | % \begin{macrocode} | ||
9501 | \def\addtomaxlines#1{% | ||
9502 | \luadirect{tex.sprint(ekdosis.addtomaxlines( | ||
9503 | \luastringO{\maxlines@value}, \luastringN{#1}))}% | ||
9504 | \ignorespaces} | ||
9505 | % \end{macrocode} | ||
9506 | % \end{macro} | ||
9507 | % \begin{macro}{\nomaxlines} | ||
9508 | % \changes{v1.5}{2022/10/25}{unsets \cs{setmaxlines}} | ||
9509 | % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. | ||
9510 | % \begin{macrocode} | ||
9511 | \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} | ||
9512 | % \end{macrocode} | ||
9513 | % \end{macro} | ||
9514 | % Finally, the \cs{MakeLineNo} command provided by the \pkg{lineno} | ||
9515 | % package is patched so as to trigger the insertion of \cs{pagebreak} | ||
9516 | % when the number of lines set by \cs{setmaxlines} has been | ||
9517 | % reached:--- | ||
9518 | % \begin{macrocode} | ||
9519 | \AddToHook{cmd/MakeLineNo/after}{% | ||
9520 | \ifdefined\maxlines@value | ||
9521 | \stepcounter{ekd@lnperpage}% | ||
9522 | \ifnum\value{ekd@locallnperpage} = 1 | ||
9523 | \ifnumcomp{\theekd@lnperpage}{=}{% | ||
9524 | \luadirect{tex.sprint(ekdosis.getlocalmaxlines())}}{% | ||
9525 | \setcounter{ekd@locallnperpage}{0}% | ||
9526 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
9527 | \else | ||
9528 | \ifnumcomp{\theekd@lnperpage}{=}{\maxlines@value}{% | ||
9529 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
9530 | \fi | ||
9531 | \fi | ||
9532 | } | ||
9533 | % \end{macrocode} | ||
9394 | % \begin{macro}{\SetDefaultApparatus} | 9534 | % \begin{macro}{\SetDefaultApparatus} |
9395 | % By default, \pkg{ekdosis} defines one layer of critical notes which | 9535 | % By default, \pkg{ekdosis} defines one layer of critical notes which |
9396 | % is called |default|. This name can be changed at any point of the | 9536 | % is called |default|. This name can be changed at any point of the |
@@ -9429,7 +9569,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9429 | % \end{macrocode} | 9569 | % \end{macrocode} |
9430 | % \end{macro} | 9570 | % \end{macro} |
9431 | % \begin{macro}{\App} | 9571 | % \begin{macro}{\App} |
9432 | % \changes{v1.5}{2022/09/01}{To be used conjointly with | 9572 | % \changes{v1.5}{2022/10/25}{To be used conjointly with |
9433 | % \texttt{ekdosis.el}} | 9573 | % \texttt{ekdosis.el}} |
9434 | % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and | 9574 | % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and |
9435 | % accepts one optional argument like so: | 9575 | % accepts one optional argument like so: |
@@ -10313,7 +10453,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10313 | % \end{macro} | 10453 | % \end{macro} |
10314 | % \paragraph{Lacunae} | 10454 | % \paragraph{Lacunae} |
10315 | % \begin{macro}{\ilabel} | 10455 | % \begin{macro}{\ilabel} |
10316 | % \changes{v1.5}{2022/09/01}{recalls and sets the ending label of | 10456 | % \changes{v1.5}{2022/10/25}{recalls and sets the ending label of |
10317 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been | 10457 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been |
10318 | % used with the optional argument |ilabel=<label>|, | 10458 | % used with the optional argument |ilabel=<label>|, |
10319 | % \cs{ilabel}\marg{label} must be used to mark the point where the | 10459 | % \cs{ilabel}\marg{label} must be used to mark the point where the |
@@ -10629,7 +10769,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10629 | % \end{macrocode} | 10769 | % \end{macrocode} |
10630 | % \end{macro} | 10770 | % \end{macro} |
10631 | % \begin{macro}{\ekdEOprint} | 10771 | % \begin{macro}{\ekdEOprint} |
10632 | % \changes{v1.5}{2022/09/01}{Sets headers and footers on | 10772 | % \changes{v1.5}{2022/10/25}{Sets headers and footers on |
10633 | % \enquote{paired} facing pages} | 10773 | % \enquote{paired} facing pages} |
10634 | % To set headers and footers on \enquote{paired} facing pages, | 10774 | % To set headers and footers on \enquote{paired} facing pages, |
10635 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like | 10775 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like |
@@ -10669,7 +10809,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10669 | % counter to set the value of the page numbers. This counter should be | 10809 | % counter to set the value of the page numbers. This counter should be |
10670 | % incremented every two pages. | 10810 | % incremented every two pages. |
10671 | % \begin{counter}{pairedpage} | 10811 | % \begin{counter}{pairedpage} |
10672 | % \changes{v1.5}{2022/09/01}{A counter incremented every two pages} | 10812 | % \changes{v1.5}{2022/10/25}{A counter incremented every two pages} |
10673 | % |pairedpage| is first set as a global counter:--- | 10813 | % |pairedpage| is first set as a global counter:--- |
10674 | % \begin{macrocode} | 10814 | % \begin{macrocode} |
10675 | \newcounter{pairedpage} | 10815 | \newcounter{pairedpage} |
@@ -10677,19 +10817,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
10677 | % \end{macrocode} | 10817 | % \end{macrocode} |
10678 | % \end{counter} | 10818 | % \end{counter} |
10679 | % \begin{macro}{\setpairedpagenum} | 10819 | % \begin{macro}{\setpairedpagenum} |
10680 | % \changes{v1.5}{2022/09/01}{sets the same page number on paired | 10820 | % \changes{v1.5}{2022/10/25}{sets the same page number on paired |
10681 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of | 10821 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of |
10682 | % the alignment environment to set the number of the first left-hand | 10822 | % the alignment environment to set the number of the first left-hand |
10683 | % paired page. | 10823 | % paired page. |
10684 | % \begin{macro}{\setpairedpage} | 10824 | % \begin{macro}{\setpairedpage} |
10685 | % \changes{v1.5}{2022/09/01}{sets the page number of the first paired | 10825 | % \changes{v1.5}{2022/10/25}{sets the page number of the first paired |
10686 | % page} \cs{setpairedpage} is an argument-less command meant to be | 10826 | % page} \cs{setpairedpage} is an argument-less command meant to be |
10687 | % issued in commands used to set headers or footers before | 10827 | % issued in commands used to set headers or footers before |
10688 | % \cs{thepage}. This command has the counter |pairedpage| | 10828 | % \cs{thepage}. This command has the counter |pairedpage| |
10689 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ | 10829 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ |
10690 | % |pairedpage| on every page. | 10830 | % |pairedpage| on every page. |
10691 | % \begin{macro}{\resetpagenumber} | 10831 | % \begin{macro}{\resetpagenumber} |
10692 | % \changes{v1.5}{2022/09/01}{resets normal running page numbers} | 10832 | % \changes{v1.5}{2022/10/25}{resets normal running page numbers} |
10693 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} | 10833 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} |
10694 | % paired pages alignment environments. This argument-less command | 10834 | % paired pages alignment environments. This argument-less command |
10695 | % corrects any numbering error on the page following the edition | 10835 | % corrects any numbering error on the page following the edition |
@@ -13047,6 +13187,60 @@ function ekdosis.export_coldata_totei() | |||
13047 | end | 13187 | end |
13048 | end | 13188 | end |
13049 | 13189 | ||
13190 | -- maxlines | ||
13191 | -- | ||
13192 | |||
13193 | local localmaxlines = nil | ||
13194 | |||
13195 | function ekdosis.resetlocalmaxlines() | ||
13196 | localmaxlines = nil | ||
13197 | return "\\setcounter{ekd@locallnperpage}{0}" | ||
13198 | end | ||
13199 | |||
13200 | function ekdosis.setlocalmaxlines(n) | ||
13201 | n = tonumber(n) | ||
13202 | if math.type(n) == "integer" | ||
13203 | then | ||
13204 | localmaxlines = n | ||
13205 | end | ||
13206 | return "\\setcounter{ekd@locallnperpage}{1}" | ||
13207 | end | ||
13208 | |||
13209 | function ekdosis.addtomaxlines(ni, nii) | ||
13210 | ni = tonumber(ni) | ||
13211 | nii = tonumber(nii) | ||
13212 | if math.type(ni) == "integer" and math.type(nii) == "integer" | ||
13213 | then | ||
13214 | localmaxlines = ni + nii | ||
13215 | end | ||
13216 | return "\\setcounter{ekd@locallnperpage}{1}" | ||
13217 | end | ||
13218 | |||
13219 | function ekdosis.getlocalmaxlines() | ||
13220 | if localmaxlines | ||
13221 | then | ||
13222 | return localmaxlines | ||
13223 | end | ||
13224 | end | ||
13225 | |||
13226 | -- apparatus height | ||
13227 | -- | ||
13228 | local appheightchanged = false | ||
13229 | |||
13230 | function ekdosis.changeappheight() | ||
13231 | appheightchanged = true | ||
13232 | end | ||
13233 | |||
13234 | function ekdosis.setheightandprintapparatus() | ||
13235 | if appheightchanged == true | ||
13236 | then | ||
13237 | appheightchanged = false | ||
13238 | return "\\csname ekd@insert@fitapparatus@tmpheight\\endcsname" | ||
13239 | else | ||
13240 | return "\\csname ekd@insert@fitapparatus\\endcsname" | ||
13241 | end | ||
13242 | end | ||
13243 | |||
13050 | -- handle multiple layers in apparatuses | 13244 | -- handle multiple layers in apparatuses |
13051 | -- | 13245 | -- |
13052 | local apparatuses = {} | 13246 | local apparatuses = {} |