summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/strc-flt.mkvi
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/strc-flt.mkvi')
-rw-r--r--Master/texmf-dist/tex/context/base/strc-flt.mkvi46
1 files changed, 40 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/strc-flt.mkvi b/Master/texmf-dist/tex/context/base/strc-flt.mkvi
index 4fe1a96ff33..8122b953e2f 100644
--- a/Master/texmf-dist/tex/context/base/strc-flt.mkvi
+++ b/Master/texmf-dist/tex/context/base/strc-flt.mkvi
@@ -26,7 +26,11 @@
%
% todo: move variables from page-flt to strc-flt
%
+% todo: p_name etc
+%
% todo: less globals!
+%
+% todo: do all options in lua
%D This module is being converted into a mkvi one.
%D
@@ -464,6 +468,13 @@
% place
+\def\strc_floats_analyze_location
+ {% moved here, will do more
+ \let\floatlabel \empty
+ \let\floatcolumn\empty
+ \let\floatrow \empty
+ \setfloatmethodvariables\floatlocation}
+
\unexpanded\def\strc_floats_place#tag%
{\flushnotes
\page_otr_command_flush_side_floats % here !
@@ -477,6 +488,7 @@
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations
\fi
+ \strc_floats_analyze_location
\setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=]%
\doifinsetelse\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal}
@@ -522,6 +534,7 @@
\ifsecondargument
\setupcurrentfloatuserdata[#userdata]%
\fi
+ \strc_floats_analyze_location
\doifinsetelse\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal
\bgroup
\ignorespaces}
@@ -778,6 +791,18 @@
\newconditional\usesamefloatnumber
+% \startplacefigure[location=here,reference=first, title=first, group=alpha,groupsuffix=.a]
+% \externalfigure[dummy][height=2cm]
+% \stopplacefigure
+% \startplacefigure[location=here,reference=second,title=second,group=alpha,groupsuffix=.b]
+% \externalfigure[dummy][height=2cm]
+% \stopplacefigure
+%
+% uses:
+
+\def\strc_floats_group_index
+ {\numexpr\ctxcommand{listgroupindex("\currentfloat","\currentfloatgroup")}\relax}
+
\def\strc_floats_place_packaged_boxes
{\expandafter\strc_floats_place_packaged_boxes_indeed\expandafter{\m_strc_floats_saved_userdata}}
@@ -789,10 +814,19 @@
\globallet\currentfloatsynchronize\relax
\else
\edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}%
- % *1* as an alternative we could set counter parameters here if needed
+ \edef\currentfloatgroup {\floatcaptionparameter\c!group}%
\ifnofloatnumber \else \ifnofloatcaption \else
- \strc_counters_increment\currentfloatcounter
+ \ifx\currentfloatgroup\empty
+ % independent
+ \strc_counters_increment\currentfloatcounter
+ \else\ifcase\strc_floats_group_index
+ % first in group
+ \strc_counters_increment\currentfloatcounter
+ \else
+ % next in group
+ \fi \fi
\fi \fi
+ % *1* as an alternative we could set counter parameters here if needed
\strc_counters_register_component
\s!float
\setupcurrentfloatcaption
@@ -1969,10 +2003,10 @@
\def\strc_floats_get_box
{\ifvisible
- \let\floatlabel \empty
- \let\floatcolumn\empty
- \let\floatrow \empty
- \setfloatmethodvariables\floatlocation
+% \let\floatlabel \empty
+% \let\floatcolumn\empty
+% \let\floatrow \empty
+% \setfloatmethodvariables\floatlocation
% todo: nog algemeen otr
\ifdefined\OTRSETsetpreferedcolumnslot
\OTRSETsetpreferedcolumnslot\floatcolumn\floatrow