From 0caec226a633182402b349c3ac5b3bf9e0bc76c2 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 15 Jan 2023 14:50:04 +0100 Subject: 2023-01-15 13:55:00 --- tex/context/base/mkxl/page-brk.mkxl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tex/context/base/mkxl/page-brk.mkxl') diff --git a/tex/context/base/mkxl/page-brk.mkxl b/tex/context/base/mkxl/page-brk.mkxl index 31c7e64a4..23ffc872d 100644 --- a/tex/context/base/mkxl/page-brk.mkxl +++ b/tex/context/base/mkxl/page-brk.mkxl @@ -370,7 +370,7 @@ \relax} \permanent\tolerant\protected\def\checkpage[#1]#*[#2]% - {\relax % needed before \if + {\relax % look ahead prevention \endgraf \triggerpagebuilder \relax @@ -466,14 +466,17 @@ \definepagechecker[\s!unknown:2][\s!unknown:0][\c!method=2] \definepagechecker[\s!unknown:3][\s!unknown:0][\c!method=3] -\permanent\tolerant\protected\def\testpage [#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:1][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % -\permanent\tolerant\protected\def\testpageonly[#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:2][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % no penalties added to the mvl -\permanent\tolerant\protected\def\testpagesync[#1]#*[#2]{\normalexpanded{\checkpage[\s!unknown:3][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % force sync +% the \relax prevents premature expansion in case of lookahead + +\permanent\tolerant\protected\def\testpage [#1]#*[#2]{\relax\normalexpanded{\checkpage[\s!unknown:1][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % +\permanent\tolerant\protected\def\testpageonly[#1]#*[#2]{\relax\normalexpanded{\checkpage[\s!unknown:2][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % no penalties added to the mvl +\permanent\tolerant\protected\def\testpagesync[#1]#*[#2]{\relax\normalexpanded{\checkpage[\s!unknown:3][\c!lines=#1,\c!offset=\ifparameter#2\or#2\else\zeropoint\fi]}} % force sync %D Test column breaks. \permanent\tolerant\protected\def\testcolumn[#1]#*[#2]% - {\ifdefined\page_otr_command_test_column + {\relax % look ahead prevention + \ifdefined\page_otr_command_test_column \ifparameter#2\or \page_otr_command_test_column[#1][#2]% \else -- cgit v1.2.3