diff options
author | Robert Alessi <alessi@robertalessi.net> | 2023-07-28 21:05:53 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2023-07-28 21:05:53 +0200 |
commit | 429023b977a74e57f5588c35fba36efdc76672fc (patch) | |
tree | 4cdb398dc0bc9c4cf66ad46532859244386f1ea7 | |
parent | 4ef582d47ccf3ac9256e199a23a58b6ad4cd2821 (diff) | |
download | ekdosis-429023b977a74e57f5588c35fba36efdc76672fc.tar.gz |
nolem: removed unwanted space
-rw-r--r-- | ekdosis.dtx | 202 |
1 files changed, 102 insertions, 100 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 936d9a4..af71c7d 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -9715,8 +9715,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9715 | % line label\---which are manually inserted---and returns the formatted | 9715 | % line label\---which are manually inserted---and returns the formatted |
9716 | % reference to be inserted in the apparatus criticus. | 9716 | % reference to be inserted in the apparatus criticus. |
9717 | % \begin{macrocode} | 9717 | % \begin{macrocode} |
9718 | \def\current@ref@arg#1#2{ | 9718 | \def\current@ref@arg#1#2{{%\textdir TLT% |
9719 | \bgroup %\textdir TLT% | ||
9720 | \unexpanded\expandafter{\ekd@refnumstyle}% | 9719 | \unexpanded\expandafter{\ekd@refnumstyle}% |
9721 | \ifnum | 9720 | \ifnum |
9722 | \pdf@strcmp{\getpagerefnumber{#1}}{\getpagerefnumber{#2}} | 9721 | \pdf@strcmp{\getpagerefnumber{#1}}{\getpagerefnumber{#2}} |
@@ -9786,31 +9785,79 @@ Sample text with a \textcolor{red}{word} in red. | |||
9786 | \LRnum{\getrefnumber{#1}}% | 9785 | \LRnum{\getrefnumber{#1}}% |
9787 | \unexpanded\expandafter{\ekd@postrefnum}% force the no | 9786 | \unexpanded\expandafter{\ekd@postrefnum}% force the no |
9788 | \fi | 9787 | \fi |
9789 | \egroup | 9788 | }} |
9790 | } | ||
9791 | % \end{macrocode} | 9789 | % \end{macrocode} |
9792 | % \cs{current@ref} is pretty much the same as \cs{current@reg@arg}, | 9790 | % \cs{current@ref} is pretty much the same as \cs{current@reg@arg}, |
9793 | % but takes no argument. It is used by commands such as \cs{lem} when | 9791 | % but takes no argument. It is used by commands such as \cs{lem} when |
9794 | % references to page and line numbers can be returned by \textsf{Lua}. | 9792 | % references to page and line numbers can be returned by \textsf{Lua}. |
9795 | % \begin{macrocode} | 9793 | % \begin{macrocode} |
9796 | \def\current@ref{% | 9794 | \def\current@ref{{%\textdir TLT% |
9797 | \bgroup %\textdir TLT% | 9795 | \unexpanded\expandafter{\ekd@refnumstyle}% |
9798 | \unexpanded\expandafter{\ekd@refnumstyle}% | 9796 | \ifnum % if the whole lemma falls on the same page... |
9799 | \ifnum % if the whole lemma falls on the same page... | ||
9800 | \pdf@strcmp{% | ||
9801 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
9802 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | ||
9803 | = | ||
9804 | 0 | ||
9805 | \ifnum % ... and on the same line | ||
9806 | \pdf@strcmp{% | 9797 | \pdf@strcmp{% |
9807 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9798 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% |
9808 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | 9799 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} |
9809 | = | 9800 | = |
9810 | 0 | 9801 | 0 |
9811 | % | 9802 | \ifnum % ... and on the same line |
9812 | \ifekd@mapps % then, if multiple layers have been defined... | 9803 | \pdf@strcmp{% |
9813 | \ifbool{subsq@unit@\ekdan@type}{% | 9804 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% |
9805 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | ||
9806 | = | ||
9807 | 0 | ||
9808 | % | ||
9809 | \ifekd@mapps % then, if multiple layers have been defined: | ||
9810 | \ifbool{subsq@unit@\ekdan@type}{% given a subsequent entry ... | ||
9811 | \ifnum % ... when it begins on the same line as the | ||
9812 | % previous one ... | ||
9813 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9814 | ekdosis.getlnlab())}-b}}% | ||
9815 | {\getrefnumber{\luadirect{tex.sprint( | ||
9816 | ekdosis.getprevlnlab())}-b}} | ||
9817 | = | ||
9818 | 0 | ||
9819 | %%% begin | ||
9820 | \ifnum % ... and ends likewise, then do nothing, | ||
9821 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9822 | ekdosis.getlnlab())}-e}}% | ||
9823 | {\getrefnumber{\luadirect{tex.sprint( | ||
9824 | ekdosis.getprevlnlab())}-e}} | ||
9825 | = | ||
9826 | 0 | ||
9827 | \ifekd@appinapp % (this is for nested \app entries.) | ||
9828 | \ifnum | ||
9829 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9830 | ekdosis.getlnlab())}-b}}% | ||
9831 | {\getrefnumber{\luadirect{tex.sprint( | ||
9832 | ekdosis.getprevprevlnlab())}-b}} | ||
9833 | = | ||
9834 | 0 | ||
9835 | \else | ||
9836 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9837 | ekdosis.getlnlab())}-b}}% | ||
9838 | \unexpanded\expandafter{\ekd@postrefnum}% issue | ||
9839 | % the no | ||
9840 | \fi | ||
9841 | \fi | ||
9842 | \else % otherwise, print the line number: | ||
9843 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9844 | ekdosis.getlnlab())}-b}}% | ||
9845 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9846 | \fi | ||
9847 | %%% end | ||
9848 | \else % if the entry begins on a new line, print the | ||
9849 | % number: | ||
9850 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9851 | ekdosis.getlnlab())}-b}}% | ||
9852 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9853 | \fi | ||
9854 | }% and always print the line number ahead of first entries: | ||
9855 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9856 | ekdosis.getlnlab())}-b}}% | ||
9857 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | ||
9858 | \else % now if there is only one default layer | ||
9859 | \ifsubsq@unit | ||
9860 | % | ||
9814 | \ifnum | 9861 | \ifnum |
9815 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | 9862 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
9816 | ekdosis.getlnlab())}-b}}% | 9863 | ekdosis.getlnlab())}-b}}% |
@@ -9851,97 +9898,51 @@ Sample text with a \textcolor{red}{word} in red. | |||
9851 | ekdosis.getlnlab())}-b}}% | 9898 | ekdosis.getlnlab())}-b}}% |
9852 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9899 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9853 | \fi | 9900 | \fi |
9854 | }{\LRnum{\getrefnumber{\luadirect{tex.sprint( | 9901 | % |
9855 | ekdosis.getlnlab())}-b}}% | ||
9856 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | ||
9857 | \else | ||
9858 | \ifsubsq@unit | ||
9859 | % | ||
9860 | \ifnum | ||
9861 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9862 | ekdosis.getlnlab())}-b}}% | ||
9863 | {\getrefnumber{\luadirect{tex.sprint( | ||
9864 | ekdosis.getprevlnlab())}-b}} | ||
9865 | = | ||
9866 | 0 | ||
9867 | %%% begin | ||
9868 | \ifnum | ||
9869 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9870 | ekdosis.getlnlab())}-e}}% | ||
9871 | {\getrefnumber{\luadirect{tex.sprint( | ||
9872 | ekdosis.getprevlnlab())}-e}} | ||
9873 | = | ||
9874 | 0 | ||
9875 | \ifekd@appinapp | ||
9876 | \ifnum | ||
9877 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9878 | ekdosis.getlnlab())}-b}}% | ||
9879 | {\getrefnumber{\luadirect{tex.sprint( | ||
9880 | ekdosis.getprevprevlnlab())}-b}} | ||
9881 | = | ||
9882 | 0 | ||
9883 | \else | ||
9884 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9885 | ekdosis.getlnlab())}-b}}% | ||
9886 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9887 | \fi | ||
9888 | \fi | ||
9889 | \else | ||
9890 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9891 | ekdosis.getlnlab())}-b}}% | ||
9892 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9893 | \fi | ||
9894 | %%% end | ||
9895 | \else | 9902 | \else |
9896 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9903 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9897 | ekdosis.getlnlab())}-b}}% | 9904 | ekdosis.getlnlab())}-b}}% |
9898 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9905 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
9899 | \fi | 9906 | \fi |
9900 | % | 9907 | \fi |
9908 | % | ||
9909 | \else | ||
9910 | \ifekd@elidednumbers | ||
9911 | \luadirect{tex.sprint(ekdosis.numrange( | ||
9912 | \luastring{\getrefnumber{\luadirect{tex.sprint( | ||
9913 | ekdosis.getlnlab())}-b}}, | ||
9914 | \luastring{\getrefnumber{\luadirect{tex.sprint( | ||
9915 | ekdosis.getlnlab())}-e}}))}% | ||
9916 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | ||
9901 | \else | 9917 | \else |
9902 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9918 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9903 | ekdosis.getlnlab())}-b}}% | 9919 | ekdosis.getlnlab())}-b}}--% |
9904 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9920 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9921 | ekdosis.getlnlab())}-e}}% | ||
9922 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | ||
9905 | \fi | 9923 | \fi |
9906 | \fi | 9924 | \fi |
9907 | % | 9925 | \else % now if the lemma breaks across pages |
9908 | \else | 9926 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} |
9909 | \ifekd@elidednumbers | 9927 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( |
9910 | \luadirect{tex.sprint(ekdosis.numrange( | 9928 | ekdosis.getlnlab())}-b}}--% |
9911 | \luastring{\getrefnumber{\luadirect{tex.sprint( | 9929 | \LRnum{\getpagerefnumber{\luadirect{tex.sprint( |
9912 | ekdosis.getlnlab())}-b}}, | 9930 | ekdosis.getlnlab())}-e}}.% |
9913 | \luastring{\getrefnumber{\luadirect{tex.sprint( | 9931 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9914 | ekdosis.getlnlab())}-e}}))}% | 9932 | ekdosis.getlnlab())}-e}}% |
9915 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9933 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos |
9916 | \else | 9934 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( |
9917 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9935 | ekdosis.getlnlab())}-b}}--% |
9918 | ekdosis.getlnlab())}-b}}--% | 9936 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9919 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | 9937 | ekdosis.getlnlab())}-e}}% |
9920 | ekdosis.getlnlab())}-e}}% | 9938 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos |
9921 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | ||
9922 | \fi | ||
9923 | \fi | 9939 | \fi |
9924 | \else | 9940 | \ifekdl@forcenum |
9925 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} | 9941 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
9926 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | 9942 | ekdosis.getlnlab())}-b}}% |
9927 | ekdosis.getlnlab())}-b}}--% | 9943 | \unexpanded\expandafter{\ekd@postrefnum}% force the no |
9928 | \LRnum{\getpagerefnumber{\luadirect{tex.sprint( | 9944 | \fi |
9929 | ekdosis.getlnlab())}-e}}.% | 9945 | }% |
9930 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9931 | ekdosis.getlnlab())}-e}}% | ||
9932 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos | ||
9933 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9934 | ekdosis.getlnlab())}-b}}--% | ||
9935 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9936 | ekdosis.getlnlab())}-e}}% | ||
9937 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos | ||
9938 | \fi | ||
9939 | \ifekdl@forcenum | ||
9940 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9941 | ekdosis.getlnlab())}-b}}% | ||
9942 | \unexpanded\expandafter{\ekd@postrefnum}% force the no | ||
9943 | \fi | ||
9944 | \egroup | ||
9945 | } | 9946 | } |
9946 | % \end{macrocode} | 9947 | % \end{macrocode} |
9947 | % Define keys to be used by the optional arguments of \cs{lem} and | 9948 | % Define keys to be used by the optional arguments of \cs{lem} and |
@@ -10086,6 +10087,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10086 | \fi | 10087 | \fi |
10087 | \fi% | 10088 | \fi% |
10088 | \unless\ifekdl@nonum\current@ref\fi | 10089 | \unless\ifekdl@nonum\current@ref\fi |
10090 | \relax | ||
10089 | }%\hskip .25em}% | 10091 | }%\hskip .25em}% |
10090 | \else% | 10092 | \else% |
10091 | \ifbool{al@rlmode}{% | 10093 | \ifbool{al@rlmode}{% |