diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi index ec38a06c1d9..ebaf17ebc6d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/page-otr.mkvi @@ -19,7 +19,7 @@ % When issuing two \par\penalty-\plustenthousand's, only the first % triggers the otr. Is this an obscure feature or an optimization? -\registerctxluafile{page-otr}{1.001} +\registerctxluafile{page-otr}{} \unprotect @@ -52,7 +52,7 @@ \to \everyswitchoutputroutine \unexpanded\def\page_otr_specifics_preset#name% - {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands + {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands \ifx\page_otr_specifics_command\empty \writestatus{\currentoutputroutine}{- \expandafter\strippedcsname\csname#name\endcsname}% \expandafter\let\csname#name\endcsname\relax @@ -62,7 +62,7 @@ \fi} \unexpanded\def\page_otr_specifics_preset_normal#name% - {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands + {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands \ifx\page_otr_specifics_command\empty \expandafter\let\csname#name\endcsname\relax \else @@ -70,7 +70,7 @@ \fi} \unexpanded\def\page_otr_specifics_preset_traced#name% - {\edef\page_otr_specifics_command{\strictoutputroutineparameter{#name}}% no inheritance of commands + {\edef\page_otr_specifics_command{\directoutputroutineparameter{#name}}% no inheritance of commands \ifx\page_otr_specifics_command\empty \writestatus{\currentoutputroutine}{preset: - \expandafter\strippedcsname\csname#name\endcsname}% \expandafter\let\csname#name\endcsname\relax @@ -114,8 +114,9 @@ c:\number\mofcolumns,\space v:\the\vsize ,\space g:\the\pagegoal ,\space - t:\the\pagetotal ,\space + t:\the\pagetotal \ifdim\pagetotal>\pagegoal + ,\space d:\the\dimexpr\pagetotal-\pagegoal\relax \fi}} @@ -166,12 +167,32 @@ #content\relax \the\everyafteroutput}} +% Just as fuzzy (and in 'one' we are okay with \aftergroup anyway): +% +% \ifdefined\everybeforeoutputgroup \else \newtoks\everybeforeoutputgroup \fi +% \ifdefined\everyafteroutputgroup \else \newtoks\everyafteroutputgroup \fi +% +% \def\page_otf_set_engine_output_routine#content% +% {\the\everybeforeoutputgroup +% \global\output +% {\inotrtrue +% \the\everybeforeoutput +% #content\relax +% \the\everyafteroutput +% \aftergroup\the\aftergroup\everyafteroutputgroup}} +% +% \appendtoks +% \ifnum\c_page_postponed_mode=\plusone +% \page_postponed_blocks_flush % and then not in \page_otr_construct_and_shipout +% \fi +% \to \everyafteroutputgroup + \page_otf_set_engine_output_routine\page_otr_triggered_output_routine -\installoutputroutine\synchronizeoutput +\installoutputroutine\synchronizeoutput % use \triggerpagebuilder instead {\ifvoid\normalpagebox\else \unvbox\normalpagebox - \pagediscards + % not \pagediscards as it does more harm than good \fi} \installoutputroutine\discardpage @@ -238,7 +259,9 @@ {\writestatus\m!system{Sorry, you're not done yet, so no goodbye!}} %D We define a few constants because that (1) provides some checking -%D and (2) is handier when aligning definitions (checks nicer). +%D and (2) is handier when aligning definitions (checks nicer). Most +%D routines will use ard codes names but sometimes we want to adapt, +%D which is why we have these: \definesystemconstant{page_otr_command_routine} \definesystemconstant{page_otr_command_package_contents} @@ -259,12 +282,14 @@ \definesystemconstant{page_otr_command_flush_floats} \definesystemconstant{page_otr_command_flush_side_floats} \definesystemconstant{page_otr_command_flush_saved_floats} +\definesystemconstant{page_otr_command_flush_all_floats} \definesystemconstant{page_otr_command_flush_margin_blocks} \definesystemconstant{page_otr_command_test_column} \definesystemconstant{singlecolumn} \definesystemconstant{multicolumn} % will move \definesystemconstant{columnset} % will move +\definesystemconstant{pagecolumn} % will move \defineoutputroutinecommand [\s!page_otr_command_routine, @@ -286,6 +311,7 @@ \s!page_otr_command_flush_floats, \s!page_otr_command_flush_side_floats, \s!page_otr_command_flush_saved_floats, + \s!page_otr_command_flush_all_floats, \s!page_otr_command_flush_margin_blocks, \s!page_otr_command_test_column] |