diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
commit | f210bce174e1f2f05305ab03e88e120a1cbfc4da (patch) | |
tree | 5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv | |
parent | 35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff) |
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 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 | 207 |
1 files changed, 26 insertions, 181 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..8732c7e6b7c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/pack-rul.mkiv @@ -43,24 +43,6 @@ \def\pack_framed_setup_line_width[#1]% {\assigndimension{#1}\linewidth{.2\points}{.4\points}{.6\points}} -% %D \macros -% %D {setupscreens} -% %D -% %D Sort of obsolete: -% %D -% %D \showsetup{setupscreens} -% -% \installcorenamespace{screens} -% -% \installsetuponlycommandhandler \??screens {screens} -% -% \appendtoks -% \edef\defaultbackgroundscreen{\directscreensparameter\c!screen} -% \to \everysetupscreens -% -% \setupscreens -% [\c!screen=.90] % was .95 but that's hardly visible - %D The parameter handler: \installcorenamespace{framed} @@ -105,6 +87,7 @@ \unexpanded\def\doinstallinheritedframed#1#2#3#4#5#6#7#8#9% {\def#5##1##2{\ifx##1\relax#6{##2}\else#4{##1}{##2}\fi}% %\def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\s!empty\fi}% root + %\def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\??empty\fi}% root \def#6##1{\ifcsname\??framed:##1\endcsname\??framed:##1\else\??empty\fi}% root \unexpanded\def#8% {\bgroup @@ -272,10 +255,15 @@ \fi} \def\pack_framed_filled_box_round - {\back_ovalbox - \d_framed_target_wd \d_framed_target_ht \d_framed_target_dp - \d_framed_linewidth \p_framed_backgroundradius - \zerocount \plusone {\ifx\p_framed_backgroundcorner\v!round0\else\number\p_framed_backgroundcorner\fi}} + {\raise\d_framed_target_dp\hpack{\frule + type fill + width \d_framed_target_wd + height \d_framed_target_ht + depth \d_framed_target_dp + line \d_framed_linewidth + radius \p_framed_backgroundradius\space + corner {\p_framed_backgroundcorner} + \relax}} \def\pack_framed_stroked_box {\edef\p_framed_framecorner{\framedparameter\c!framecorner}% @@ -296,10 +284,14 @@ % \pack_framed_stroked_box_normal % later \def\pack_framed_stroked_box_round - {\back_ovalbox - \d_framed_target_wd \d_framed_target_ht \d_framed_target_dp - \d_framed_linewidth \p_framed_frameradius - \plusone \zerocount {\ifx\p_framed_framecorner\v!round0\else\number\p_framed_framecorner\fi}} + {\raise\d_framed_target_dp\hpack{\frule + width \d_framed_target_wd + height \d_framed_target_ht + depth \d_framed_target_dp + line \d_framed_linewidth + radius \p_framed_frameradius\space + corner {\p_framed_framecorner} + \relax}} % a lot of weird corners % @@ -347,18 +339,6 @@ % \quad} % \stopTEXpage -%D The oval box is drawn using a special macro, depending on -%D the driver in use. - -% \def\pack_framed_background_box_gray % avoid black rules when no gray -% {\edef\p_framed_backgroundscreen{\framedparameter\c!backgroundscreen}% -% \ifx\p_framed_backgroundscreen\empty \else -% \pack_framed_background_box_gray_indeed -% \fi} -% -% \def\pack_framed_background_box_gray_indeed % can be more direct but who cares, just compatibility -% {\colored[s=\p_framed_backgroundscreen]{\pack_framed_filled_box}} - %D It won't be a surprise that we not only provide gray boxes, but also colored %D ones. Here it is: @@ -568,21 +548,6 @@ \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 {\pack_framed_overlay_initialize \pack_framed_process_background_indeed_internal} @@ -610,13 +575,6 @@ \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} @@ -645,18 +603,6 @@ \hss \egroup}} -% \def\pack_framed_overlay_initialize_indeed -% {\edef\overlaywidth {\the\d_framed_target_wd\space}% -% \edef\overlayheight {\the\dimexpr\d_framed_target_ht+\d_framed_target_dp\relax\space}% -% \edef\overlaydepth {\the\d_framed_target_dp\space}% -% \edef\overlaycolor {\framedparameter\c!backgroundcolor}% let ? -% \edef\overlaylinecolor{\framedparameter\c!framecolor}% only needed for layers -% \edef\overlaylinewidth{\the\d_framed_linewidth\space}% -% %\edef\overlaycorner {\framedparameter\c!backgroundcorner}% -% %\edef\overlayradius {\framedparameter\c!backgroundradius}% -% \edef\overlayoffset {\the\framedbackgroundoffset\space}% \backgroundoffset % we steal this one -% \let\pack_framed_overlay_initialize\relax} - \def\pack_framed_overlay_initialize_indeed {\d_overlay_width \d_framed_target_wd \d_overlay_height \dimexpr\d_framed_target_ht+\d_framed_target_dp\relax @@ -710,27 +656,6 @@ \box\b_framed_normal \box\b_framed_extra}} -% \def\pack_framed_stroked_box_normal -% {\setbox\scratchbox\emptyhbox -% \wd\scratchbox\d_framed_target_wd -% \ht\scratchbox\d_framed_target_ht -% \dp\scratchbox\d_framed_target_dp -% \setbox\scratchbox\vpack \bgroup -% \csname \??framedtop\p_framed_frame\framedparameter\c!topframe \endcsname -% \nointerlineskip % new (needed for fences) -% \hbox \bgroup -% \csname \??framedleft\p_framed_frame\framedparameter\c!leftframe \endcsname -% \box\scratchbox -% \csname \??framedright\p_framed_frame\framedparameter\c!rightframe \endcsname -% \egroup -% \nointerlineskip % new (needed for fences) -% \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_opened {\setbox\scratchbox\vpack \bgroup \csname\??framedtop\p_framed_frame\framedparameter\c!topframe\endcsname @@ -876,35 +801,6 @@ \newcount\c_pack_framed_nesting -% to be tested (slightly more efficient): -% -% \unexpanded\def\pack_frame_common % #1 #2 -% {\bgroup -% \advance\c_pack_framed_nesting\plusone -% \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed -% \edef\currentframed{>\the\c_pack_framed_nesting}% -% \pack_framed_initialize -% \bgroup -% \doifnextoptionalcselse} % #1 #2 -% -% \unexpanded\def\framed {\pack_frame_common\pack_framed_process_framed_pickup\pack_framed_process_indeed} -% \unexpanded\def\startframed{\pack_frame_common\pack_framed_start_framed_pickup \pack_framed_start_indeed } -% -% \def\pack_framed_process_framed_pickup[#1]% -% {\setupcurrentframed[#1]% -% \pack_framed_process_indeed} -% -% \def\pack_framed_start_framed_pickup[#1]% -% {\setupcurrentframed[#1]% here ! -% \secondargumenttrue % dirty trick -% \pack_framed_start_framed_indeed} -% -% \def\pack_framed_start_framed_indeed -% {\pack_framed_process_indeed -% \bgroup} -% -% no longer .. we also accept \startframed[tag] - \unexpanded\def\pack_framed_process_framed[#1]% {\bgroup \iffirstargument % faster @@ -920,24 +816,6 @@ \pack_framed_initialize \dosingleempty\pack_framed_process_framed} -% \unexpanded\def\startframed -% {\dosingleempty\pack_framed_start_framed} -% -% \def\pack_framed_start_framed[#1]% -% {\bgroup -% \advance\c_pack_framed_nesting\plusone -% \expandafter\let\csname\??framed>\the\c_pack_framed_nesting:\s!parent\endcsname\??framed -% \edef\currentframed{>\the\c_pack_framed_nesting}% -% \pack_framed_initialize -% \bgroup -% \iffirstargument -% \secondargumenttrue % dirty trick -% \setupcurrentframed[#1]% here ! -% \fi -% \pack_framed_process_indeed -% \bgroup -% \ignorespaces} - \unexpanded\def\startframed {\dosingleempty\pack_framed_start_framed} @@ -1723,8 +1601,8 @@ {\setvalue{\??framedlocatorbefore#1}{#2}% \setvalue{\??framedlocatorafter #1}{#3}} -\def\pack_framed_locator_before#1{\csname\??framedlocatorbefore#1\endcsname} -\def\pack_framed_locator_after #1{\csname\??framedlocatorafter #1\endcsname} +\def\pack_framed_locator_before#1{\begincsname\??framedlocatorbefore#1\endcsname} +\def\pack_framed_locator_after #1{\begincsname\??framedlocatorafter #1\endcsname} \newdimen\d_framed_locator_ht \newdimen\d_framed_locator_dp @@ -1827,14 +1705,14 @@ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}% \ht\b_framed_normal\strutht \dp\b_framed_normal\strutdp - \hpack{\box\b_framed_normal}} % why pack + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? \installframedlocator \v!line {} {\setbox\b_framed_normal\hpack{\lower.5\ht\b_framed_normal\box\b_framed_normal}% \ht\b_framed_normal.5\lineheight \dp\b_framed_normal.5\lineheight - \hpack{\box\b_framed_normal}} + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? \installframedlocator \v!low {} @@ -1850,7 +1728,7 @@ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}% \ht\b_framed_normal\d_framed_locator_ht \dp\b_framed_normal\d_framed_locator_dp - \hpack{\box\b_framed_normal}} + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? \installframedlocator \v!middle {} @@ -1858,7 +1736,7 @@ \setbox\b_framed_normal\hpack{\lower\scratchdimen\box\b_framed_normal}% \ht\b_framed_normal\scratchdimen \dp\b_framed_normal\scratchdimen - \hpack{\box\b_framed_normal}} + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? \installframedlocator \v!lohi % maybe also \v!center {\pack_framed_locator_before\v!middle} @@ -1870,7 +1748,7 @@ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_ht\box\b_framed_normal}% \ht\b_framed_normal\d_framed_locator_dp \dp\b_framed_normal\d_framed_locator_ht - \hpack{\box\b_framed_normal}} + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? \installframedlocator \v!keep % retains height/depth {\pack_framed_remove_depth} @@ -1884,7 +1762,7 @@ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}% \ht\b_framed_normal\d_framed_locator_ht \dp\b_framed_normal\d_framed_locator_dp - \hpack{\box\b_framed_normal}} + \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? % also used in fastlocalframed @@ -1919,30 +1797,6 @@ % \framed[width=12cm,height=3cm,orientation=-180]{\input ward\relax} % \framed[width=12cm,height=3cm,orientation=-270]{\input ward\relax} -% \def\pack_framed_start_orientation -% {\ifcase\p_framed_orientation -% \let\pack_framed_stop_orientation\relax -% \else -% \scratchcounter\p_framed_orientation % weird .. why -% \divide\scratchcounter\plustwo -% \ifodd\scratchcounter -% \let\pack_framed_stop_orientation\pack_framed_stop_orientation_odd -% \else -% \let\pack_framed_stop_orientation\pack_framed_stop_orientation_even -% \fi -% \fi} -% -% \def\pack_framed_stop_orientation_odd -% {\swapmacros\framedwidth\framedheight -% \swapmacros\localwidth\localheight -% \swapdimens\d_framed_height\d_framed_width -% \pack_framed_stop_orientation_even} -% -% \def\pack_framed_stop_orientation_even -% {\setbox\b_framed_normal\hbox{\dorotatebox\p_framed_orientation\hbox{\box\b_framed_normal}}% -% \d_framed_height\ht\b_framed_normal -% \d_framed_width \wd\b_framed_normal} - \def\pack_framed_start_orientation {\ifcase\p_framed_orientation \let\pack_framed_stop_orientation\relax @@ -2033,15 +1887,6 @@ \edef\currentmathframed{#1}% \dosingleempty\pack_framed_mathframed_indeed} -% \def\pack_framed_mathframed_indeed[#1]#2% no fancy nesting supported here -% {\iffirstargument -% \setupcurrentmathframed[#1]% -% \fi -% \c_framed_mstyle\mathstyle -% \doifnot{\mathframedparameter\c!location}\v!low{\let\normalstrut\pack_framed_math_strut}% -% \inheritedmathframedframed{\Ustartmath\triggermathstyle\c_framed_mstyle#2\Ustopmath}% -% \endgroup} - \newcount\c_pack_framed_mathframed \newtoks \t_pack_framed_mathframed |