aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2021-05-24 10:20:29 +0200
committerRobert Alessi <alessi@robertalessi.net>2021-05-24 10:20:29 +0200
commitdf61c4b717995c3828019580e1da325d0870e8ca (patch)
treef43cef07d3205dbe92eaa14b9c58ef3f09fa4de2
parentbbc3c7221293fefcfb0ed8ae26da6d76b6038471 (diff)
downloadekdosis-df61c4b717995c3828019580e1da325d0870e8ca.tar.gz
added \ekdpb* which forces the page break irrespective of the values given in the arguments
-rw-r--r--ekdosis.dtx56
1 files changed, 32 insertions, 24 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 6151f86..7aa05cf 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -5277,7 +5277,8 @@ subtype="arabtex">'inna 'abI kAna mina
5277% pages may result in pages that break just after they begin. 5277% pages may result in pages that break just after they begin.
5278% 5278%
5279% \paragraph{Conditional page breaks} 5279% \paragraph{Conditional page breaks}
5280% \DescribeMacro{\ekdpb} \cs{ekdpb}\oarg{page no}\marg{line no} 5280% \DescribeMacro{\ekdpb}\DescribeMacro{\ekdpb*}
5281% \cs{ekdpb}\oarg{page no}\marg{line no}
5281% \newfeature[v1.2]\\ 5282% \newfeature[v1.2]\\
5282% One way to avoid this inconvenience is to use \cs{ekdpb} instead of 5283% One way to avoid this inconvenience is to use \cs{ekdpb} instead of
5283% the standard \cs{pagebreak} command provided by \LaTeX\ to insert 5284% the standard \cs{pagebreak} command provided by \LaTeX\ to insert
@@ -5287,7 +5288,9 @@ subtype="arabtex">'inna 'abI kAna mina
5287% the page number where the page break should occur. The value that is 5288% the page number where the page break should occur. The value that is
5288% expected is the page number as it is printed\===e.g.\ an Arabic, 5289% expected is the page number as it is printed\===e.g.\ an Arabic,
5289% Roman or alphanumeric number. If the specified conditions be not 5290% Roman or alphanumeric number. If the specified conditions be not
5290% met, then the page break is not triggered. 5291% met, then the page break is not triggered. Finally, the
5292% \enquote{starred} version of this command forces the page break,
5293% irrespective of the values specified as page or line numbers.
5291% 5294%
5292% \paragraph{Using \texttt{maxentries}} 5295% \paragraph{Using \texttt{maxentries}}
5293% Another way\---should the edition text fall into the vicious circle 5296% Another way\---should the edition text fall into the vicious circle
@@ -7675,28 +7678,33 @@ Sample text with a \textcolor{red}{word} in red.
7675% given line and optionally a given page. If the specified conditions 7678% given line and optionally a given page. If the specified conditions
7676% are met then this command triggers \cs{pagebreak}. 7679% are met then this command triggers \cs{pagebreak}.
7677% \begin{macrocode} 7680% \begin{macrocode}
7678\NewDocumentCommand{\ekdpb}{o m}{% 7681\NewDocumentCommand{\ekdpb}{s o m}{%
7679 \def\@tmpoarg{#1}% 7682 \IfBooleanTF{#1}
7680 \def\@tmpmarg{#2}% 7683 {\pagebreak}
7681 \luadirect{ekdosis.dolnlab(\luastringN{#2})}% 7684 {%
7682 \linelabel{\luadirect{tex.sprint(ekdosis.getlnlab())}}% 7685 \def\@tmpoarg{#2}%
7683 \def\tmp@ln{% 7686 \def\@tmpmarg{#3}%
7684 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}% 7687 \luadirect{ekdosis.dolnlab(\luastringN{#3})}%
7685 \def\tmp@pg{% 7688 \linelabel{\luadirect{tex.sprint(ekdosis.getlnlab())}}%
7686 \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}% 7689 \def\tmp@ln{%
7687 \IfNoValueTF{#1} 7690 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}%
7688 {\ifnum 7691 \def\tmp@pg{%
7689 \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0 7692 \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}%
7690 \pagebreak 7693 \IfNoValueTF{#2}
7691 \fi} 7694 {\ifnum
7692 {\ifnum 7695 \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0
7693 \pdf@strcmp{\@tmpoarg}{\tmp@pg} = 0 7696 \pagebreak
7694 \ifnum 7697 \fi}
7695 \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0 7698 {\ifnum
7696 \pagebreak 7699 \pdf@strcmp{\@tmpoarg}{\tmp@pg} = 0
7697 \fi 7700 \ifnum
7698 \fi 7701 \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0
7699 }\ignorespaces 7702 \pagebreak
7703 \fi
7704 \fi
7705 }%
7706 }
7707 \ignorespaces
7700} 7708}
7701% \end{macrocode} 7709% \end{macrocode}
7702% \end{macro} 7710% \end{macro}