diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi | 312 |
1 files changed, 171 insertions, 141 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi index 632c6768694..02f6fd75343 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi @@ -61,9 +61,11 @@ \installcorenamespace{float} \installcorenamespace{floatbuilder} \installcorenamespace{floatcaption} +\installcorenamespace{floatframed} \installframedcommandhandler \??float {float} \??float \installframedcommandhandler \??floatcaption {floatcaption} \??floatcaption +\installframedcommandhandler \??floatframed {floatframed} \??floatframed \let\setupfloats \setupfloat \let\setupcaption \setupfloatcaption @@ -97,6 +99,8 @@ \c!textcolor=, \c!align=, \c!number=\v!yes, + \c!offset=\v!overlay, + \c!frame=\v!off, % \c!expansion=, % \c!prefix=, % \c!prefixconnector=, @@ -110,7 +114,7 @@ % \c!stopper=, \c!suffixseparator=, % currently rather hard coded \c!suffix=\floatcaptionsuffix, - \c!distance=\emwidth, + \c!distance=\emwidth, % plus .5\emwidth minus .25\emwidth \c!conversion=\v!numbers, \c!maxwidth=\hsize, \c!command=] @@ -171,6 +175,11 @@ \c!sidethreshold=.5\strutdp, % set to "old" to check with old method \c!numbering=\v!yes] +\setupfloatframed + [\c!frame=\v!off, + \c!offset=\v!overlay, + \c!strut=\v!no] + %D Individial settings: \installcounterassociation{floatcaption} @@ -207,6 +216,7 @@ \def\strc_floats_define_a[#1][#2][#3]% name names parent {\definefloatcaption[#1][#3]% + \definefloatframed[#1][#3]% \definecounter[#1][#3]% \definelist[#1][#3]% \copylabeltext[#1=#3]% @@ -215,6 +225,7 @@ \def\strc_floats_define_b[#1][#2][#3]% name parent settings {\definefloatcaption[#1][#2]% + \definefloatframed[#1][#2]% \definecounter[#1][#2]% \definelist[#1][#2]% \copylabeltext[#1=#2]% @@ -224,6 +235,7 @@ \def\strc_floats_define_c[#1][#2]% name names {\registerfloatcaptioncounter{#1}% \definefloatcaption[#1]% + \definefloatframed[#1]% \definecounter[#1]% \definelist[#1]% \presetlabeltext[#1=\Word{#1}~]% @@ -332,6 +344,7 @@ \def\strc_floats_make_complete_caption {\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}% + \strc_floats_make_complete_caption_before \synchronizedisplaydirection % temp hack, till we have a proper model \noindent \gdef\lastcaptiontag{\strut\thecurrentfloatnumber}% was xdef ... needs checking @@ -361,8 +374,26 @@ \thecurrentfloatcaption\endgraf \fi \endgroup + \strc_floats_make_complete_caption_after \doifsomething{\floatcaptionparameter\c!spaceafter}{\blank[\floatcaptionparameter\c!spaceafter]}} +%let\strc_floats_make_complete_caption_before\relax +\let\strc_floats_make_complete_caption_after \relax + +\def\strc_floats_make_complete_caption_before + {\doifelseframed\floatcaptionparameter\strc_floats_make_complete_caption_before_indeed\relax} + +\def\strc_floats_make_complete_caption_before_indeed + {\edef\m_strc_align{\floatcaptionparameter\c!align}% + \edef\m_strc_strut{\floatcaptionparameter\c!strut}% + \letfloatcaptionparameter\c!align\v!normal + \letfloatcaptionparameter\c!strut\v!no + \inheritedfloatcaptionframed + \bgroup + \letfloatcaptionparameter\c!align\m_strc_align + \letfloatcaptionparameter\c!strut\m_strc_strut + \let\strc_floats_make_complete_caption_after\egroup} + % \definefloat [figure-1] [figure] % \definefloat [figure-2] [figure] % \setupfloat [figure-1] [location=left,leftmargin=10mm] @@ -425,7 +456,7 @@ %D {\global\advance\c_strc_floats_n\plusone %D \xdef\strc_float_realpage{\datasetvariable\s!float{\number\c_strc_floats_n}\s!page}% %D \ifx\strc_float_realpage\empty -%D \globallet\strc_float_realpage\realpageno % \realfolio +%D \glet\strc_float_realpage\realpageno % \realfolio %D \fi} %D \stoptyping %D @@ -444,7 +475,7 @@ {\global\advance\c_strc_floats_n\plusone \xdef\strc_float_realpage{\pagestaterealpage\s!float{\number\c_strc_floats_n}}% \ifx\strc_float_realpage\empty - \globallet\strc_float_realpage\realpageno % \realfolio + \glet\strc_float_realpage\realpageno % \realfolio \fi} %D test case: @@ -482,7 +513,7 @@ \donothing {\writestatus\m!floatblocks{unknown float type '\currentfloat'}% \let\currentfloat\v!figure}% also a hack - \global\let\lastplacedfloat\currentfloat + \glet\lastplacedfloat\currentfloat \let\m_strc_floats_saved_userdata\empty \let\currentfloatcaption\currentfloat} @@ -493,8 +524,8 @@ {\global\emptyfloatcaptionfalse \global\nofloatcaptionfalse \global\nofloatnumberfalse - \global\let\askedfloatmethod \empty - \global\let\askedfloatoptions\empty} + \glet\askedfloatmethod \empty + \glet\askedfloatoptions\empty} % place @@ -505,10 +536,13 @@ \let\floatlocationmethod\empty \def\strc_floats_analyze_location - {% moved here, will do more + {% more will be moved here \let\floatlabel \empty \let\floatcolumn\empty \let\floatrow \empty + % + \edef\floatcaptionlocation{\floatcaptionparameter\c!location}% + % \setfloatmethodvariables\floatlocation} \unexpanded\def\strc_floats_place#tag% @@ -571,25 +605,49 @@ \strc_floats_set_current_tag{#tag}% \dodoubleempty\strc_floats_start_place_indeed} +%D We abuse the settings to pick up some float parameters too which makes it +%D messy. + \def\strc_floats_start_place_indeed[#settings][#userdata]% {\strc_floats_reset_variables - \edef\savedfloatlocation{\floatcaptionparameter\c!location}% + % save + \edef\m_location {\floatcaptionparameter\c!location}% + \edef\m_topoffset {\floatcaptionparameter\c!topoffset}% + \edef\m_bottomoffset{\floatcaptionparameter\c!bottomoffset}% + \edef\m_freeregion {\floatcaptionparameter\c!freeregion}% + % preset + \letfloatcaptionparameter \c!location \empty \setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}% \setexpandedfloatcaptionparameter\c!bottomoffset{\floatparameter\c!bottomoffset}% \setexpandedfloatcaptionparameter\c!freeregion {\floatparameter\c!freeregion}% - \setupcurrentfloatcaption[\c!location=,\c!reference=,\c!title=,\c!marking=,\c!list=,\c!bookmark=,#settings]% - \setexpandedfloatparameter\c!topoffset {\floatcaptionparameter\c!topoffset}% - \setexpandedfloatparameter\c!bottomoffset{\floatcaptionparameter\c!bottomoffset}% - \setexpandedfloatparameter\c!freeregion {\floatcaptionparameter\c!freeregion}% - \def\m_strc_floats_saved_userdata{#2}% + \letfloatcaptionparameter \c!reference \empty + \letfloatcaptionparameter \c!title \empty + \letfloatcaptionparameter \c!marking \empty + \letfloatcaptionparameter \c!list \empty + \letfloatcaptionparameter \c!bookmark \empty + % pickup + \setupcurrentfloatcaption[#settings]% + \ifsecondargument + \setupcurrentfloatuserdata[#userdata]% + \def\m_strc_floats_saved_userdata{#userdata}% + \else + \let\m_strc_floats_saved_userdata\empty + \fi + % check \edef\floatlocation{\floatcaptionparameter\c!location}% - \setfloatcaptionparameter\c!location{\savedfloatlocation}% not expanded \ifx\floatlocation\empty \edef\floatlocation{\floatparameter\c!default}% \fi - \ifsecondargument - \setupcurrentfloatuserdata[#userdata]% - \fi + % inherit + \setexpandedfloatparameter\c!topoffset {\floatcaptionparameter\c!topoffset}% + \setexpandedfloatparameter\c!bottomoffset{\floatcaptionparameter\c!bottomoffset}% + \setexpandedfloatparameter\c!freeregion {\floatcaptionparameter\c!freeregion}% + % restore + \letfloatcaptionparameter\c!location \m_location + \letfloatcaptionparameter\c!topoffset \m_topoffset + \letfloatcaptionparameter\c!bottomoffset\m_bottomoffset + \letfloatcaptionparameter\c!freeregion \m_freeregion + % \strc_floats_analyze_location \doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal \bgroup @@ -928,9 +986,9 @@ \def\strc_floats_place_packaged_boxes_indeed#userdata% {\bgroup \ifconditional\usesamefloatnumber - \globallet\currentfloatnumber \previousfloatnumber - \globallet\currentfloatattribute \empty - \globallet\currentfloatsynchronize\relax + \glet\currentfloatnumber \previousfloatnumber + \glet\currentfloatattribute \empty + \glet\currentfloatsynchronize\relax \else \edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}% \edef\currentfloatgroup {\floatcaptionparameter\c!group}% @@ -962,10 +1020,10 @@ \s!hasnumber=\ifnofloatnumber \v!no\else\v!yes\fi,% \s!hastitle=\ifemptyfloatcaption\v!no\else\v!yes\fi]% [#userdata]% - \globallet\previousfloatnumber \m_strc_counters_last_registered_index - \globallet\currentfloatnumber \m_strc_counters_last_registered_index - \globallet\currentfloatattribute \m_strc_counters_last_registered_attribute - \globallet\currentfloatsynchronize\m_strc_counters_last_registered_synchronize + \glet\previousfloatnumber \m_strc_counters_last_registered_index + \glet\currentfloatnumber \m_strc_counters_last_registered_index + \glet\currentfloatattribute \m_strc_counters_last_registered_attribute + \glet\currentfloatsynchronize\m_strc_counters_last_registered_synchronize \fi % \global\setfalse\usesamefloatnumber % one shot @@ -1191,11 +1249,11 @@ {\global\setbox\floatbox\hpack to \scratchwidth {\doifnotinset\v!right\floatlocation\hss \box\floatbox - \doifnotinset\v!left \floatlocation\hss}} + \doifnotinset\v!left\floatlocation\hss}} -\def\strc_floats_realign_floatbox_horizontal_two +\def\strc_floats_realign_floatbox_horizontal_two % why is this {\global\setbox\floatbox\hpack to \scratchwidth - {\doifnot{\floatparameter\c!location}\v!left \hss + {\doifnot{\floatparameter\c!location}\v!left\hss \box\floatbox \doifnot{\floatparameter\c!location}\v!right\hss}} @@ -1336,7 +1394,7 @@ % % \def\strc_floats_align_content_indeed % {\alignstrutmode\zerocount -% \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin} +% \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin} % {\shiftalignedline % {\floatparameter\c!leftmargin }{\floatparameter\c!rightmargin}% % {\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}% @@ -1371,7 +1429,7 @@ \def\strc_floats_align_content_indeed {\alignstrutmode\zerocount \ifx\forcedfloatmethod\v!local \else - \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin} + \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin} {\strc_floats_shift_indeed\floatparameter}% \expandafter\strc_floats_align_indeed \fi} @@ -1462,23 +1520,21 @@ \fi\fi \strc_floats_align_content{\copy\b_strc_floats_content}}} + \def\strc_floats_prepare_page_caption - {\edef\p_strc_floats_caption_location{\floatcaptionparameter\c!location}% - \edef\p_strc_floats_caption_width {\floatcaptionparameter\c!width}% + {\edef\p_strc_floats_caption_width {\floatcaptionparameter\c!width}% \edef\p_strc_floats_caption_minwidth{\floatcaptionparameter\c!minwidth}% \edef\p_strc_floats_caption_align {\floatcaptionparameter\c!align}% \dostarttagged\t!floatcaption\empty - \ifx\p_strc_floats_caption_location\v!top - \strc_floats_prepare_page_caption_top_bottom - \else\ifx\p_strc_floats_caption_location\v!bottom - \strc_floats_prepare_page_caption_top_bottom - \else\ifx\p_strc_floats_caption_width\v!fit - \strc_floats_prepare_side_auto_caption - \else\ifx\p_strc_floats_caption_width\v!max - \strc_floats_prepare_side_auto_caption - \else - \strc_floats_prepare_side_width_caption - \fi\fi\fi\fi + \doifcommonelse\floatcaptionlocation{\v!top,\v!bottom} + {\strc_floats_prepare_page_caption_top_bottom} + {\ifx\p_strc_floats_caption_width\v!fit + \strc_floats_prepare_side_auto_caption + \else\ifx\p_strc_floats_caption_width\v!max + \strc_floats_prepare_side_auto_caption + \else + \strc_floats_prepare_side_width_caption + \fi\fi}% \dostoptagged} \def\strc_floats_prepare_page_caption_top_bottom @@ -1508,7 +1564,11 @@ \fi} \def\strc_floats_caption_set_align - {\normalexpanded{\setupalign[\v!reset,\p_strc_floats_caption_align]}} + {\edef\m_align{\v!reset\ifx\p_strc_floats_caption_align\empty\else,\fi\p_strc_floats_caption_align}% + \doifinset\v!tolerant \floatcaptionlocation{\edef\m_align{\m_align,\v!tolerant}}% + \doifinset\v!verytolerant\floatcaptionlocation{\edef\m_align{\m_align,\v!verytolerant}}% + \doifinset\v!stretch \floatcaptionlocation{\edef\m_align{\m_align,\v!stretch}}% + \setupalign[\m_align]} \def\strc_floats_prepare_side_auto_caption {\scratchdimen\dimexpr\hsize-\wd\b_strc_floats_content-\floatparameter\c!margin\relax @@ -1640,7 +1700,7 @@ {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi % skip, no pack {\d_strc_float_temp_height\ht\b_strc_floats_content \box\b_strc_floats_content - \doifnotinset\v!hang{\floatcaptionparameter\c!location} + \doifnotinset\v!hang\floatcaptionlocation {\dotfskip{\floatcaptionparameter\c!distance}}% \vbox to\d_strc_float_temp_height{#1}}} @@ -1648,7 +1708,7 @@ {\ifconditional\c_strc_floats_par_float \hbox \else \expandafter \strc_floats_align_content \fi % skip, no pack {\d_strc_float_temp_height\ht\b_strc_floats_content \vbox to\d_strc_float_temp_height{#1}% - \doifnotinset\v!hang{\floatcaptionparameter\c!location} + \doifnotinset\v!hang\floatcaptionlocation {\dotfskip{\floatcaptionparameter\c!distance}}% \box\b_strc_floats_content}} @@ -1718,7 +1778,7 @@ \def\strc_floats_build_box_next % beware, we first check on left/rightmargin because there can be left/right also {\let\next\strc_floats_build_box_next_left - \processallactionsinset[\floatcaptionparameter\c!location] + \processallactionsinset[\floatcaptionlocation] [ \v!outermargin=>\let\next\strc_floats_build_box_next_outer_margin, \v!innermargin=>\let\next\strc_floats_build_box_next_inner_margin, \v!leftmargin=>\let\next\strc_floats_build_box_next_left_margin, @@ -1736,7 +1796,7 @@ \let\next\strc_floats_build_box_high \else \let\next\strc_floats_build_box_middle - \processallactionsinset[\floatcaptionparameter\c!location] + \processallactionsinset[\floatcaptionlocation] [ \v!low=>\let\next\strc_floats_build_box_low, \v!middle=>\let\next\strc_floats_build_box_middle, \v!high=>\let\next\strc_floats_build_box_high]% @@ -1749,14 +1809,13 @@ \def\strc_floats_flush_left_caption_hang {\hsmash{\llap{\box\b_strc_floats_caption\dotfskip{\floatcaptionparameter\c!distance}}}} -\def\strc_floats_flush_caption_hang % expanded can go - {\edef\p_strc_floats_caption_location{\floatcaptionparameter\c!location}% - \doifelseinset\v!righthanging\p_strc_floats_caption_location +\def\strc_floats_flush_caption_hang + {\doifelseinset\v!righthanging\floatcaptionlocation {\strc_floats_flush_right_caption_hang} - {\doifelseinset\v!lefthanging\p_strc_floats_caption_location + {\doifelseinset\v!lefthanging\floatcaptionlocation {\strc_floats_flush_left_caption_hang} - {\doifelseinset\v!hang\p_strc_floats_caption_location - {\doifelseinset\v!outer\p_strc_floats_caption_location + {\doifelseinset\v!hang\floatcaptionlocation + {\doifelseinset\v!outer\floatcaptionlocation {\doifelserightpagefloat{\strc_floats_flush_right_caption_hang}{\strc_floats_flush_left_caption_hang}} {\doifelseinset\v!right\floatcaptiondirectives {\strc_floats_flush_right_caption_hang} @@ -1834,6 +1893,7 @@ {\dp\b_strc_floats_caption\strutdepth \setbox\scratchbox\vbox {\d_strc_float_temp_width\wd\b_strc_floats_content + \hsize\d_strc_float_temp_width \ifconditional\c_strc_floats_par_float \strc_floats_locate_side_float{\box\b_strc_floats_caption}% \vss\strc_floats_between_stack @@ -1845,12 +1905,13 @@ \strc_floats_align_content{\box\b_strc_floats_content}% \fi}% \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy - \vbox to \noflines\lineheight{\unvbox\scratchbox}} % \vpack ? + \vpack to \noflines\lineheight{\unvbox\scratchbox}} \def\strc_floats_build_box_bottom_stack_grid {\dp\b_strc_floats_caption\strutdepth \setbox\scratchbox\vbox {\d_strc_float_temp_width\wd\b_strc_floats_content + \hsize\d_strc_float_temp_width \ifconditional\c_strc_floats_par_float \hpack{\box\b_strc_floats_content}% \vss\strc_floats_between_stack @@ -1862,7 +1923,7 @@ \strc_floats_locate_text_float{\box\b_strc_floats_caption}% \fi}% \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy - \vbox to \noflines\lineheight{\unvbox\scratchbox}} % \vpack ? + \vpack to \noflines\lineheight{\unvbox\scratchbox}} \def\strc_floats_build_box_top_stack_stretch {\dp\b_strc_floats_caption\strutdepth @@ -1872,6 +1933,7 @@ \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy \vbox to \noflines\lineheight % pack ? {\d_strc_float_temp_width\wd\b_strc_floats_content + \hsize\d_strc_float_temp_width \ifconditional\c_strc_floats_par_float \strc_floats_locate_side_float{\box\b_strc_floats_caption}% \vss\strc_floats_between_stack\vss @@ -1885,16 +1947,17 @@ \def\strc_floats_build_box_bottom_stack_stretch {\dp\b_strc_floats_caption\strutdepth - \setbox\scratchbox\vbox % pack ? - {\strc_floats_align_content{\copy\b_strc_floats_content }% + \setbox\scratchbox\vpack + {\strc_floats_align_content{\copy\b_strc_floats_content}% \strc_floats_align_caption{\copy\b_strc_floats_caption}}% \getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy \vbox to \noflines\lineheight {\d_strc_float_temp_width\wd\b_strc_floats_content + \hsize\d_strc_float_temp_width \ifconditional\c_strc_floats_par_float \hpack{\box\b_strc_floats_content}% \vss\strc_floats_between_stack\vss - \strc_floats_locate_side_float{\box\b_strc_floats_caption} + \strc_floats_locate_side_float{\box\b_strc_floats_caption}% \else \page_otr_command_set_float_hsize \strc_floats_align_content{\box\b_strc_floats_content}% @@ -1906,14 +1969,14 @@ {\let\next\strc_floats_build_box_top_stack_normal \processfirstactioninset[\floatcaptionparameter\c!location] [ \v!grid=>\let\next\strc_floats_build_box_top_stack_grid, - \v!stretch=>\let\next\strc_floats_build_box_top_stack_stretch]% + \v!lines=>\let\next\strc_floats_build_box_top_stack_stretch]% was \v!grid but interfered \next} \def\strc_floats_build_box_bottom {\let\next\strc_floats_build_box_bottom_stack_normal \processfirstactioninset[\floatcaptionparameter\c!location] [ \v!grid=>\let\next\strc_floats_build_box_bottom_stack_grid, - \v!stretch=>\let\next\strc_floats_build_box_bottom_stack_stretch]% + \v!lines=>\let\next\strc_floats_build_box_bottom_stack_stretch]% was \v!grid but interfered \next} \def\strc_floats_relocate_caption_right#1{\strc_floats_align_caption{\hbox to \d_strc_float_temp_width{\hss#1}}} @@ -1921,23 +1984,50 @@ \unexpanded\def\installfloatboxbuilder#1#2{\setvalue{\??floatbuilder#1}{#2}} -\let\strc_floats_mark_box_as_free\relax - \def\strc_floats_build_box - {\global\setbox\floatbox\vbox % pack ? probably not + {\strc_floats_build_box_before + \global\setbox\floatbox\vbox % pack ? probably not {\strc_floats_set_local_hsize \forgetall \ifconditional\c_floats_store_minimal_package \strc_floats_build_box_separate_make \else - \let\floatcaptionarrangement\s!default + % \let\floatcaptionarrangement\s!default + \let\floatcaptionarrangement\v!bottom % for Alan \processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step \ifcsname\??floatbuilder\floatcaptionarrangement\endcsname \lastnamedcs \else \strc_floats_build_box_default \fi - \fi}} + \fi}% + \strc_floats_build_box_after} + +% \let\strc_floats_build_box_before\relax +% \let\strc_floats_build_box_after \relax + +\def\strc_floats_build_box_before + {\let\currentfloatframed\currentfloat + \floatwidth\wd + \ifdim\wd\b_strc_floats_content>\wd\b_strc_floats_caption + \b_strc_floats_content\else\b_strc_floats_caption + \fi} + +\def\strc_floats_build_box_after + {\doifelseframed\floatframedparameter\strc_floats_build_box_after_indeed\relax} + +\def\strc_floats_build_box_after_indeed + {\global\setbox\floatbox\hpack + {\edef\m_width{\floatframedparameter\c!width}% + \ifx\m_width\v!fit + \let\m_width\floatwidth + \else\ifx\m_width\v!broad + \let\m_width\v!fit + \fi\fi + \letfloatframedparameter\c!strut\v!no + \letfloatframedparameter\c!width\m_width + \inheritedfloatframedframed + {\box\floatbox}}} % special purpose: used in floatcombinations @@ -1954,7 +2044,7 @@ \vpack to \onepoint{\box\b_strc_floats_caption}} \def\strc_floats_build_box_separate_split#1% - {\setbox\scratchbox\vbox{% + {\setbox\scratchbox\vbox\bgroup \setbox\scratchbox\vpack{#1}% \unvbox\scratchbox\relax \setbox\scratchbox\lastbox @@ -1965,13 +2055,20 @@ \unvbox\scratchbox \setbox\scratchbox\lastbox % \exitloop - % \fi}% + % \fi + %}% \splittopskip\zeropoint \global\setbox\b_strc_floats_separate_content\vsplit\scratchbox to \onepoint \global\setbox\b_strc_floats_separate_caption\vsplit\scratchbox to \onepoint - \global\setbox\b_strc_floats_separate_content\vpack{\unvbox\b_strc_floats_separate_content\setbox0\lastbox\unvbox0}% - \global\setbox\b_strc_floats_separate_caption\tpack{\unvbox\b_strc_floats_separate_caption\setbox0\lastbox\unvbox0}% - }} + \egroup + \global\setbox\b_strc_floats_separate_content\vpack + {\unvbox\b_strc_floats_separate_content + \setbox\scratchbox\lastbox + \unvbox\scratchbox}% + \global\setbox\b_strc_floats_separate_caption\tpack + {\unvbox\b_strc_floats_separate_caption + \setbox\scratchbox\lastbox + \unvbox\scratchbox}} % \def\strc_floats_build_box_step#1% % {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}} @@ -2105,8 +2202,9 @@ \def\strc_floats_prepare_side_caption_fit % or center when smaller {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax - \setbox\b_strc_floats_caption\vbox + \setbox\b_strc_floats_caption\vbox {\forgetall % needed? + \strc_floats_caption_set_align \hsize\wd\b_strc_floats_content \strc_floats_make_complete_caption}% \else @@ -2295,6 +2393,8 @@ \definesystemconstant{fxbt} \definesystemconstant{fixd} +% can move to page-one: + \installfloatmethod \s!singlecolumn \v!here \page_one_place_float_here \installfloatmethod \s!singlecolumn \v!force \page_one_place_float_force \installfloatmethod \s!singlecolumn \v!left \page_one_place_float_left @@ -2330,76 +2430,6 @@ \installfloatmethod \s!singlecolumn \s!fxbt \page_one_place_float_bottom \installfloatmethod \s!singlecolumn \s!fixd \page_one_place_float_force -\installfloatmethod \s!multicolumn \v!here \page_mul_place_float_here -\installfloatmethod \s!multicolumn \v!force \page_mul_place_float_force -%installfloatmethod \s!multicolumn \v!left -%installfloatmethod \s!multicolumn \v!right -%installfloatmethod \s!multicolumn \v!text -\installfloatmethod \s!multicolumn \v!top \page_mul_place_float_top -\installfloatmethod \s!multicolumn \v!bottom \page_mul_place_float_bottom -%installfloatmethod \s!multicolumn \v!auto -%installfloatmethod \s!multicolumn \v!margin -%installfloatmethod \s!multicolumn \v!opposite -%installfloatmethod \s!multicolumn \v!page -%installfloatmethod \s!multicolumn \v!leftpage -%installfloatmethod \s!multicolumn \v!rightpage -%installfloatmethod \s!multicolumn \v!inmargin -%installfloatmethod \s!multicolumn \v!inleft -%installfloatmethod \s!multicolumn \v!inright -%installfloatmethod \s!multicolumn \v!leftmargin -%installfloatmethod \s!multicolumn \v!rightmargin -%installfloatmethod \s!multicolumn \v!leftedge -%installfloatmethod \s!multicolumn \v!rightedge -%installfloatmethod \s!multicolumn \v!somewhere -%installfloatmethod \s!multicolumn \v!backspace -%installfloatmethod \s!multicolumn \v!cutspace -%installfloatmethod \s!multicolumn \s!tblr -%installfloatmethod \s!multicolumn \s!lrtb -%installfloatmethod \s!multicolumn \s!tbrl -%installfloatmethod \s!multicolumn \s!rltb -%installfloatmethod \s!multicolumn \s!fxtb -%installfloatmethod \s!multicolumn \s!btlr -%installfloatmethod \s!multicolumn \s!lrbt -%installfloatmethod \s!multicolumn \s!btrl -%installfloatmethod \s!multicolumn \s!rlbt -%installfloatmethod \s!multicolumn \s!fxbt -%installfloatmethod \s!multicolumn \s!fixd - -\installfloatmethod \s!columnset \v!here \page_set_place_float_here -\installfloatmethod \s!columnset \v!force \page_set_place_float_force -%installfloatmethod \s!columnset \v!left -%installfloatmethod \s!columnset \v!right -%installfloatmethod \s!columnset \v!text -\installfloatmethod \s!columnset \v!top \page_set_place_float_top -\installfloatmethod \s!columnset \v!bottom \page_set_place_float_bottom -%installfloatmethod \s!columnset \v!auto -%installfloatmethod \s!columnset \v!margin -%installfloatmethod \s!columnset \v!opposite -\installfloatmethod \s!columnset \v!page \page_set_place_float_page -%installfloatmethod \s!columnset \v!leftpage -%installfloatmethod \s!columnset \v!rightpage -%installfloatmethod \s!columnset \v!inmargin -%installfloatmethod \s!columnset \v!inleft -%installfloatmethod \s!columnset \v!inright -%installfloatmethod \s!columnset \v!leftmargin -%installfloatmethod \s!columnset \v!rightmargin -%installfloatmethod \s!columnset \v!leftedge -%installfloatmethod \s!columnset \v!rightedge -%installfloatmethod \s!columnset \v!somewhere -%installfloatmethod \s!columnset \v!backspace -%installfloatmethod \s!columnset \v!cutspace -\installfloatmethod \s!columnset \s!tblr \page_set_place_float_slot -\installfloatmethod \s!columnset \s!lrtb \page_set_place_float_slot -\installfloatmethod \s!columnset \s!tbrl \page_set_place_float_slot -\installfloatmethod \s!columnset \s!rltb \page_set_place_float_slot -\installfloatmethod \s!columnset \s!fxtb \page_set_place_float_slot -\installfloatmethod \s!columnset \s!btlr \page_set_place_float_slot -\installfloatmethod \s!columnset \s!lrbt \page_set_place_float_slot -\installfloatmethod \s!columnset \s!btrl \page_set_place_float_slot -\installfloatmethod \s!columnset \s!rlbt \page_set_place_float_slot -\installfloatmethod \s!columnset \s!fxbt \page_set_place_float_slot -\installfloatmethod \s!columnset \s!fixd \page_set_place_float_force - %D Local floats: \installcorenamespace{localfloats} |