diff options
Diffstat (limited to 'tex/context/base/page-one.mkiv')
-rw-r--r-- | tex/context/base/page-one.mkiv | 105 |
1 files changed, 54 insertions, 51 deletions
diff --git a/tex/context/base/page-one.mkiv b/tex/context/base/page-one.mkiv index 89fd7d4a8..025a9aa1a 100644 --- a/tex/context/base/page-one.mkiv +++ b/tex/context/base/page-one.mkiv @@ -210,7 +210,7 @@ \unexpanded\def\page_one_command_set_top_insertions {\bgroup - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \noffloatinserts\zerocount \let\totaltopinserted\!!zeropoint \page_one_command_set_top_insertions_indeed @@ -229,23 +229,23 @@ \def\page_one_command_set_top_insertions_indeed {\ifnum\noffloatinserts<\noftopfloats - \dogetfloat + \page_floats_get \page_one_prepare_top_float \ifdim\topinserted<\textheight\relax \xdef\totaltopinserted{\the\topinserted}% \page_one_insert_top_float - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \advance\noffloatinserts \plusone \else \noffloatinserts\noftopfloats\relax \fi - \dofloatflushedinfo + \page_floats_report_flushed \else - \doresavefloat + \page_floats_resave\s!text \noffloatinserts\noftopfloats\relax \fi \else - \ifsomefloatwaiting + \ifcoditional\c_page_floats_some_waiting \showmessage\m!floatblocks6{\the\noftopfloats}% \fi \let\page_one_command_set_top_insertions_indeed\relax @@ -254,7 +254,7 @@ \unexpanded\def\page_one_command_set_bottom_insertions {\bgroup - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \noffloatinserts\zerocount \page_one_command_set_bottom_insertions_indeed \fi @@ -262,7 +262,7 @@ \def\page_one_command_set_bottom_insertions_indeed {\ifnum\noffloatinserts<\nofbotfloats\relax - \dogetfloat + \page_floats_get \global\advance\botinserted \ht\floatbox\relax \global\advance\botinserted \dp\floatbox\relax \global\advance\botinserted \floattopskip\relax @@ -271,19 +271,19 @@ {\forgetall \blank[\rootfloatparameter\c!spacebefore]% \page_otr_command_flush_float_box}% - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \advance\noffloatinserts \plusone \else \noffloatinserts\nofbotfloats \fi - \dofloatflushedinfo + \page_floats_report_flushed \else - \doresavefloat + \page_floats_resave\s!text \noffloatinserts\nofbotfloats\relax \fi - \global\nofloatpermittedtrue % vgl topfloats s! + \global\settrue\c_page_floats_not_permitted % vgl topfloats s! \else - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \showmessage\m!floatblocks7{\the\nofbotfloats}% \fi \let\page_one_command_set_bottom_insertions_indeed\relax @@ -324,31 +324,31 @@ \fi \fi \global\botinserted\zeropoint - \global\nofloatpermittedfalse} + \global\setfalse\c_page_floats_not_permitted} \unexpanded\def\page_one_command_flush_floats - {\global\flushingfloatstrue - \ifsomefloatwaiting + {\global\settrue\c_page_floats_flushing + \ifconditional\c_page_floats_some_waiting \par % if kept, then option and definitely off in gridmode ! ! ! ! % \ifvmode \prevdepth\maxdimen \fi % prevents whitespace; problematic in icare tests \page_one_command_flush_floats_indeed \fi \global\savednoffloats\zerocount - \global\somefloatwaitingfalse - \global\flushingfloatsfalse} + \global\setfalse\c_page_floats_some_waiting + \global\setfalse\c_page_floats_flushing} \unexpanded\def\page_one_command_flush_float_box - {\ifcenterfloatbox \ifdim\wd\floatbox<\hsize + {\ifconditional\c_page_floats_center_box \ifdim\wd\floatbox<\hsize \global\setbox\floatbox\hbox to \hsize{\hss\box\floatbox\hss}% \fi \fi \snaptogrid\hbox{\iftestfloatbox\ruledhbox\fi{\box\floatbox}}} % was copy \def\page_one_command_flush_floats_indeed % much in common with OTRSET - {\ifsomefloatwaiting - \ifpackflushedfloats - \centerfloatboxfalse % not needed as we do call directly - \dofloatscollect\s!text{\hsize}{1em}% + {\ifconditional\c_page_floats_some_waiting + \ifconditional\c_page_floats_pack_flushed + \setfalse\c_page_floats_center_box % not needed as we do call directly + \page_floats_collect\s!text\hsize\emwidth %% no longer (interferes with footnotes): %% %% \page_one_command_set_vsize % test 2011.06.24.001 @@ -357,9 +357,9 @@ {\hfil \dorecurse\nofcollectedfloats {\ifcase\columndirection % nog document wide - \dofloatsflush\s!text{1}% + \page_floats_flush\s!text\plusone \else - \dofloatsflush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% + \page_floats_flush\s!text{\the\numexpr\nofcollectedfloats-\recurselevel+1\relax}% \fi \ifdim\wd\floatbox>\makeupwidth % \hsize \hbox to \makeupwidth{\hss\box\floatbox\hss}% @@ -371,7 +371,7 @@ \fi}% \hfil}% \else - \dogetfloat + \page_floats_get \fi % there is a chance that due to rounding errors, the float % fits on a page where it was first rejected, in which case @@ -394,8 +394,8 @@ \fi} \unexpanded\def\page_one_command_check_if_float_fits - {\ifnofloatpermitted - \global\roomforfloatfalse + {\ifconditional\c_page_floats_not_permitted + \global\setfalse\c_page_floats_room \else % new per 31/5/2004, should be an option, only one column mode \begingroup @@ -419,19 +419,19 @@ \fi \relax % really needed ! ! ! ! \ifdim\dimen0>\dimen2 - \global\roomforfloatfalse + \global\setfalse\c_page_floats_room \else - \global\roomforfloattrue + \global\settrue\c_page_floats_room \fi \fi} \unexpanded\def\page_one_command_flush_saved_floats {\global\topinserted\zeropoint \global\botinserted\zeropoint - \ifflushingfloats \else + \ifconditional\c_page_floats_flushing \else \page_one_command_set_top_insertions \page_one_command_set_bottom_insertions - \ifsomefloatwaiting + \ifconditional\c_page_floats_some_waiting \doif{\rootfloatparameter\c!cache}\v!no\page_one_command_flush_floats % could be _otr_ \else\ifconditional\c_page_margin_blocks_present \page_one_command_flush_floats @@ -443,7 +443,7 @@ \baselinecorrection %\fi \doplacefloatbox - \doinsertfloatinfo + \page_floats_report_total \dohandlenextfloatindent} \def\page_one_place_float_force @@ -469,10 +469,10 @@ %def\page_one_place_float_margin {\page_one_place_float_side_indeed\page_sides_process_float_margin\nonoindentation} % wil be overloaded \def\page_one_place_float_margin {\page_margin_blocks_process_float} -\def\page_one_place_float_page {\dofloatssavepagefloat \s!page \floatlocationmethod} -\def\page_one_place_float_leftpage {\dofloatssavepagefloat \s!leftpage \floatlocationmethod} -\def\page_one_place_float_rightpage {\dofloatssavepagefloat \s!rightpage\floatlocationmethod} -\def\page_one_place_float_somewhere {\dofloatssavesomewherefloat\s!somewhere\floatlocationmethod} +\def\page_one_place_float_page {\page_floats_save_page_float \s!page \floatlocationmethod} +\def\page_one_place_float_leftpage {\page_floats_save_page_float \s!leftpage \floatlocationmethod} +\def\page_one_place_float_rightpage {\page_floats_save_page_float \s!rightpage\floatlocationmethod} +\def\page_one_place_float_somewhere {\page_floats_save_somewhere_float\s!somewhere\floatlocationmethod} \def\page_one_place_float_here {\page_one_place_float_otherwise_here} \def\page_one_place_float_auto {\page_one_place_float_otherwise} @@ -488,38 +488,41 @@ {\doifinsetelse\v!always\floatlocationmethod {\page[\v!preference]% \page_otr_command_check_if_float_fits - \ifroomforfloat + \ifconditional\c_page_floats_room \page_one_place_float_here_indeed \else \showmessage\m!floatblocks9\empty - \doreversesavefloat + \page_floats_resave\s!text \fi} - {\ifsomefloatwaiting - \dosavefloat + {\ifconditional\c_page_floats_some_waiting + \page_floats_save\s!text + \nonoindentation \else \page[\v!preference]% \page_otr_command_check_if_float_fits - \ifroomforfloat + \ifconditional\c_page_floats_room \page_one_place_float_here_indeed \else - \dosavefloat + \page_floats_save\s!text + \nonoindentation \fi \fi}} \def\page_one_place_float_otherwise_else {\doifinsetelse\v!always\floatlocationmethod {\page_otr_command_check_if_float_fits - \ifroomforfloat + \ifconditional\c_page_floats_room \page_one_place_float_auto_top_bottom \else \showmessage\m!floatblocks9\empty - \doreversesavefloat + \page_floats_resave\s!text \fi} {\page_otr_command_check_if_float_fits - \ifroomforfloat + \ifconditional\c_page_floats_room \page_one_place_float_auto_top_bottom \else - \dosavefloat + \page_floats_save\s!text + \nonoindentation \fi}} \def\floatautofactor{.5} @@ -544,7 +547,7 @@ \def\page_one_place_float_top_indeed % maybe remember last beforeskip {\page_one_prepare_top_float \page_one_insert_top_float - \doinsertfloatinfo} + \page_floats_report_total} \def\page_one_place_float_bottom_indeed {\global\advance\botinserted\dimexpr\ht\floatbox+\dp\floatbox+\floattopskip\relax @@ -552,15 +555,15 @@ {\forgetall \blank[\rootfloatparameter\c!spacebefore]% \page_otr_command_flush_float_box}% - %\global\nofloatpermittedtrue - \doinsertfloatinfo} + %\global\settrue\c_page_floats_not_permitted + \page_floats_report_total} \def\page_one_place_float_face % links, rechts, midden, hoog, midden, laag {%\checkwaitingfloats{#1}% \startopposite \page_otr_command_flush_float_box \stopopposite - }%\doinsertfloatinfo} + }%\page_floats_report_total} \unexpanded\def\page_one_command_flush_side_floats {\page_sides_flush_floats} |