After having tried pretty much every idea that I could think of in the last two days, I would like to ask for help here. In a nutshell, I would like to achieve the following in ConTeXt:
- Position an external figure on the opposite (left) page of a section head.
- Colorize that whole left page.
Here's an MWE:
\setuppapersize[A4][A4]
\setuplayout
[
backspace=11.67mm, width=131.25mm,
topspace=21.21mm, height=254.57mm,
headerdistance=13pt, header=13pt,
footerdistance=13pt, footer=13pt,
rightmargindistance=13pt, rightmargin=39.5mm,
]
\setuppagenumbering[alternative=doublesided, location=]
\definecolor[warmwhite] [r=0.94, g=0.93, b=0.90]
\definehead[PageSection][section]
\setuphead[PageSection][
page=right,
continue=no,
style=\ssb\bf,
]
\definelayer[emphpage][
x=0mm,
y=0mm,
width=\paperwidth,
height=\paperheight,
repeat=yes,
]
\setlayer[emphpage][]{
\framed[
frame=off,
width=210mm,
height=297mm,
background=color,
backgroundcolor=warmwhite,
]{}
}
\definefloat[leftpagefloat][leftpagefloats][graphic]
\setupfloat[leftpagefloat][
default={leftpage,header,footer},
]
\def\LeftPageFigure#1%
{
\setupbackgrounds[page][
background=emphpage,
]
\placeleftpagefloat[]{}{
\offset[
leftoffset=\dimexpr -\rightmarginwidth - \lineheight \relax,
]{
\externalfigure[#1][
width=\dimexpr \textwidth + \rightmarginwidth + \lineheight \relax,
height=\textheight,
factor=fit,
]
}
}
}
\starttext
\chapter{Testing Full Page Figures}
\dorecurse{3}{\input{knuth}}
\PageSection{First Section: Image should be on opposite page}
\LeftPageFigure{https://via.placeholder.com/1600x900.png?text=Wide+Test+Image}
\dorecurse{3}{\input{knuth}}
\PageSection{Second section}
\dorecurse{3}{\input{knuth}}
\stoptext
And here's what this looks like:
As you can see, there's two problems:
- The figure is positioned on the next left page, although the page to the left of the current section is totally free. Why is that the case?
- How can I colorize the page under the figure – and only that page? (By the way: Removing the line
repeat: yes,results in the background not appearing at all.)
Any help would be much appreciated.



before=\setup{section:before}, correct? I would like to use this to position figures not only next to section heads, but also on the opposite page in the running text... – Marcus C. Feb 04 '23 at 09:59