summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
committerNorbert Preining <preining@logic.at>2019-02-24 15:12:57 +0000
commit1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch)
tree04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
parenteb80ce7b34f59896a1dfee5ca422495394d6677f (diff)
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b. git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
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.mkvi312
1 files changed, 141 insertions, 171 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 02f6fd75343..632c6768694 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
+++ b/Master/texmf-dist/tex/context/base/mkiv/strc-flt.mkvi
@@ -61,11 +61,9 @@
\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
@@ -99,8 +97,6 @@
\c!textcolor=,
\c!align=,
\c!number=\v!yes,
- \c!offset=\v!overlay,
- \c!frame=\v!off,
% \c!expansion=,
% \c!prefix=,
% \c!prefixconnector=,
@@ -114,7 +110,7 @@
% \c!stopper=,
\c!suffixseparator=, % currently rather hard coded
\c!suffix=\floatcaptionsuffix,
- \c!distance=\emwidth, % plus .5\emwidth minus .25\emwidth
+ \c!distance=\emwidth,
\c!conversion=\v!numbers,
\c!maxwidth=\hsize,
\c!command=]
@@ -175,11 +171,6 @@
\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}
@@ -216,7 +207,6 @@
\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]%
@@ -225,7 +215,6 @@
\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]%
@@ -235,7 +224,6 @@
\def\strc_floats_define_c[#1][#2]% name names
{\registerfloatcaptioncounter{#1}%
\definefloatcaption[#1]%
- \definefloatframed[#1]%
\definecounter[#1]%
\definelist[#1]%
\presetlabeltext[#1=\Word{#1}~]%
@@ -344,7 +332,6 @@
\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
@@ -374,26 +361,8 @@
\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]
@@ -456,7 +425,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 \glet\strc_float_realpage\realpageno % \realfolio
+%D \globallet\strc_float_realpage\realpageno % \realfolio
%D \fi}
%D \stoptyping
%D
@@ -475,7 +444,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
- \glet\strc_float_realpage\realpageno % \realfolio
+ \globallet\strc_float_realpage\realpageno % \realfolio
\fi}
%D test case:
@@ -513,7 +482,7 @@
\donothing
{\writestatus\m!floatblocks{unknown float type '\currentfloat'}%
\let\currentfloat\v!figure}% also a hack
- \glet\lastplacedfloat\currentfloat
+ \global\let\lastplacedfloat\currentfloat
\let\m_strc_floats_saved_userdata\empty
\let\currentfloatcaption\currentfloat}
@@ -524,8 +493,8 @@
{\global\emptyfloatcaptionfalse
\global\nofloatcaptionfalse
\global\nofloatnumberfalse
- \glet\askedfloatmethod \empty
- \glet\askedfloatoptions\empty}
+ \global\let\askedfloatmethod \empty
+ \global\let\askedfloatoptions\empty}
% place
@@ -536,13 +505,10 @@
\let\floatlocationmethod\empty
\def\strc_floats_analyze_location
- {% more will be moved here
+ {% moved here, will do more
\let\floatlabel \empty
\let\floatcolumn\empty
\let\floatrow \empty
- %
- \edef\floatcaptionlocation{\floatcaptionparameter\c!location}%
- %
\setfloatmethodvariables\floatlocation}
\unexpanded\def\strc_floats_place#tag%
@@ -605,49 +571,25 @@
\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
- % 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
+ \edef\savedfloatlocation{\floatcaptionparameter\c!location}%
\setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}%
\setexpandedfloatcaptionparameter\c!bottomoffset{\floatparameter\c!bottomoffset}%
\setexpandedfloatcaptionparameter\c!freeregion {\floatparameter\c!freeregion}%
- \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
+ \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}%
\edef\floatlocation{\floatcaptionparameter\c!location}%
+ \setfloatcaptionparameter\c!location{\savedfloatlocation}% not expanded
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}%
\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
- %
+ \ifsecondargument
+ \setupcurrentfloatuserdata[#userdata]%
+ \fi
\strc_floats_analyze_location
\doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal
\bgroup
@@ -986,9 +928,9 @@
\def\strc_floats_place_packaged_boxes_indeed#userdata%
{\bgroup
\ifconditional\usesamefloatnumber
- \glet\currentfloatnumber \previousfloatnumber
- \glet\currentfloatattribute \empty
- \glet\currentfloatsynchronize\relax
+ \globallet\currentfloatnumber \previousfloatnumber
+ \globallet\currentfloatattribute \empty
+ \globallet\currentfloatsynchronize\relax
\else
\edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}%
\edef\currentfloatgroup {\floatcaptionparameter\c!group}%
@@ -1020,10 +962,10 @@
\s!hasnumber=\ifnofloatnumber \v!no\else\v!yes\fi,%
\s!hastitle=\ifemptyfloatcaption\v!no\else\v!yes\fi]%
[#userdata]%
- \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
+ \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
\fi
%
\global\setfalse\usesamefloatnumber % one shot
@@ -1249,11 +1191,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 % why is this
+\def\strc_floats_realign_floatbox_horizontal_two
{\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}}
@@ -1394,7 +1336,7 @@
%
% \def\strc_floats_align_content_indeed
% {\alignstrutmode\zerocount
-% \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+% \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
% {\shiftalignedline
% {\floatparameter\c!leftmargin }{\floatparameter\c!rightmargin}%
% {\floatparameter\c!innermargin}{\floatparameter\c!outermargin}}%
@@ -1429,7 +1371,7 @@
\def\strc_floats_align_content_indeed
{\alignstrutmode\zerocount
\ifx\forcedfloatmethod\v!local \else
- \doifnotcommon\floatcaptionlocation{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
+ \doifnotcommon{\floatcaptionparameter\c!location}{\v!outermargin,\v!innermargin,\v!leftmargin,\v!rightmargin}
{\strc_floats_shift_indeed\floatparameter}%
\expandafter\strc_floats_align_indeed
\fi}
@@ -1520,21 +1462,23 @@
\fi\fi
\strc_floats_align_content{\copy\b_strc_floats_content}}}
-
\def\strc_floats_prepare_page_caption
- {\edef\p_strc_floats_caption_width {\floatcaptionparameter\c!width}%
+ {\edef\p_strc_floats_caption_location{\floatcaptionparameter\c!location}%
+ \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
- \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}%
+ \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
\dostoptagged}
\def\strc_floats_prepare_page_caption_top_bottom
@@ -1564,11 +1508,7 @@
\fi}
\def\strc_floats_caption_set_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]}
+ {\normalexpanded{\setupalign[\v!reset,\p_strc_floats_caption_align]}}
\def\strc_floats_prepare_side_auto_caption
{\scratchdimen\dimexpr\hsize-\wd\b_strc_floats_content-\floatparameter\c!margin\relax
@@ -1700,7 +1640,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\floatcaptionlocation
+ \doifnotinset\v!hang{\floatcaptionparameter\c!location}
{\dotfskip{\floatcaptionparameter\c!distance}}%
\vbox to\d_strc_float_temp_height{#1}}}
@@ -1708,7 +1648,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\floatcaptionlocation
+ \doifnotinset\v!hang{\floatcaptionparameter\c!location}
{\dotfskip{\floatcaptionparameter\c!distance}}%
\box\b_strc_floats_content}}
@@ -1778,7 +1718,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[\floatcaptionlocation]
+ \processallactionsinset[\floatcaptionparameter\c!location]
[ \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,
@@ -1796,7 +1736,7 @@
\let\next\strc_floats_build_box_high
\else
\let\next\strc_floats_build_box_middle
- \processallactionsinset[\floatcaptionlocation]
+ \processallactionsinset[\floatcaptionparameter\c!location]
[ \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]%
@@ -1809,13 +1749,14 @@
\def\strc_floats_flush_left_caption_hang
{\hsmash{\llap{\box\b_strc_floats_caption\dotfskip{\floatcaptionparameter\c!distance}}}}
-\def\strc_floats_flush_caption_hang
- {\doifelseinset\v!righthanging\floatcaptionlocation
+\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
{\strc_floats_flush_right_caption_hang}
- {\doifelseinset\v!lefthanging\floatcaptionlocation
+ {\doifelseinset\v!lefthanging\p_strc_floats_caption_location
{\strc_floats_flush_left_caption_hang}
- {\doifelseinset\v!hang\floatcaptionlocation
- {\doifelseinset\v!outer\floatcaptionlocation
+ {\doifelseinset\v!hang\p_strc_floats_caption_location
+ {\doifelseinset\v!outer\p_strc_floats_caption_location
{\doifelserightpagefloat{\strc_floats_flush_right_caption_hang}{\strc_floats_flush_left_caption_hang}}
{\doifelseinset\v!right\floatcaptiondirectives
{\strc_floats_flush_right_caption_hang}
@@ -1893,7 +1834,6 @@
{\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
@@ -1905,13 +1845,12 @@
\strc_floats_align_content{\box\b_strc_floats_content}%
\fi}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
- \vpack to \noflines\lineheight{\unvbox\scratchbox}}
+ \vbox to \noflines\lineheight{\unvbox\scratchbox}} % \vpack ?
\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
@@ -1923,7 +1862,7 @@
\strc_floats_locate_text_float{\box\b_strc_floats_caption}%
\fi}%
\getnoflines{\dimexpr\htdp\scratchbox-10\scaledpoint\relax}% get rid of inaccuracy
- \vpack to \noflines\lineheight{\unvbox\scratchbox}}
+ \vbox to \noflines\lineheight{\unvbox\scratchbox}} % \vpack ?
\def\strc_floats_build_box_top_stack_stretch
{\dp\b_strc_floats_caption\strutdepth
@@ -1933,7 +1872,6 @@
\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
@@ -1947,17 +1885,16 @@
\def\strc_floats_build_box_bottom_stack_stretch
{\dp\b_strc_floats_caption\strutdepth
- \setbox\scratchbox\vpack
- {\strc_floats_align_content{\copy\b_strc_floats_content}%
+ \setbox\scratchbox\vbox % pack ?
+ {\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}%
@@ -1969,14 +1906,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!lines=>\let\next\strc_floats_build_box_top_stack_stretch]% was \v!grid but interfered
+ \v!stretch=>\let\next\strc_floats_build_box_top_stack_stretch]%
\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!lines=>\let\next\strc_floats_build_box_bottom_stack_stretch]% was \v!grid but interfered
+ \v!stretch=>\let\next\strc_floats_build_box_bottom_stack_stretch]%
\next}
\def\strc_floats_relocate_caption_right#1{\strc_floats_align_caption{\hbox to \d_strc_float_temp_width{\hss#1}}}
@@ -1984,50 +1921,23 @@
\unexpanded\def\installfloatboxbuilder#1#2{\setvalue{\??floatbuilder#1}{#2}}
+\let\strc_floats_mark_box_as_free\relax
+
\def\strc_floats_build_box
- {\strc_floats_build_box_before
- \global\setbox\floatbox\vbox % pack ? probably not
+ {\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\v!bottom % for Alan
+ \let\floatcaptionarrangement\s!default
\processcommacommand[\floatcaptionparameter\c!location]\strc_floats_build_box_step
\ifcsname\??floatbuilder\floatcaptionarrangement\endcsname
\lastnamedcs
\else
\strc_floats_build_box_default
\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}}}
+ \fi}}
% special purpose: used in floatcombinations
@@ -2044,7 +1954,7 @@
\vpack to \onepoint{\box\b_strc_floats_caption}}
\def\strc_floats_build_box_separate_split#1%
- {\setbox\scratchbox\vbox\bgroup
+ {\setbox\scratchbox\vbox{%
\setbox\scratchbox\vpack{#1}%
\unvbox\scratchbox\relax
\setbox\scratchbox\lastbox
@@ -2055,20 +1965,13 @@
\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
- \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}}
+ \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}%
+ }}
% \def\strc_floats_build_box_step#1%
% {\doifdefined{\??floatbuilder#1}{\def\floatcaptionarrangement{#1}\quitcommalist}}
@@ -2202,9 +2105,8 @@
\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
@@ -2393,8 +2295,6 @@
\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
@@ -2430,6 +2330,76 @@
\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}