summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/pack-box.mkii
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/pack-box.mkii')
-rw-r--r--Master/texmf-dist/tex/context/base/pack-box.mkii15
1 files changed, 7 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/pack-box.mkii b/Master/texmf-dist/tex/context/base/pack-box.mkii
index 8adeedb91b5..f27d8b4fd83 100644
--- a/Master/texmf-dist/tex/context/base/pack-box.mkii
+++ b/Master/texmf-dist/tex/context/base/pack-box.mkii
@@ -447,7 +447,6 @@
\def\bleed
{\dosingleempty\dobleed}
-
\def\bleedwidth {\the\hsize}%
\def\bleedheight{\the\vsize}%
@@ -478,12 +477,13 @@
rt=>\!!donebtrue\!!donectrue]%
\doifelse\@@bgstretch\v!yes\donetrue\donefalse
\scratchdimen\@@bgwidth
+ \edef\currentbgposition {\??bg:\number\nofbleeds}%
+ \edef\currentpageposition{page:0}% todo: per page
\ifdone
\if!!donea
- \advance\scratchdimen\MPx{\??bg:\number\nofbleeds}%
+ \advance\scratchdimen\dimexpr \MPx\currentbgposition-\MPx\currentpageposition\relax
\else\if!!doneb
- \scratchdimen\paperwidth
- \advance\scratchdimen-\MPx{\??bg:\number\nofbleeds}%
+ \scratchdimen\dimexpr\paperwidth-\MPx\currentbgposition-\MPx\currentpageposition\relax % not checked
\fi\fi
\fi
\advance\scratchdimen\@@bghoffset
@@ -491,10 +491,9 @@
\scratchdimen\@@bgheight
\ifdone
\if!!donec
- \scratchdimen\paperheight
- \advance\scratchdimen-\MPy{\??bg:\number\nofbleeds}%
+ \scratchdimen\dimexpr\paperheight-\MPy\currentbgposition-\MPy\currentpageposition\relax % not checked
\else\if!!doned
- \advance\scratchdimen\MPy{\??bg:\number\nofbleeds}%
+ \advance\scratchdimen\dimexpr \MPy\currentbgposition-\MPy\currentpageposition\relax % not checked
\fi\fi
\fi
\advance\scratchdimen\@@bgvoffset
@@ -514,7 +513,7 @@
\ht\scratchbox\@@bgheight
\dp\scratchbox\zeropoint
\ifdone
- \hpos{\??bg:\number\nofbleeds}{\box\scratchbox}%
+ \hpos\currentbgposition{\box\scratchbox}%
\else
\box\scratchbox
\fi