summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-flt.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-10-28 17:20:15 +0300
committerMarius <mariausol@gmail.com>2011-10-28 17:20:15 +0300
commit9abd94c749937a2d74cbfdb6f6023fabc0a1a2db (patch)
tree37ae7843c903e23810a14065d8c4d3f562b1c790 /tex/context/base/strc-flt.mkiv
parentc0e8f19d4913755e53cfc8658cc4f91230e4d351 (diff)
downloadcontext-9abd94c749937a2d74cbfdb6f6023fabc0a1a2db.tar.gz
beta 2011.10.28 16:04
Diffstat (limited to 'tex/context/base/strc-flt.mkiv')
-rw-r--r--tex/context/base/strc-flt.mkiv156
1 files changed, 32 insertions, 124 deletions
diff --git a/tex/context/base/strc-flt.mkiv b/tex/context/base/strc-flt.mkiv
index 219ff812a..4d94018ca 100644
--- a/tex/context/base/strc-flt.mkiv
+++ b/tex/context/base/strc-flt.mkiv
@@ -238,70 +238,30 @@
%
% potential sync bug with sectionblocks, see uguide.tex
-% NOT YET REDONE ! ! ! ! !
+% begin of todo
- \unexpanded\def\placefloatcaption
- {\dodoubleempty\doplacefloatcaption}
+\unexpanded\def\placefloatcaption{\dodoubleempty\doplacefloatcaption}
+\unexpanded\def\setfloatcaption {\dodoubleempty\dodosetfloatcaption}
- \long\def\doplacefloatcaption[#1][#2]#3%
- {\setfloatcaption[#1][#2]{#3}%
- \placefloatcaptiontext[#1]%
- \placefloatcaptionreference[#1]}
+\def\doplacefloatcaption[#1][#2]#3{[not supported]}
+\def\dodosetfloatcaption[#1][#2]#3{[not supported]} % \dosetfloatcaption already in use
- \unexpanded\def\setfloatcaption % \dosetfloatcaption already in use
- {\dodoubleempty\dodosetfloatcaption} % beware, name clash
+\unexpanded\def\placefloatcaptiontext [#1]{[not suported yet]}
+\unexpanded\def\placefloatcaptionnumber [#1]{[not suported yet]}
+\unexpanded\def\placefloatcaptionreference[#1]{[not suported yet]}
- \long\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
- {\ifnofloatnumber % also handle trialtypesetting
- \letgvalue{@fl@r@#1}\relax
- \letgvalue{@fl@t@#1}\relax
- \else
- \preparefloatnumber{#1}%
- \letgvalue{@fl@n@#1}\composedsectionnumber
- % indirect macro can be more efficient
- \setgvalue{@fl@r@#1}%
- {\tracefloatnumber{#1}%
- \ifconditional\retainfloatnumber\else
- % todo
- \fi
- \letgvalue{@fl@r@#1}\relax}% nils
- \setgvalue{@fl@t@#1}%
- {\preparefullnumber{\??kj#1}{\getvalue{@fl@n@#1}}\preparednumber % !!!!!!!!!!!!!!!!!!!!!!!!!!! wrong
- \begingroup
- \dosetfloatcaptionattributes\c!style\c!color
- \begingroup
- \dosetfloatcaptionattributes\c!headstyle\c!headcolor
- \labeltexts{#1}{\preparednumber}%
- \endgroup
- \begingroup
- \dosetfloatcaptionattributes\c!textstyle\c!textcolor
- \dotfskip{\floatcaptionparameter\c!distance}#3%
- \endgroup
- \endgroup}%
- \fi}
-
- \long\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
- {\letgvalue{@fl@r@#1}\relax
- \letgvalue{@fl@t@#1}\relax}
-
- \unexpanded\def\placefloatcaptiontext [#1]{\getvalue{@fl@t@#1}}
- \unexpanded\def\placefloatcaptionnumber [#1]{\getvalue{@fl@n@#1}}
- \unexpanded\def\placefloatcaptionreference[#1]{\getvalue{@fl@r@#1}}
-
- % still needed for uguide
-
- \let\placefloatlabel \placefloatcaption
- \let\placefloatlabeltext \placefloatcaptiontext
- \let\placefloatlabelreference \placefloatcaptionreference
-
-% TILL HERE
+\let\placefloatlabel \placefloatcaption
+\let\placefloatlabeltext \placefloatcaptiontext
+\let\placefloatlabelreference\placefloatcaptionreference
+
+% end of todo
\newbox\captionbox
\long\def\putcompletecaption#1#2%
{\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}%
%\floatcaptionparameter\c!before % test for side effects first
-\synchronizedisplaydirection % temp hack, till we have a proper model
+ \synchronizedisplaydirection % temp hack, till we have a proper model
\noindent
\gdef\lastcaptiontag{\strut#1}% was xdef
\begingroup
@@ -412,48 +372,6 @@
\def\tracefloatnumber#1%
{\doifnot{\rootfloatparameter\c!numbering}\v!nocheck{\tagnodelocation{\v!float\@@thenumber{#1}}}}
-\newconditional\retainfloatnumber
-
-\def\preparefloatnumber#1% use in special case see below
- {\xdef\floatcaptionnumber{#1}%
- \doifelsenodelocation{\v!float\@@thenumber{#1}}
- \donothing {\nodelocationmode\zerocount}%
- \doifelse{\rootfloatparameter\c!numbering}\v!nocheck
- {\incrementnumber[#1]%
- \makesectionnumber[#1]%
- \ifconditional\retainfloatnumber\decrementnumber[#1]\fi}
- {\ifinsidecolumns
- \nodelocationmode\zerocount
- % to be perfected:
- % \nodelocationmode\plustwo
- \fi
-% FOR THE MOMENT NOT AVAILABLE
-\nodelocationmode\zerocount
-% BUT NOT THAT HARD TO DO
- \ifcase\nodelocationmode
- \incrementnumber[#1]%
- \makesectionnumber[#1]%
- \ifconditional\retainfloatnumber\decrementnumber[#1]\fi
- \else
- % force check, so that we get a proper way-sync and
- % can use the accumulated number
- % \checknumber[#1]% \incrementnumber does this
- \incrementnumber[#1]%
- \savenumber[#1]%
- % the real work is done here
- \nextnodelocation{\v!float\@@thenumber{#1}}% better \nextfloatnumber
- \analyzenodelocation{\v!float\@@thenumber{#1}}%
- \scratchcounter\getnodelocationo{\v!float\@@thenumber{#1}}%
- \advance\scratchcounter\minusone
- % here we correct for 'per whatever handling'
- \advance\scratchcounter-\accumulatednumber[#1]%
- \setnumber[#1]\scratchcounter
- \incrementnumber[#1]%
- \makesectionnumber[#1]%
- \restorenumber[#1]%
- % now we're back to normal numbering
- \fi}}
-
%D test case:
%D
%D \starttyping
@@ -504,6 +422,7 @@
\egroup
\endgroup}
+
\def\flushfloatslist
{\v!left,\v!right,\v!inner,\v!outer,%
\v!backspace,\v!cutspace,%
@@ -534,7 +453,7 @@
\the\everyinsidefloat
\let\@@extrafloat\empty
\presetmorefloatvariables{#2}%
-\dostarttagged\t!floatcontent\empty
+ \dostarttagged\t!floatcontent\empty
\dowithnextboxcontent % better a \the\everyfloattoks
{\setlocalfloathsize
\floatparameter\c!inner
@@ -557,7 +476,7 @@
\doinhibitblank
\fi}% better move this to side floats
\vbox}
-
+
\def\xxdocompletefloat#1#2%
{\rightorleftpageaction{\let\@@extrafloat#1}{\let\@@extrafloat#2}}
@@ -567,7 +486,7 @@
\let\floatrotation\!!zerocount
-\long\def\presetfloatvariables#1#2#3#4%
+\unexpanded\def\presetfloatvariables#1#2#3#4%
{\doifcommonelse
{#2}
{\v!left,\v!right,\v!inner,\v!outer,%
@@ -623,14 +542,8 @@
{\global\nofloatnumbertrue}}%
% this has to change
\ConvertToConstant\doifelse{#4}{}
-% \ConvertToConstant\doifelse{\detokenize{#4}}{}
{\global\emptyfloatcaptiontrue}
{\global\emptyfloatcaptionfalse}%
-% \doifinsetelse\v!none{#2}
-% {\global\nofloatcaptiontrue}
-% {\ConvertToConstant\doifelse{#4}\v!none
-% {\global\nofloatcaptiontrue}
-% {\global\nofloatcaptionfalse}}%
\doifinsetelse\v!none{#2}
{\global\nofloatcaptiontrue}
{\global\nofloatcaptionfalse}%
@@ -666,7 +579,7 @@
\xdef\naturalfloatwidth {\the\wd#1}%
\xdef\naturalfloatdepth {\the\dp#1}}
-\long\def\doifelsemainfloatbody#1#2%
+\def\doifelsemainfloatbody#1#2%
{\ifinsidesplitfloat\ifconditional\splitfloatfirstdone#2\else#1\fi\else#1\fi}
% todo: optional user pars
@@ -920,7 +833,7 @@
\inheritedfloatframed{#1}%
\endgroup}
-\long\def\docomplexreserveblock[#1][#2][#3][#4]#5%
+\def\docomplexreserveblock[#1][#2][#3][#4]#5%
{\getvalue{\e!place#1}[#3][#4]{#5}{\dodocomplexreserveblock{#1}{#2}}}
\def\docomplexstartreservetextblock[#1][#2][#3][#4]%
@@ -964,16 +877,18 @@
\global#1\ht\scratchbox}}}
\def\calculatefloatskips
- {{\docalculatefloatskip\floattopskip{\rootfloatparameter\c!spacebefore}%
- \docalculatefloatskip\floatbottomskip{\rootfloatparameter\c!spaceafter}%
- \docalculatefloatskip\sidefloattopskip{\rootfloatparameter\c!sidespacebefore}%
- \docalculatefloatskip\sidefloatbottomskip{\rootfloatparameter\c!sidespaceafter}%
- \gdef\sidefloattopoffset{\openstrutdepth}% was \def
- \global\floatsideskip\rootfloatparameter\c!margin
- \global\sidefloatleftshift\floatparameter\c!leftmargindistance
- \global\sidefloatrightshift\floatparameter\c!rightmargindistance
- \global\noftopfloats\rootfloatparameter\c!ntop\relax
- \global\nofbotfloats\rootfloatparameter\c!nbottom\relax}}
+ {\begingroup
+ \docalculatefloatskip\floattopskip{\rootfloatparameter\c!spacebefore}%
+ \docalculatefloatskip\floatbottomskip{\rootfloatparameter\c!spaceafter}%
+ \docalculatefloatskip\sidefloattopskip{\rootfloatparameter\c!sidespacebefore}%
+ \docalculatefloatskip\sidefloatbottomskip{\rootfloatparameter\c!sidespaceafter}%
+ \gdef\sidefloattopoffset{\openstrutdepth}% was \def
+ \global\floatsideskip\rootfloatparameter\c!margin
+ \global\sidefloatleftshift\floatparameter\c!leftmargindistance
+ \global\sidefloatrightshift\floatparameter\c!rightmargindistance
+ \global\noftopfloats\rootfloatparameter\c!ntop\relax
+ \global\nofbotfloats\rootfloatparameter\c!nbottom\relax
+ \endgroup}
% beter de laatste skip buiten de \insert uitvoeren,
% bovendien bij volle flush onder baseline.
@@ -1820,13 +1735,6 @@
\let\floatrow \empty
\let\forcedfloatmethod\empty
-% \def\setfloatmethodvariables#1%
-% {\getfromcommalist[#1][1]%
-% \@EA\beforesplitstring\commalistelement\at:\to\floatmethod
-% \@EA\aftersplitstring \commalistelement\at:\to\floatcolumn
-% \@EA\aftersplitstring \floatcolumn\at*\to\floatrow
-% \@EA\beforesplitstring\floatcolumn\at*\to\floatcolumn}
-
\def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn
{\ctxcommand{analysefloatmethod("#1")}}