diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv b/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv index 37df4e8b17c..6ce10a8822e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/page-cst.mkiv @@ -181,6 +181,12 @@ \setupoutputroutine[\s!pagegrid]% \page_grd_command_set_hsize \page_grd_command_set_vsize + % + \columnwidth \d_page_grd_column_width + \columndistance\d_page_grd_distance + \nofcolumns \c_page_grd_n_of_left % not always ok + \textwidth \d_page_grd_column_width % kind of redundant but we had it so ... + % }%\begingroup} \unexpanded\def\stoppagegrid @@ -221,6 +227,7 @@ {\begingroup \letdummyparameter\c!c\zerocount \letdummyparameter\c!r\zerocount + \letdummyparameter\c!method\v!here \letdummyparameter\c!option\v!none \getdummyparameters[#1]% \dowithnextboxcs\page_grd_set_indeed\hbox} @@ -231,6 +238,7 @@ c \dummyparameter\c!c r \dummyparameter\c!r box \nextbox + method {\dummyparameter\c!method} option {\dummyparameter\c!option} }% \ifcase\c_page_grd_reserved_state @@ -250,6 +258,7 @@ \fi \endgroup} + \unexpanded\def\page_grd_command_set_vsize {\clf_setvsizecolumnset{\currentpagegrid}% \ifdim\d_page_grd_gap_height<\lineheight @@ -293,9 +302,9 @@ % todo line numbers and marks \unexpanded\def\page_grd_command_flush_page_column#1% - {\privatescratchcounter#1\relax + {\privatescratchcounter#1\relax % or just currentcolumn as in page-col.mkiv \clf_flushcolumnsetcolumn{\currentpagegrid}\privatescratchcounter - \anch_mark_column_box\b_page_grd_column + \anch_mark_column_box\b_page_grd_column\privatescratchcounter \page_marks_synchronize_column\c_page_grd_first_column\c_page_grd_last_column\privatescratchcounter\b_page_grd_column \ifnum\privatescratchcounter>\c_page_grd_n_of_left \advance\privatescratchcounter-\c_page_grd_n_of_left @@ -398,11 +407,13 @@ \global\setfalse\c_page_floats_flushing} \def\page_grd_command_flush_floats_indeed % much in common with OTRSET - {\wait\ifconditional\c_page_floats_some_waiting - \ifconditional\c_page_floats_pack_flushed - \page_floats_collect\s!text\hsize\emwidth + {\ifconditional\c_page_floats_some_waiting + \ifconditional\c_page_floats_compress_flushed + \page_floats_collect\s!text\hsize\d_page_floats_compress_distance \ifcase\nofcollectedfloats \page_floats_get + % \or + % \page_floats_get \else \setfalse\c_page_floats_center_box % not needed as we do call directly \global\setbox\floatbox\hbox to \hsize @@ -640,11 +651,12 @@ \edef\currentpagegridspan{#1}% \clf_sethsizecolumnspan{\currentpagegrid}\pagegridspanparameter\c!n\relax \setbox\scratchbox\hbox\bgroup\inheritedpagegridspanframed\bgroup + \def\page_grd_span_stop{\page_grd_span_stop_indeed{#2}}% \usepagegridspanstyleandcolor\c!style\c!color \pagegridspanparameter\c!before \ignorespaces} -\unexpanded\def\stoppagegridspan +\unexpanded\def\page_grd_span_stop_indeed#1% {\removeunwantedspaces \par \verticalstrut @@ -653,11 +665,14 @@ \endgraf \pagegridspanparameter\c!after \egroup\egroup - \setpagegrid{\box\scratchbox}% + \setpagegrid[#1]{\box\scratchbox}% % todo: push into slot \egroup \endgraf} +\unexpanded\def\stoppagegridspan % indirectness permits aliasing + {\page_grd_span_stop} + \def\pagegridspanwidth#1% assumes equal distances {\the\dimexpr #1\d_page_grd_column_width |