diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-01-17 18:05:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-01-17 18:05:46 +0100 |
commit | 0cfeab235554eeee0dddd6c3f44d3939ab490ff1 (patch) | |
tree | fed70e9a3332741e5294a01197c716dff8556506 /tex/context/base/mkiv/pack-box.mkiv | |
parent | 72d161c0a522fd92f32edd3588fa126c453f4a3d (diff) | |
download | context-0cfeab235554eeee0dddd6c3f44d3939ab490ff1.tar.gz |
2017-01-17 17:43:00
Diffstat (limited to 'tex/context/base/mkiv/pack-box.mkiv')
-rw-r--r-- | tex/context/base/mkiv/pack-box.mkiv | 65 |
1 files changed, 5 insertions, 60 deletions
diff --git a/tex/context/base/mkiv/pack-box.mkiv b/tex/context/base/mkiv/pack-box.mkiv index ab9fc465e..8279fcd71 100644 --- a/tex/context/base/mkiv/pack-box.mkiv +++ b/tex/context/base/mkiv/pack-box.mkiv @@ -73,15 +73,11 @@ {\begingroup \edef\currentanchor{#1}% \ifcsname\??anchor\currentanchor\endcsname -% \expandafter\pack_anchor_predefined \expandafter\lastnamedcs \else \expandafter\pack_anchor_notdefined \fi} -% \def\pack_anchor_predefined -% {\csname\??anchor\currentanchor\endcsname} - \def\pack_anchor_notdefined {\dodoubleempty\pack_anchor_notdefined_indeed} @@ -105,67 +101,23 @@ % \definelayer[anchor] -% % old and no longer valid -% -% \def\pack_anchors_process_finish#1#2#3% brrr: we need to apply offset only once .. a bit messy -% {\checkpositionoverlays -% % for the moment we ignore the depth -% \setbox\b_pack_anchors\box\nextbox -% \d_pack_anchors_width \wd\b_pack_anchors -% \d_pack_anchors_height\ht\b_pack_anchors -% \d_pack_anchors_depth \dp\b_pack_anchors -% \setbox\scratchbox\emptyhbox -% \wd\scratchbox\d_pack_anchors_width -% \ht\scratchbox\d_pack_anchors_height -% \dp\scratchbox\d_pack_anchors_depth -% \setlayer -% [anchor]% -% [\c!width=\d_pack_anchors_width,% -% \c!height=\d_pack_anchors_height,% -% \c!offset=\zeropoint,% -% #2,#3]% -% {\setlayer[#1]{\box\b_pack_anchors}}% % #1 uses overlaywidth/height -% \framed % could be a predefined framed -% [#2,% -% \c!background=anchor,% -% \c!offset=\v!overlay,% -% \c!frame=\v!off,% -% #3]% -% {\box\scratchbox}% -% \endgroup} - -% % new and ok but not synced -% -% \def\pack_anchors_process_finish#1#2#3% brrr: we need to apply offset only once .. a bit messy -% {\checkpositionoverlays -% \setbox\b_pack_anchors\box\nextbox -% \framed % could be a predefined framed -% %[#2,\c!offset=\v!overlay,\c!frame=\v!off,#3] -% [\c!offset=\v!overlay,\c!frame=\v!off,#3] -% {\novrule % hm, not needed as we frame the size (but kind of default) -% \s!width \wd\b_pack_anchors -% \s!height\ht\b_pack_anchors -% \s!depth \dp\b_pack_anchors}% -% \setlayer[#1][#2,\c!position=\v!no]{\box\b_pack_anchors}% no position -% \endgroup} - \newcount\c_pack_anchors_n \newtoks \t_pack_anchors_flush \unexpanded\def\pack_anchors_register#1#2% {\global\advance\c_pack_anchors_n\plusone \pagereference[\v!layer:\v!anchor:\number\c_pack_anchors_n]% - \putboxincache{\v!anchor}{\number\c_pack_anchors_n}\b_pack_anchors + \putboxincache\v!anchor{\number\c_pack_anchors_n}\b_pack_anchors \doglobal\appendetoks \pack_anchors_flush{\number\c_pack_anchors_n}{#1}{#2}% \to \t_pack_anchors_flush \glet\pack_anchors_flush_all\pack_anchors_flush_all_indeed} \unexpanded\def\pack_anchors_flush#1#2#3% - {\doifelseboxincache{\v!anchor}{#1} + {\doifelseboxincache\v!anchor{#1} {\doifelsereferencefound{\v!layer:\v!anchor:#1} {\ifnum\currentreferencerealpage=\realpageno\relax - \setlayer[#2][#3,\c!position=\v!no]{\directboxfromcache{\v!anchor}{#1}}% + \setlayer[#2][#3,\c!position=\v!no]{\directboxfromcache\v!anchor{#1}}% \else \donetrue \fi @@ -189,13 +141,8 @@ \def\pack_anchors_process_finish#1#2#3% brrr: we need to apply offset only once .. a bit messy {\checkpositionoverlays \setbox\b_pack_anchors\box\nextbox - \framed % could be a predefined framed - [%#2, - %\c!background=\v!color, - %\c!backgroundcolor=darkblue, - \c!offset=\v!overlay, - \c!frame=\v!off, - #3] + \framed % could be a predefined framed but used seldom + [\c!offset=\v!overlay,\c!frame=\v!off,#3] {\pack_anchors_register{#1}{#2}% \novrule % hm, not needed as we frame the size (but kind of default) \s!width \wd\b_pack_anchors @@ -245,7 +192,6 @@ \unexpanded\def\resetcollector[#1]% {\ifcsname\??collectorbox#1\endcsname - %\global\setbox\csname\??collectorbox#1\endcsname\emptybox \global\setbox\lastnamedcs\emptybox \fi} @@ -257,7 +203,6 @@ {\edef\currentcollector{#1}% \ifcsname\??collectorbox\currentcollector\endcsname \settrue\c_pack_boxes_collector_valid_box - %\expandafter\let\expandafter\b_pack_boxes_collector\csname\??collectorbox\currentcollector\endcsname \expandafter\let\expandafter\b_pack_boxes_collector\lastnamedcs \else \setfalse\c_pack_boxes_collector_valid_box |