Background
Looking to split external figures across two pages, evenly, for a seamless layflat photobook.
Problem
The seam between two pages is misaligned for illustrations that span two pages. This appears to be due to a thin (~1px) white border that isn't being filled. Here's a zoom showing where the fill does not extend to the edge of the right-hand page:
This white line would likely show up in the final print, which I'd like to avoid. The thin line appears at the edge of the left-hand page, as well.
Code
The code has a ConTeXt part and an SVG part.
ConTeXt
Code to reproduce the issue:
\definepapersize[BookExportSize][
width=8.5in,
height=11in,
]
\setuppapersize[BookExportSize]
\setuppagenumbering[alternative=doublesided]
\setupclipping[nx=2, ny=1]
\setuplayout[
grid=halfline,
rightmargin=\zeropoint,
leftmargin=\zeropoint,
header=\zeropoint,
footer=\zeropoint,
width=\paperwidth,
height=\paperheight,
topspace=\zeropoint,
backspace=\zeropoint,
]
\definelayer[BookIllustrationLayer][
width=\paperwidth,
height=\paperheight,
position=no,
repeat=no,
]
% A calculation must be run inside a setup (not shown).
\startsetups[BookSetupIllustration]%
\setlayerframed[BookIllustrationLayer][
frame=off,
offset=\zeropoint,
overlay=\zeropoint,
voffset=.5\paperheight,
]{%
\ifodd\pagenumber\def\BookClipX{1}\else\def\BookClipX{2}\fi%
\clip[x=\BookClipX, y=1]{%
\externalfigure[illustration][
width=2\paperwidth,
height=.5\paperheight,
]%
}%
}%
\stopsetups
\setupbackgrounds[page][
setups=BookSetupIllustration,
background=BookIllustrationLayer,
]
\starttext
Hello \page Hello
\stoptext
Illustration
Save as illustration.svg and include it in the same directory as the .tex file:
<svg height="4in" viewBox="0 0 431.8 101.6" width="17in" xmlns="http://www.w3.org/2000/svg"><g stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.645833" transform="matrix(.85006833 0 0 .95846476 50.621626 -187.95705)"><path d="m-58.208334 300.77976 503.008004-71.60129"/><path d="m-33.261905 197.42847 480.329435 94.27987"/></g></svg>
Question
How can the clipped background figure be forced to fill the entire page?
If a white border appears on the outside edges (into the bleed area) that's fine because it will be cropped. The issue appears in both Evince and XPDF; I have not tried Acrobat Reader.
Restrictions
If it is okay to place restrictions on a solution, then, ideally:
- only changes to the setups, layout, or layers;
- without complex low-level TeX primitives;
- without TeX pages;
- without structural changes to the document; and
- without complex \unprotect macros (~15 lines or so?).
Version
$ context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context | current version: 2019.12.06 19:45
