diff options
Diffstat (limited to 'tex/context/base/pack-box.mkiv')
-rw-r--r-- | tex/context/base/pack-box.mkiv | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tex/context/base/pack-box.mkiv b/tex/context/base/pack-box.mkiv index 6cb492aa6..2c25f5c3a 100644 --- a/tex/context/base/pack-box.mkiv +++ b/tex/context/base/pack-box.mkiv @@ -443,10 +443,9 @@ \c!voffset=\@@bgoffset, \c!hoffset=\@@bgoffset] -\def\bleed +\unexpanded\def\bleed {\dosingleempty\dobleed} - \def\bleedwidth {\the\hsize}% \def\bleedheight{\the\vsize}% @@ -477,12 +476,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 @@ -490,10 +490,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 @@ -513,7 +512,7 @@ \ht\scratchbox\@@bgheight \dp\scratchbox\zeropoint \ifdone - \hpos{\??bg:\number\nofbleeds}{\box\scratchbox}% + \hpos\currentbgposition{\box\scratchbox}% \else \box\scratchbox \fi @@ -521,7 +520,7 @@ \setupbleeding[\c!stretch=\v!yes] -\defineexternalfigure[bleed][\c!width=\bleedwidth,\c!height=\bleedheight] +\defineexternalfigure[bleed][\c!width=\bleedwidth,\c!height=\bleedheight] % should be \v!bleed % \placefigure[left]{none} % {\bleed[width=5cm,height=3cm,location=lt]{\externalfigure[koe][bleed]}} |