diff options
author | Robert Alessi <alessi@robertalessi.net> | 2023-07-29 16:55:20 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2023-07-29 16:55:20 +0200 |
commit | bdb86207b1923f1bfa88f6205ff26f04497abc8d (patch) | |
tree | bc664f394cc1f1c2f6c7840ede42ff16c634c60f | |
parent | 429023b977a74e57f5588c35fba36efdc76672fc (diff) | |
download | ekdosis-bdb86207b1923f1bfa88f6205ff26f04497abc8d.tar.gz |
a bit of literate programming on \current@ref
-rw-r--r-- | ekdosis.dtx | 150 |
1 files changed, 108 insertions, 42 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index af71c7d..d701f5d 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/07/05 v1.5-dev Typesetting TEI xml-compliant critical editions] | 62 | [2023/07/29 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} |
@@ -8517,7 +8517,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8517 | % \end{macrocode} | 8517 | % \end{macrocode} |
8518 | % \paragraph{\textsf{ekdosis} Symbol} | 8518 | % \paragraph{\textsf{ekdosis} Symbol} |
8519 | % \begin{macro}{\eKd} | 8519 | % \begin{macro}{\eKd} |
8520 | % \changes{v1.5}{2023/07/05}{Prints \textsf{ekdosis} indentifying | 8520 | % \changes{v1.5}{2023/07/29}{Prints \textsf{ekdosis} indentifying |
8521 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying | 8521 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying |
8522 | % symbol. It is produced by \cs{eKd} and best printed with the Old | 8522 | % symbol. It is produced by \cs{eKd} and best printed with the Old |
8523 | % Standard Greek font. | 8523 | % Standard Greek font. |
@@ -8780,7 +8780,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8780 | % \begin{macro}{\teidirectE} | 8780 | % \begin{macro}{\teidirectE} |
8781 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the | 8781 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the |
8782 | % \texttt{TEI xml} file} | 8782 | % \texttt{TEI xml} file} |
8783 | % \changes{v1.5}{2023/07/05}{direct insertion of empty elements in the | 8783 | % \changes{v1.5}{2023/07/29}{direct insertion of empty elements in the |
8784 | % \texttt{TEI xml} file} | 8784 | % \texttt{TEI xml} file} |
8785 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} | 8785 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} |
8786 | % does nothing in \LaTeX. It is only used to insert elements in the | 8786 | % does nothing in \LaTeX. It is only used to insert elements in the |
@@ -8795,7 +8795,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8795 | % \end{macro} | 8795 | % \end{macro} |
8796 | % \end{macro} | 8796 | % \end{macro} |
8797 | % \begin{macro}{\getTEIxmlid} | 8797 | % \begin{macro}{\getTEIxmlid} |
8798 | % \changes{v1.5}{2023/07/05}{returns \texttt{TEI xml:ids} from a | 8798 | % \changes{v1.5}{2023/07/29}{returns \texttt{TEI xml:ids} from a |
8799 | % csv-list of ids} This command returns from a csv-list of unique | 8799 | % csv-list of ids} This command returns from a csv-list of unique |
8800 | % identifiers declared in commands such as \cs{DeclareWitness} and the | 8800 | % identifiers declared in commands such as \cs{DeclareWitness} and the |
8801 | % like a space-separated list of their corresponding |xml:id|s, each | 8801 | % like a space-separated list of their corresponding |xml:id|s, each |
@@ -9271,7 +9271,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9271 | \newlength{\ekd@app@localheight} | 9271 | \newlength{\ekd@app@localheight} |
9272 | % \end{macrocode} | 9272 | % \end{macrocode} |
9273 | % \begin{macro}{\localappheight} | 9273 | % \begin{macro}{\localappheight} |
9274 | % \changes{v1.5}{2023/07/05}{changes the height of the apparatus | 9274 | % \changes{v1.5}{2023/07/29}{changes the height of the apparatus |
9275 | % criticus} | 9275 | % criticus} |
9276 | % \cs{localappheight}\marg{dimen} can be used to change locally the | 9276 | % \cs{localappheight}\marg{dimen} can be used to change locally the |
9277 | % length of \cs{ekd@app@height} set by the |appheight| option of | 9277 | % length of \cs{ekd@app@height} set by the |appheight| option of |
@@ -9290,7 +9290,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9290 | % \end{macrocode} | 9290 | % \end{macrocode} |
9291 | % \end{macro} | 9291 | % \end{macro} |
9292 | % \begin{macro}{\addtoappheight} | 9292 | % \begin{macro}{\addtoappheight} |
9293 | % \changes{v1.5}{2023/07/05}{increases or decreases the height of the | 9293 | % \changes{v1.5}{2023/07/29}{increases or decreases the height of the |
9294 | % apparatus criticus} | 9294 | % apparatus criticus} |
9295 | % As the name suggests, in contrast to \cs{localappheight}, | 9295 | % As the name suggests, in contrast to \cs{localappheight}, |
9296 | % \cs{addtoappheight}\marg{dimen} is used to increase or decrease | 9296 | % \cs{addtoappheight}\marg{dimen} is used to increase or decrease |
@@ -9577,7 +9577,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9577 | % The following commands are provided to set and control the maximum | 9577 | % The following commands are provided to set and control the maximum |
9578 | % number of lines printed on each page. | 9578 | % number of lines printed on each page. |
9579 | % \begin{macro}{\setmaxlines} | 9579 | % \begin{macro}{\setmaxlines} |
9580 | % \changes{v1.5}{2023/07/05}{limits the number of lines per page} | 9580 | % \changes{v1.5}{2023/07/29}{limits the number of lines per page} |
9581 | % \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer | 9581 | % \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer |
9582 | % $\geq 1$, can be used either in the preamble or at any point of the | 9582 | % $\geq 1$, can be used either in the preamble or at any point of the |
9583 | % document to set the maximum number of lines to be printed on each | 9583 | % document to set the maximum number of lines to be printed on each |
@@ -9588,7 +9588,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9588 | % \end{macrocode} | 9588 | % \end{macrocode} |
9589 | % \end{macro} | 9589 | % \end{macro} |
9590 | % \begin{macro}{\localmaxlines} | 9590 | % \begin{macro}{\localmaxlines} |
9591 | % \changes{v1.5}{2023/07/05}{changes the maximum number of lines | 9591 | % \changes{v1.5}{2023/07/29}{changes the maximum number of lines |
9592 | % locally} | 9592 | % locally} |
9593 | % Once a maximum number of lines per page has been set, | 9593 | % Once a maximum number of lines per page has been set, |
9594 | % \cs{localmaxlines}\marg{n} can be used to adjust this number on a | 9594 | % \cs{localmaxlines}\marg{n} can be used to adjust this number on a |
@@ -9601,7 +9601,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9601 | % \end{macrocode} | 9601 | % \end{macrocode} |
9602 | % \end{macro} | 9602 | % \end{macro} |
9603 | % \begin{macro}{\addtomaxlines} | 9603 | % \begin{macro}{\addtomaxlines} |
9604 | % \changes{v1.5}{2023/07/05}{adds or subtracts lines from a given page} | 9604 | % \changes{v1.5}{2023/07/29}{adds or subtracts lines from a given page} |
9605 | % Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as | 9605 | % Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as |
9606 | % argument the number of lines one wishes to add or substract from the | 9606 | % argument the number of lines one wishes to add or substract from the |
9607 | % number that has been set by \cs{setmaxlines}. As a result, \meta{n} | 9607 | % number that has been set by \cs{setmaxlines}. As a result, \meta{n} |
@@ -9614,7 +9614,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9614 | % \end{macrocode} | 9614 | % \end{macrocode} |
9615 | % \end{macro} | 9615 | % \end{macro} |
9616 | % \begin{macro}{\nomaxlines} | 9616 | % \begin{macro}{\nomaxlines} |
9617 | % \changes{v1.5}{2023/07/05}{unsets \cs{setmaxlines}} | 9617 | % \changes{v1.5}{2023/07/29}{unsets \cs{setmaxlines}} |
9618 | % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. | 9618 | % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. |
9619 | % \begin{macrocode} | 9619 | % \begin{macrocode} |
9620 | \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} | 9620 | \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} |
@@ -9678,7 +9678,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9678 | % \end{macrocode} | 9678 | % \end{macrocode} |
9679 | % \end{macro} | 9679 | % \end{macro} |
9680 | % \begin{macro}{\App} | 9680 | % \begin{macro}{\App} |
9681 | % \changes{v1.5}{2023/07/05}{To be used conjointly with | 9681 | % \changes{v1.5}{2023/07/29}{To be used conjointly with |
9682 | % \texttt{ekdosis.el}} | 9682 | % \texttt{ekdosis.el}} |
9683 | % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and | 9683 | % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and |
9684 | % accepts one optional argument like so: | 9684 | % accepts one optional argument like so: |
@@ -9793,38 +9793,54 @@ Sample text with a \textcolor{red}{word} in red. | |||
9793 | % \begin{macrocode} | 9793 | % \begin{macrocode} |
9794 | \def\current@ref{{%\textdir TLT% | 9794 | \def\current@ref{{%\textdir TLT% |
9795 | \unexpanded\expandafter{\ekd@refnumstyle}% | 9795 | \unexpanded\expandafter{\ekd@refnumstyle}% |
9796 | \ifnum % if the whole lemma falls on the same page... | 9796 | % \end{macrocode} |
9797 | % If the whole lemma falls on the same page... | ||
9798 | % \begin{macrocode} | ||
9799 | \ifnum | ||
9797 | \pdf@strcmp{% | 9800 | \pdf@strcmp{% |
9798 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9801 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% |
9799 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | 9802 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} |
9800 | = | 9803 | = |
9801 | 0 | 9804 | 0 |
9802 | \ifnum % ... and on the same line | 9805 | % \end{macrocode} |
9806 | % ... and on the same line, | ||
9807 | % \begin{macrocode} | ||
9808 | \ifnum | ||
9803 | \pdf@strcmp{% | 9809 | \pdf@strcmp{% |
9804 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9810 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% |
9805 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | 9811 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} |
9806 | = | 9812 | = |
9807 | 0 | 9813 | 0 |
9808 | % | 9814 | % \end{macrocode} |
9809 | \ifekd@mapps % then, if multiple layers have been defined: | 9815 | % then, if multiple layers have been defined, |
9810 | \ifbool{subsq@unit@\ekdan@type}{% given a subsequent entry ... | 9816 | % \begin{macrocode} |
9811 | \ifnum % ... when it begins on the same line as the | 9817 | \ifekd@mapps |
9812 | % previous one ... | 9818 | % \end{macrocode} |
9819 | % and the entry is a subsequent one, when it begins on the same line | ||
9820 | % as the previous one... | ||
9821 | % \begin{macrocode} | ||
9822 | \ifbool{subsq@unit@\ekdan@type}{% | ||
9823 | \ifnum | ||
9813 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9824 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9814 | ekdosis.getlnlab())}-b}}% | 9825 | ekdosis.getlnlab())}-b}}% |
9815 | {\getrefnumber{\luadirect{tex.sprint( | 9826 | {\getrefnumber{\luadirect{tex.sprint( |
9816 | ekdosis.getprevlnlab())}-b}} | 9827 | ekdosis.getprevlnlab())}-b}} |
9817 | = | 9828 | = |
9818 | 0 | 9829 | 0 |
9819 | %%% begin | 9830 | % \end{macrocode} |
9820 | \ifnum % ... and ends likewise, then do nothing, | 9831 | % and ends likewise, then do nothing:--- |
9832 | % \begin{macrocode} | ||
9833 | \ifnum | ||
9821 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9834 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9822 | ekdosis.getlnlab())}-e}}% | 9835 | ekdosis.getlnlab())}-e}}% |
9823 | {\getrefnumber{\luadirect{tex.sprint( | 9836 | {\getrefnumber{\luadirect{tex.sprint( |
9824 | ekdosis.getprevlnlab())}-e}} | 9837 | ekdosis.getprevlnlab())}-e}} |
9825 | = | 9838 | = |
9826 | 0 | 9839 | 0 |
9827 | \ifekd@appinapp % (this is for nested \app entries.) | 9840 | % \end{macrocode} |
9841 | % (What follows is for nested \cs{app} entries.) | ||
9842 | % \begin{macrocode} | ||
9843 | \ifekd@appinapp | ||
9828 | \ifnum | 9844 | \ifnum |
9829 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9845 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9830 | ekdosis.getlnlab())}-b}}% | 9846 | ekdosis.getlnlab())}-b}}% |
@@ -9836,28 +9852,43 @@ Sample text with a \textcolor{red}{word} in red. | |||
9836 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9852 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9837 | ekdosis.getlnlab())}-b}}% | 9853 | ekdosis.getlnlab())}-b}}% |
9838 | \unexpanded\expandafter{\ekd@postrefnum}% issue | 9854 | \unexpanded\expandafter{\ekd@postrefnum}% issue |
9839 | % the no | 9855 | % the no |
9840 | \fi | 9856 | \fi |
9841 | \fi | 9857 | \fi |
9842 | \else % otherwise, print the line number: | 9858 | % \end{macrocode} |
9859 | % Otherwise, print the line number:--- | ||
9860 | % \begin{macrocode} | ||
9861 | \else | ||
9843 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9862 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9844 | ekdosis.getlnlab())}-b}}% | 9863 | ekdosis.getlnlab())}-b}}% |
9845 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9864 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9846 | \fi | 9865 | \fi |
9847 | %%% end | 9866 | % \end{macrocode} |
9848 | \else % if the entry begins on a new line, print the | 9867 | % If the entry begins on a new line, print the number:--- |
9849 | % number: | 9868 | % \begin{macrocode} |
9869 | \else | ||
9850 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9870 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9851 | ekdosis.getlnlab())}-b}}% | 9871 | ekdosis.getlnlab())}-b}}% |
9852 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9872 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9853 | \fi | 9873 | \fi |
9854 | }% and always print the line number ahead of first entries: | 9874 | % \end{macrocode} |
9855 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | 9875 | % And always print the line number ahead of first entries:--- |
9876 | % \begin{macrocode} | ||
9877 | }{\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9856 | ekdosis.getlnlab())}-b}}% | 9878 | ekdosis.getlnlab())}-b}}% |
9857 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | 9879 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no |
9858 | \else % now if there is only one default layer | 9880 | % \end{macrocode} |
9881 | % Now if there is only one default layer:--- | ||
9882 | % \begin{macrocode} | ||
9883 | \else | ||
9884 | % \end{macrocode} | ||
9885 | % On subsequent entries... | ||
9886 | % \begin{macrocode} | ||
9859 | \ifsubsq@unit | 9887 | \ifsubsq@unit |
9860 | % | 9888 | % \end{macrocode} |
9889 | % ... if the whole lemma text begins on the same line as the preceding | ||
9890 | % one... | ||
9891 | % \begin{macrocode} | ||
9861 | \ifnum | 9892 | \ifnum |
9862 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9893 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9863 | ekdosis.getlnlab())}-b}}% | 9894 | ekdosis.getlnlab())}-b}}% |
@@ -9865,7 +9896,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
9865 | ekdosis.getprevlnlab())}-b}} | 9896 | ekdosis.getprevlnlab())}-b}} |
9866 | = | 9897 | = |
9867 | 0 | 9898 | 0 |
9868 | %%% begin | 9899 | % \end{macrocode} |
9900 | % ... and ends likewise... | ||
9901 | % \begin{macrocode} | ||
9869 | \ifnum | 9902 | \ifnum |
9870 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9903 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9871 | ekdosis.getlnlab())}-e}}% | 9904 | ekdosis.getlnlab())}-e}}% |
@@ -9873,6 +9906,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
9873 | ekdosis.getprevlnlab())}-e}} | 9906 | ekdosis.getprevlnlab())}-e}} |
9874 | = | 9907 | = |
9875 | 0 | 9908 | 0 |
9909 | % \end{macrocode} | ||
9910 | % (What follows is for nested \cs{app} entries.) | ||
9911 | % \begin{macrocode} | ||
9876 | \ifekd@appinapp | 9912 | \ifekd@appinapp |
9877 | \ifnum | 9913 | \ifnum |
9878 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9914 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
@@ -9887,26 +9923,39 @@ Sample text with a \textcolor{red}{word} in red. | |||
9887 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9923 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9888 | \fi | 9924 | \fi |
9889 | \fi | 9925 | \fi |
9926 | % \end{macrocode} | ||
9927 | % ... then do nothing. Otherwise, print the line number:--- | ||
9928 | % \begin{macrocode} | ||
9890 | \else | 9929 | \else |
9891 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9930 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9892 | ekdosis.getlnlab())}-b}}% | 9931 | ekdosis.getlnlab())}-b}}% |
9893 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9932 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9894 | \fi | 9933 | \fi |
9895 | %%% end | 9934 | % \end{macrocode} |
9935 | % If the entry begins on a new line, print the number as well:--- | ||
9936 | % \begin{macrocode} | ||
9896 | \else | 9937 | \else |
9897 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9938 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9898 | ekdosis.getlnlab())}-b}}% | 9939 | ekdosis.getlnlab())}-b}}% |
9899 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9940 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9900 | \fi | 9941 | \fi |
9901 | % | 9942 | % \end{macrocode} |
9943 | % And always print the line number ahead of first entries:--- | ||
9944 | % \begin{macrocode} | ||
9902 | \else | 9945 | \else |
9903 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9946 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9904 | ekdosis.getlnlab())}-b}}% | 9947 | ekdosis.getlnlab())}-b}}% |
9905 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9948 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9906 | \fi | 9949 | \fi |
9907 | \fi | 9950 | \fi |
9908 | % | 9951 | % \end{macrocode} |
9952 | % Now if the lemma text breaks across lines ... | ||
9953 | % \begin{macrocode} | ||
9909 | \else | 9954 | \else |
9955 | % \end{macrocode} | ||
9956 | % ... then, depending on what has been instructed, either print the | ||
9957 | % last number of a range elided:--- | ||
9958 | % \begin{macrocode} | ||
9910 | \ifekd@elidednumbers | 9959 | \ifekd@elidednumbers |
9911 | \luadirect{tex.sprint(ekdosis.numrange( | 9960 | \luadirect{tex.sprint(ekdosis.numrange( |
9912 | \luastring{\getrefnumber{\luadirect{tex.sprint( | 9961 | \luastring{\getrefnumber{\luadirect{tex.sprint( |
@@ -9914,6 +9963,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
9914 | \luastring{\getrefnumber{\luadirect{tex.sprint( | 9963 | \luastring{\getrefnumber{\luadirect{tex.sprint( |
9915 | ekdosis.getlnlab())}-e}}))}% | 9964 | ekdosis.getlnlab())}-e}}))}% |
9916 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9965 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
9966 | % \end{macrocode} | ||
9967 | % ... or in full:--- | ||
9968 | % \begin{macrocode} | ||
9917 | \else | 9969 | \else |
9918 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9970 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9919 | ekdosis.getlnlab())}-b}}--% | 9971 | ekdosis.getlnlab())}-b}}--% |
@@ -9922,7 +9974,14 @@ Sample text with a \textcolor{red}{word} in red. | |||
9922 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9974 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
9923 | \fi | 9975 | \fi |
9924 | \fi | 9976 | \fi |
9925 | \else % now if the lemma breaks across pages | 9977 | % \end{macrocode} |
9978 | % When the lemma breaks across pages:--- | ||
9979 | % \begin{macrocode} | ||
9980 | \else | ||
9981 | % \end{macrocode} | ||
9982 | % Print the page number and the line number when the numbering starts | ||
9983 | % afresh at the top of each page:--- | ||
9984 | % \begin{macrocode} | ||
9926 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} | 9985 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} |
9927 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | 9986 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( |
9928 | ekdosis.getlnlab())}-b}}--% | 9987 | ekdosis.getlnlab())}-b}}--% |
@@ -9931,12 +9990,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
9931 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9990 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9932 | ekdosis.getlnlab())}-e}}% | 9991 | ekdosis.getlnlab())}-e}}% |
9933 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos | 9992 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos |
9993 | % \end{macrocode} | ||
9994 | % Or just the line number if the lines are continuously numbered | ||
9995 | % throughout the book:--- | ||
9996 | % \begin{macrocode} | ||
9934 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | 9997 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( |
9935 | ekdosis.getlnlab())}-b}}--% | 9998 | ekdosis.getlnlab())}-b}}--% |
9936 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9999 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9937 | ekdosis.getlnlab())}-e}}% | 10000 | ekdosis.getlnlab())}-e}}% |
9938 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos | 10001 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos |
9939 | \fi | 10002 | \fi |
10003 | % \end{macrocode} | ||
10004 | % Finally, print the number when instructed to do so:--- | ||
10005 | % \begin{macrocode} | ||
9940 | \ifekdl@forcenum | 10006 | \ifekdl@forcenum |
9941 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 10007 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9942 | ekdosis.getlnlab())}-b}}% | 10008 | ekdosis.getlnlab())}-b}}% |
@@ -10541,7 +10607,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10541 | } | 10607 | } |
10542 | % \end{macrocode} | 10608 | % \end{macrocode} |
10543 | % \begin{macro}{\SetFootnotes} | 10609 | % \begin{macro}{\SetFootnotes} |
10544 | % \changes{v1.5}{2023/07/05}{footnotes combined into a single | 10610 | % \changes{v1.5}{2023/07/29}{footnotes combined into a single |
10545 | % paragraph} \cs{SetFootnotes}\marg{options} can be used in the | 10611 | % paragraph} \cs{SetFootnotes}\marg{options} can be used in the |
10546 | % preamble or at any point of the document. |layout=paragraph| | 10612 | % preamble or at any point of the document. |layout=paragraph| |
10547 | % instructs \pkg{ekdosis} to combine all footnotes into a single | 10613 | % instructs \pkg{ekdosis} to combine all footnotes into a single |
@@ -10772,7 +10838,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10772 | % \end{macro} | 10838 | % \end{macro} |
10773 | % \paragraph{Lacunae} | 10839 | % \paragraph{Lacunae} |
10774 | % \begin{macro}{\ilabel} | 10840 | % \begin{macro}{\ilabel} |
10775 | % \changes{v1.5}{2023/07/05}{recalls and sets the ending label of | 10841 | % \changes{v1.5}{2023/07/29}{recalls and sets the ending label of |
10776 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been | 10842 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been |
10777 | % used with the optional argument |ilabel=<label>|, | 10843 | % used with the optional argument |ilabel=<label>|, |
10778 | % \cs{ilabel}\marg{label} must be used to mark the point where the | 10844 | % \cs{ilabel}\marg{label} must be used to mark the point where the |
@@ -11107,7 +11173,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
11107 | % \end{macrocode} | 11173 | % \end{macrocode} |
11108 | % \end{macro} | 11174 | % \end{macro} |
11109 | % \begin{macro}{\ekdEOprint} | 11175 | % \begin{macro}{\ekdEOprint} |
11110 | % \changes{v1.5}{2023/07/05}{Sets headers and footers on | 11176 | % \changes{v1.5}{2023/07/29}{Sets headers and footers on |
11111 | % \enquote{paired} facing pages} | 11177 | % \enquote{paired} facing pages} |
11112 | % To set headers and footers on \enquote{paired} facing pages, | 11178 | % To set headers and footers on \enquote{paired} facing pages, |
11113 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like | 11179 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like |
@@ -11147,7 +11213,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
11147 | % counter to set the value of the page numbers. This counter should be | 11213 | % counter to set the value of the page numbers. This counter should be |
11148 | % incremented every two pages. | 11214 | % incremented every two pages. |
11149 | % \begin{counter}{pairedpage} | 11215 | % \begin{counter}{pairedpage} |
11150 | % \changes{v1.5}{2023/07/05}{A counter incremented every two pages} | 11216 | % \changes{v1.5}{2023/07/29}{A counter incremented every two pages} |
11151 | % |pairedpage| is first set as a global counter:--- | 11217 | % |pairedpage| is first set as a global counter:--- |
11152 | % \begin{macrocode} | 11218 | % \begin{macrocode} |
11153 | \newcounter{pairedpage} | 11219 | \newcounter{pairedpage} |
@@ -11155,19 +11221,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
11155 | % \end{macrocode} | 11221 | % \end{macrocode} |
11156 | % \end{counter} | 11222 | % \end{counter} |
11157 | % \begin{macro}{\setpairedpagenum} | 11223 | % \begin{macro}{\setpairedpagenum} |
11158 | % \changes{v1.5}{2023/07/05}{sets the same page number on paired | 11224 | % \changes{v1.5}{2023/07/29}{sets the same page number on paired |
11159 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of | 11225 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of |
11160 | % the alignment environment to set the number of the first left-hand | 11226 | % the alignment environment to set the number of the first left-hand |
11161 | % paired page. | 11227 | % paired page. |
11162 | % \begin{macro}{\setpairedpage} | 11228 | % \begin{macro}{\setpairedpage} |
11163 | % \changes{v1.5}{2023/07/05}{sets the page number of the first paired | 11229 | % \changes{v1.5}{2023/07/29}{sets the page number of the first paired |
11164 | % page} \cs{setpairedpage} is an argument-less command meant to be | 11230 | % page} \cs{setpairedpage} is an argument-less command meant to be |
11165 | % issued in commands used to set headers or footers before | 11231 | % issued in commands used to set headers or footers before |
11166 | % \cs{thepage}. This command has the counter |pairedpage| | 11232 | % \cs{thepage}. This command has the counter |pairedpage| |
11167 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ | 11233 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ |
11168 | % |pairedpage| on every page. | 11234 | % |pairedpage| on every page. |
11169 | % \begin{macro}{\resetpagenumber} | 11235 | % \begin{macro}{\resetpagenumber} |
11170 | % \changes{v1.5}{2023/07/05}{resets normal running page numbers} | 11236 | % \changes{v1.5}{2023/07/29}{resets normal running page numbers} |
11171 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} | 11237 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} |
11172 | % paired pages alignment environments. This argument-less command | 11238 | % paired pages alignment environments. This argument-less command |
11173 | % corrects any numbering error on the page following the edition | 11239 | % corrects any numbering error on the page following the edition |