diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv | 86 |
1 files changed, 12 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv index e7070cfdec1..8661fe57a5e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/pack-lyr.mkiv @@ -293,8 +293,8 @@ {\setbox\b_layers\emptybox \d_pack_layers_x_position\p_pack_layers_sx\dimexpr\p_pack_layers_x\relax \d_pack_layers_y_position\p_pack_layers_sy\dimexpr\p_pack_layers_y\relax - \glet\lastlayerxpos\!!zeropoint - \glet\lastlayerypos\!!zeropoint + \globallet\lastlayerxpos\!!zeropoint + \globallet\lastlayerypos\!!zeropoint \doifinset\v!bottom\p_pack_layers_corner\pack_layers_set_bottom_positions \doifinset\v!right \p_pack_layers_corner\pack_layers_set_right_positions \doifinset\v!middle\p_pack_layers_corner\pack_layers_set_middle_positions @@ -540,85 +540,24 @@ % todo: pass the layer with \lastnamedcs -% \def\pack_layers_flush_single -% {\startoverlay -% {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}% -% {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\fi}% -% \stopoverlay} -% -% \def\pack_layers_flush_double#1% -% {\startoverlay -% {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}% -% {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount {\currentlayer:\the\realpageno}\fi}% -% {\ifcsname\??layerbox#1\currentlayer \endcsname\pack_layers_flush_indeed\plusone {#1\currentlayer }\fi}% -% {\ifcsname\??layerbox#1\currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{#1\currentlayer:\the\realpageno}\fi}% -% \stopoverlay} - -% optimized: - \def\pack_layers_flush_single - {\ifcsname\??layerbox\currentlayer\endcsname - \ifvoid\lastnamedcs - \ifcsname\??layerbox\currentlayer:\the\realpageno\endcsname - \ifvoid\lastnamedcs\else - \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\b_layer_two - \fi - \fi - \else - \chardef\b_layer_one\lastnamedcs - \ifcsname\??layerbox\currentlayer:\the\realpageno\endcsname - \ifvoid\lastnamedcs\else - \chardef\b_layer_two\lastnamedcs - \startoverlay - {\pack_layers_flush_indeed\plusone \currentlayer \b_layer_one}% - {\pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\b_layer_two}% - \stopoverlay - \fi - \else - \pack_layers_flush_indeed\plusone\currentlayer\b_layer_one - \fi - \fi - \else\ifcsname\??layerbox\currentlayer:\the\realpageno\endcsname - \ifvoid\lastnamedcs - % nothing - \else - \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\b_layer_two - \fi - \fi\fi} - -% less optimized: + {\startoverlay + {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}% + {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\fi}% + \stopoverlay} \def\pack_layers_flush_double#1% {\startoverlay - {\ifcsname\??layerbox\currentlayer\endcsname - \ifvoid\lastnamedcss\else \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\plusone\currentlayer\b_layer_two - \fi - \fi}% - {\ifcsname\??layerbox\currentlayer:\the\realpageno\endcsname - \ifvoid\lastnamedcss\else \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\zerocount{\currentlayer:\the\realpageno}\b_layer_two - \fi - \fi}% - {\ifcsname\??layerbox#1\currentlayer\endcsname - \ifvoid\lastnamedcss\else \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\plusone{#1\currentlayer}\b_layer_two - \fi - \fi}% - {\ifcsname\??layerbox#1\currentlayer:\the\realpageno\endcsname - \ifvoid\lastnamedcss\else \chardef\b_layer_two\lastnamedcs - \pack_layers_flush_indeed\zerocount{#1\currentlayer:\the\realpageno}\b_layer_two - \fi - \fi}% + {\ifcsname\??layerbox \currentlayer \endcsname\pack_layers_flush_indeed\plusone \currentlayer \fi}% + {\ifcsname\??layerbox \currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount {\currentlayer:\the\realpageno}\fi}% + {\ifcsname\??layerbox#1\currentlayer \endcsname\pack_layers_flush_indeed\plusone {#1\currentlayer }\fi}% + {\ifcsname\??layerbox#1\currentlayer:\the\realpageno\endcsname\pack_layers_flush_indeed\zerocount{#1\currentlayer:\the\realpageno}\fi}% \stopoverlay} \let\pack_layers_top_fill \relax \let\pack_layers_bottom_fill\vss -%def\pack_layers_flush_indeed#1#2% -\def\pack_layers_flush_indeed#1#2#3% +\def\pack_layers_flush_indeed#1#2% quite core, so optimized {\begingroup % already grouped \offinterlineskip \edef\p_pack_layers_preset{\layerparameter\c!preset}% @@ -648,8 +587,7 @@ \fi\fi \fi \fi - %chardef\b_layers\csname\??layerbox#2\endcsname % trick - \let\b_layers#3% + \chardef\b_layers\csname\??layerbox#2\endcsname % trick % we need to copy in order to retain the negative offsets for a next % stage of additions, i.e. llx/lly accumulate in repeat mode and the % compensation may differ each flush depending on added content |