diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-01-15 14:50:04 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-01-15 14:50:04 +0100 |
commit | 0caec226a633182402b349c3ac5b3bf9e0bc76c2 (patch) | |
tree | 30524574e0b41eb771f5f9af8cadc60354652aa3 /tex/context/base/mkxl/page-brk.mkxl | |
parent | 659b8f28e591006b6d0669c05d809d6ccf60cec0 (diff) | |
download | context-0caec226a633182402b349c3ac5b3bf9e0bc76c2.tar.gz |
2023-01-15 13:55:00
Diffstat (limited to 'tex/context/base/mkxl/page-brk.mkxl')
-rw-r--r-- | tex/context/base/mkxl/page-brk.mkxl | 13 |
1 files changed, 8 insertions, 5 deletions
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 |