diff options
author | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
commit | 1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch) | |
tree | 04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv | |
parent | eb80ce7b34f59896a1dfee5ca422495394d6677f (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/pack-rul.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv | 190 |
1 files changed, 65 insertions, 125 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv index 3d03942aab2..c208baaf014 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv @@ -18,7 +18,7 @@ %D packaging and expansion we also keep tracing reasonable. For instance, multiple %D stacked backgrounds can slow down a run if not optimized this way. -\registerctxluafile{pack-rul}{optimize} +\registerctxluafile{pack-rul}{} \unprotect @@ -141,7 +141,6 @@ \setupframed [\c!width=\v!fit, \c!height=\v!broad, - %\c!minheight=\zeropoint, %\c!lines=, \c!offset=.25\exheight, % \defaultframeoffset \c!empty=\v!no, @@ -240,6 +239,7 @@ \let\p_framed_backgroundcolor \empty \let\p_framed_framecolor \empty \let\p_framed_component \empty +\let\p_framed_region \empty \let\p_framed_background \empty \let\p_framed_rulethickness \empty \let\p_framed_foregroundcolor \empty @@ -443,8 +443,6 @@ \newdimen\d_overlay_offset \newdimen\d_overlay_linewidth -\let\m_overlay_region\empty - % expandable ... in a future version the space will go (in my one can use Overlay*) \def\overlaywidth {\the\d_overlay_width \space} % We preset the variables @@ -452,7 +450,6 @@ \def\overlaydepth {\the\d_overlay_depth \space} % values. \def\overlayoffset {\the\d_overlay_offset \space} % of the frame can be (are) \def\overlaylinewidth {\the\d_overlay_linewidth\space} % set somewhere else. -\def\overlayregion {\m_overlay_region} % public but kind of protected @@ -556,36 +553,40 @@ \def\pack_framed_process_background_indeed_internal#1% % : in name {\bgroup - \setbox\b_framed_extra\hpack\bgroup - \ifzeropt\framedbackgroundoffset\else + \setbox\b_framed_extra\hbox{%\bgroup + \ifzeropt\framedbackgroundoffset + %\csname\??overlaybuiltin\m_framed_background\endcsname + #1 + \else \kern-\framedbackgroundoffset + %\hbox{\csname\??overlaybuiltin\m_framed_background\endcsname}% + \hbox{#1}% \fi - \hbox\bgroup#1\egroup - \egroup + }%\egroup \wd\b_framed_extra\zeropoint \ht\b_framed_extra\framedbackgroundheight \dp\b_framed_extra\framedbackgrounddepth \box\b_framed_extra \egroup} -% \def\pack_framed_process_background_indeed_external#1% -% {\pack_framed_overlay_initialize -% \bgroup -% \setbox\b_framed_extra\hpack\bgroup -% \ifzeropt\framedbackgroundoffset\else -% \kern-\framedbackgroundoffset -% \fi -% \hbox\bgroup#1\egroup -% \egroup -% \wd\b_framed_extra\zeropoint -% \ht\b_framed_extra\framedbackgroundheight -% \dp\b_framed_extra\framedbackgrounddepth -% \box\b_framed_extra -% \egroup} - -\def\pack_framed_process_background_indeed_external +\def\pack_framed_process_background_indeed_external#1% {\pack_framed_overlay_initialize - \pack_framed_process_background_indeed_internal} + \bgroup + \setbox\b_framed_extra\hbox{%\bgroup + \ifzeropt\framedbackgroundoffset + %\csname\??overlay\m_framed_background\endcsname + #1% + \else + \kern-\framedbackgroundoffset + %\hbox{\csname\??overlay\m_framed_background\endcsname}% + \hbox{#1}% + \fi + }%\egroup + \wd\b_framed_extra\zeropoint + \ht\b_framed_extra\framedbackgroundheight + \dp\b_framed_extra\framedbackgrounddepth + \box\b_framed_extra + \egroup} \def\pack_framed_process_backgrounds#1,#2% #2 gobbles spaces (we could avoid one catch if we have nextbackground) {\edef\m_framed_background{#1}% @@ -605,23 +606,15 @@ \def\pack_framed_background_box_content% fuzzy but needed hack, this \vss, otherwise {\vpack to \framedbackgroundheight{\vss\box\b_framed_normal\vss}} % vertical shift \backgroundheight -\def\pack_framed_set_region % experiment - {\ifx\m_overlay_region\v!yes - \edef\m_overlay_region{\reservedautoregiontag}% - \fi} - -% \def\pack_framed_add_region % experiment -% {\ifx\m_overlay_region\v!yes -% \anch_mark_region_box\b_framed_normal -% \else -% \anch_mark_tagged_box\b_framed_normal\m_overlay_region -% \fi} - \def\pack_framed_add_region % experiment - {\anch_mark_tagged_box\b_framed_normal\m_overlay_region} + {\ifx\p_framed_region\v!yes + \anch_mark_region_box\b_framed_normal + \else + \anch_mark_tagged_box\b_framed_normal\p_framed_region + \fi} \def\pack_framed_add_background - {\setbox\b_framed_normal\hpack % was vbox % see also *1* + {\setbox\b_framed_normal\hbox % was vbox % see also *1* {%\pack_framed_forgetall % can be relaxed \boxmaxdepth\maxdimen \framedbackgroundoffset\d_framed_backgroundoffset @@ -638,7 +631,7 @@ \setlayoutcomponentattribute{\v!background:\p_framed_component}% \fi \let\foregroundbox\pack_framed_background_box_content - \hpack \layoutcomponentboxattribute to \framedbackgroundwidth\bgroup % width in case 'foreground' is used as overlay + \hbox \layoutcomponentboxattribute to \framedbackgroundwidth\bgroup % width in case 'foreground' is used as overlay \the\everybackgroundbox % moved \expandafter\pack_framed_process_backgrounds\p_framed_background,\s!unknown,\relax % hm, messy .. look into it \box\b_framed_normal @@ -699,10 +692,10 @@ \scratchdimen\zeropoint \fi \edef\overlaylinecolor{\framedparameter\c!framecolor}% twice, also in background - \setbox\b_framed_extra\hpack + \setbox\b_framed_extra\hbox {\kern-\d_framed_frameoffset \raise\scratchdimen - \hpack{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}% + \hbox{\ifx\overlaylinecolor\empty\else\dousecolorparameter\overlaylinecolor\fi\pack_framed_stroked_box}}% \wd\b_framed_extra\wd\b_framed_normal \ht\b_framed_extra\ht\b_framed_normal \dp\b_framed_extra\dp\b_framed_normal @@ -731,45 +724,26 @@ % \dp\scratchbox\d_framed_target_dp % \box\scratchbox} -\def\pack_framed_stroked_box_normal_opened +\def\pack_framed_stroked_box_normal {\setbox\scratchbox\vpack \bgroup - \csname\??framedtop\p_framed_frame\framedparameter\c!topframe\endcsname + \csname \??framedtop\p_framed_frame\framedparameter\c!topframe \endcsname \nointerlineskip % new (needed for fences) - \hpack \bgroup - \csname\??framedleft\p_framed_frame\framedparameter\c!leftframe\endcsname + \hbox \bgroup + \csname \??framedleft\p_framed_frame\framedparameter\c!leftframe \endcsname \novrule \s!width \d_framed_target_wd \s!height\d_framed_target_ht \s!depth \d_framed_target_dp - \csname\??framedright\p_framed_frame\framedparameter\c!rightframe\endcsname + \csname \??framedright\p_framed_frame\framedparameter\c!rightframe \endcsname \egroup \nointerlineskip % new (needed for fences) - \csname\??framedbottom\p_framed_frame\framedparameter\c!bottomframe\endcsname + \csname \??framedbottom\p_framed_frame\framedparameter\c!bottomframe\endcsname \egroup \wd\scratchbox\d_framed_target_wd \ht\scratchbox\d_framed_target_ht \dp\scratchbox\d_framed_target_dp \box\scratchbox} -\def\pack_framed_stroked_box_normal_closed - {\hpack\bgroup - \scratchdimen.5\d_framed_linewidth - \hskip\scratchdimen - \clf_framedoutline - \dimexpr\d_framed_target_wd-\d_framed_linewidth\relax - \dimexpr\d_framed_target_ht-\scratchdimen\relax - \dimexpr\d_framed_target_dp-\scratchdimen\relax - \d_framed_linewidth - \relax - \egroup} - -\def\pack_framed_stroked_box_normal - {\ifx\p_framed_frame\v!closed - \pack_framed_stroked_box_normal_closed - \else - \pack_framed_stroked_box_normal_opened - \fi} - \def\pack_framed_t_rule{\hrule\s!height\d_framed_linewidth\kern-\d_framed_linewidth} \def\pack_framed_b_rule{\kern-\d_framed_linewidth\hrule\s!height\d_framed_linewidth} \def\pack_framed_r_rule{\kern-\d_framed_linewidth\vrule\s!width\d_framed_linewidth} @@ -862,7 +836,7 @@ %D for passing this identifier between brackets lays in the mere fact that this way %D we can use the optional argument grabbers. -\def\defaultframeoffset{.25\exheight} +\def\defaultframeoffset{.25ex} \installcorenamespace{regularframedlevel} @@ -1025,11 +999,9 @@ \edef\currentframed{#1}% \pack_framed_initialize \setbox\b_framed_normal\hbox{#4}% - \iftrialtypesetting \else - \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else - \pack_framed_set_region - \fi + \edef\p_framed_region{\framedparameter\c!region}% + \ifx\p_framed_region\v!yes % maybe later named + \pack_framed_add_region \fi \setupcurrentframed[#3]% \edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds @@ -1056,11 +1028,6 @@ \pack_framed_add_background \fi \pack_framed_restore_depth - \iftrialtypesetting \else - \ifx\m_overlay_region\empty\else - \pack_framed_add_region - \fi - \fi \box\b_framed_normal \egroup} @@ -1069,9 +1036,9 @@ \unexpanded\def\pack_framed_process_box_indeed#1#2% component box (assumes parameters set and grouped usage) {\setbox\b_framed_normal\box#2% could actually be \let\b_framed_normal#2 - \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else - \pack_framed_set_region + \edef\p_framed_region{\framedparameter\c!region}% + \ifx\p_framed_region\empty\else + \pack_framed_add_region \fi \edef\p_framed_rulethickness{\framedparameter\c!rulethickness}% also used in backgrounds \d_framed_frameoffset\framedparameter\c!frameoffset\relax % also used in backgrounds @@ -1094,9 +1061,6 @@ \edef\p_framed_component{#1}% \pack_framed_add_background \fi - \ifx\m_overlay_region\empty\else - \pack_framed_add_region - \fi \box\b_framed_normal \egroup} @@ -1638,13 +1602,6 @@ \fi \ifconditional\c_framed_has_height \ht\b_framed_normal\d_framed_height - \else - \edef\p_framed_minheight{\framedparameter\c!minheight}% - \ifx\p_framed_minheight\empty \else - \ifdim\ht\b_framed_normal<\p_framed_minheight - \ht\b_framed_normal\p_framed_minheight - \fi - \fi \fi \edef\p_framed_empty{\framedparameter\c!empty}% \ifx\p_framed_empty\v!yes @@ -1652,9 +1609,9 @@ \fi \pack_framed_stop_orientation % moved here at 2014-05-25 \iftrialtypesetting \else - \edef\m_overlay_region{\framedparameter\c!region}% - \ifx\m_overlay_region\empty\else - \pack_framed_set_region + \edef\p_framed_region{\framedparameter\c!region}% + \ifx\p_framed_region\empty\else + \pack_framed_add_region \fi \fi \d_framed_applied_offset @@ -1692,11 +1649,6 @@ \fi \fi \pack_framed_locator_after\p_framed_location - \iftrialtypesetting \else - \ifx\m_overlay_region\empty\else - \pack_framed_add_region - \fi - \fi \box\b_framed_normal \global\frameddimensionstate % global so to be used directly afterwards ! \ifconditional\c_framed_has_width @@ -2251,7 +2203,7 @@ \ignorespaces} \def\dododoformatonelinerbox - {\hpack to \hsize % was \hbox + {\hbox to \hsize % maybe \hpack {\ifcase\raggedstatus\or\hss\or\hss \fi \unhbox\nextbox \removeunwantedspaces \ifcase\raggedstatus\or \or\hss\or\hss\fi}% @@ -2372,7 +2324,7 @@ \doformatonelinerbox} \def\pack_framed_format_format_vsize - {\vbox to \d_framed_height % no vpack .. maybe grid + {\vbox to \d_framed_height \bgroup \let\postprocessframebox\relax % \pack_framed_forgetall @@ -2599,9 +2551,9 @@ \par \kern-\d_framed_linewidth \dontleavehmode - \hpack to \zeropoint{\hss\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth}% + \hpack to \zeropoint{\normalhss\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth}% \hfill - \hpack to \zeropoint{\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth\hss}% + \hpack to \zeropoint{\vrule\s!height\d_framed_linewidth\s!depth\zeropoint\s!width\scratchwidth\normalhss}% \par \nointerlineskip \kern\scratchoffset @@ -2840,7 +2792,7 @@ \csname\??framedtextlocation\framedtextparameter\c!location\endcsname \resetframedtextparameter\c!location \pack_framed_text_check - \setbox\b_framed_normal\vbox % \vpack + \setbox\b_framed_normal\vbox \startboxedcontent \hsize\localhsize % \insidefloattrue % ? better @@ -3117,7 +3069,7 @@ \fi} \def\pack_framed_start_content_indeed - {\setbox\b_framed_normal\hpack\bgroup + {\setbox\b_framed_normal\hbox\bgroup % maybe \hpack \setlocalhsize \hsize\localhsize \scratchleftoffset \framedcontentparameter\c!leftoffset \relax @@ -3127,16 +3079,16 @@ \advance\hsize\dimexpr-\scratchleftoffset-\scratchrightoffset \relax \advance\vsize\dimexpr-\scratchtopoffset -\scratchbottomoffset\relax \kern\scratchleftoffset - \vpack\bgroup + \vbox\bgroup \vskip\scratchtopoffset - \vbox\bgroup - \forgetall - \blank[\v!disable]} + \vbox\bgroup + \forgetall + \blank[\v!disable]} \def\pack_framed_stop_content_indeed - {\removelastskip - \egroup - \vskip\scratchbottomoffset + {\removelastskip + \egroup + \vskip\scratchbottomoffset \egroup \kern\scratchrightoffset \egroup @@ -3180,16 +3132,4 @@ \let\themaxboxwidth\clf_themaxboxwidth -%D New: slow but ok for most cases: - -\unexpanded\def\doifelseframed#1% - {\ifcase\numexpr\zerocount - \immediateassignment\edef\tempstring{#1\c!frame }\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!topframe }\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!bottomframe}\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!leftframe }\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!rightframe }\ifx\tempstring\v!on +\plusone\fi - \immediateassignment\edef\tempstring{#1\c!background }\ifx\tempstring\empty\else+\plusone\fi - \relax\expandafter\secondoftwoarguments\else\expandafter\firstoftwoarguments\fi} - \protect \endinput |