summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/pack-box.mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/pack-box.mkxl')
-rw-r--r--tex/context/base/mkxl/pack-box.mkxl48
1 files changed, 18 insertions, 30 deletions
diff --git a/tex/context/base/mkxl/pack-box.mkxl b/tex/context/base/mkxl/pack-box.mkxl
index 43f6bfbc7..28c1a42f0 100644
--- a/tex/context/base/mkxl/pack-box.mkxl
+++ b/tex/context/base/mkxl/pack-box.mkxl
@@ -1150,30 +1150,14 @@
\defineoverlay[#1:\v!background][\overlayanchorbox{#1:\v!background}]%
\defineoverlay[#1:\v!foreground][\overlayanchorbox{#1:\v!foreground}]}
-\permanent\def\namedboxanchor#1%
- {\csname\??boxanchorid#1\endcsname} % no checking
-
-% \permanent\protected\def\overlayanchorbox#1%
-% {\begingroup
-% \scratchcounter\csname\??boxanchorbox#1\endcsname
-% \ifvoid\scratchcounter\else
-% \setbox\scratchbox\hpack \s!source \namedboxanchor{#1}\bgroup
-% % \setbox\scratchbox\hpack\bgroup
-% \box\scratchcounter
-% \egroup
-% % \boxsource\scratchbox\namedboxanchor{#1}%
-% \wd\scratchbox\overlaywidth
-% \ht\scratchbox\overlayheight
-% \dp\scratchbox\overlaydepth
-% \box\scratchbox
-% \fi
-% \endgroup}
+\permanent\def\namedanchorbox#1%
+ {\begincsname\??boxanchorid#1\endcsname} % no checking
\permanent\protected\def\overlayanchorbox#1%
{\begingroup
\scratchcounter\csname\??boxanchorbox#1\endcsname
\ifvoid\scratchcounter\else
- \boxsource\scratchcounter\namedboxanchor{#1}%
+ \boxsource\scratchcounter\namedanchorbox{#1}%
\wd\scratchcounter\d_overlay_width
\ht\scratchcounter\d_overlay_height
\dp\scratchcounter\d_overlay_depth
@@ -1189,20 +1173,24 @@
\scratchcounterone\csname\??boxanchorbox#1\endcsname\relax
\scratchxoffset\boxanchorparameter\c!xoffset\relax
\scratchyoffset\boxanchorparameter\c!yoffset\relax
- \boxtarget\nextbox \namedboxanchor {#1}\relax
+ \boxtarget\nextbox \namedanchorbox {#1}\relax
\boxanchors\nextbox
% target
- \ifcsname\??boxpreset\boxanchorparameter\c!target\endcsname
- \lastnamedcs
- \else
- \halfwaytotallistanchorcode
- \fi
+ \numexpr
+ \ifcsname\??boxpreset\boxanchorparameter\c!target\endcsname
+ \lastnamedcs
+ \else
+ \halfwaytotallistanchorcode
+ \fi
+ \relax
% source
- \ifcsname\??boxpreset\boxanchorparameter\c!source\endcsname
- \lastnamedcs
- \else
- \halfwaytotallistanchorcode
- \fi
+ \numexpr
+ \ifcsname\??boxpreset\boxanchorparameter\c!source\endcsname
+ \lastnamedcs
+ \else
+ \halfwaytotallistanchorcode
+ \fi
+ \relax
\ifdim\scratchxoffset=\zeropoint\else
\boxxoffset\nextbox\scratchxoffset
\fi