
Am 21.03.25 um 20:55 schrieb Joel via ntg-context:
I am trying to do this, basically my document has some floats, with captions, that appear within the text, but occasionally, I want some special images to be rendered across the full page (left and right). The text of the chapter should appear on the pages before this and after it, but not on the page with these images. And the page number/headings shouldn't appear. Ideally the caption just is displayed bottom left, on the left-side / verso page.
Is there a simple way to achieve that?
Here’s some code that I use, oldfashioned and not complete. The main tricks: * postponing to reserve the space * fullpagemakeup to clear the page * clip to split the image \definemeasure[Bleed][3mm] \definemeasure[Trim][7.5mm] \definemeasure[maxWidth][\paperwidth + \measured{Bleed}] \definemeasure[maxHeight][\paperheight + 2\measured{Bleed}] \definemeasure[doubleWidth][2\measured{maxWidth}] \definemeasure[topOffset][\topspace + \headerheight + \measured{Bleed}] \definemeasure[bottomOffset][\bottomheight + \footerheight + \measured{Bleed}] \definelayer[bgpicleft][ x=-\measure{Bleed},y=-\measure{Bleed}, width=\measure{maxWidth}, height=\measure{maxHeight}, ] % inkl. Beschnitt \definelayer[bgpicright][ x=0mm,y=-\measure{Bleed}, width=\measure{maxWidth}, height=\measure{maxHeight}, ] % inkl. Beschnitt % full double page image % reference, placecode, caption, filename, see above % usage: % \startpostponing[pagenumber] % \doublepagefig[reference][left/right/width/height*]{caption}{filename} % \stoppostponing % * lw,lh,rw,rh - place caption on left/right page, adapt image to width/height % default is lw % postponing is important, otherwise the page numbering gets wrong \def\doublepagefig{\dodoubleempty\doDoublePagefig} \def\doDoublePagefig[#1][#2]#3#4{ \startfullpagemakeup \setlayer[bgpicleft]{\textreference[#1]{}% \clip[ hoffset=0mm, voffset=0mm, width=\measure{maxWidth}, height=\measure{maxHeight}, ]{% \doifinstringelse{h}{#2}{% \externalfigure[#4][height=\measure{maxHeight}]% }{% \externalfigure[#4][width=\measure{doubleWidth}]% }% }% } % set caption into footer (left page) \doiftext{#3}{\doifinstring{l}{#2}{% \setlayer[bgpicleft][ x=\backspace, y=\dimexpr\makeupheight + \footerheight\relax, ]{% \doifmodeelse{blackcaption}{% \tfx\vbox{#3}% }{\bfx% % \inframed[ % frame=off,background=shadow, % foregroundcolor=captioncolor, % ]{% % \bfx{#3}%\vbox{#3}% % }% {#3}% }% }% }} % debugging information \setlayer[bgpicleft][x=0mm,y=-\measure{Bleed}]{% \color[debugcolor]{~\tt\bfx #1 / #2 / #4} } \stopfullpagemakeup \startfullpagemakeup \setlayer[bgpicright]{% \clip[ hoffset=\measure{maxWidth}, voffset=0mm, width=\measure{maxWidth}, height=\measure{maxHeight}, ]{% \doifinstringelse{h}{#2}{% \externalfigure[#4][height=\measure{maxHeight}]% }{% \externalfigure[#4][width=\measure{doubleWidth}]% }% }% } % set caption into footer (right page) \doiftext{#3}{\doifinstring{r}{#2}{% \setlayer[bgpicright][ x=\backspace, y=\dimexpr\makeupheight + \footerheight\relax, ]{% \doifmodeelse{blackcaption}{% \tfx\vbox{#3}% }{\bfx% % \inframed[ % frame=off, % background=shadow, % foregroundcolor=captioncolor, % ]{% % \bfx{#3}% % }% {#3}% }% }% }}% % debugging information \setlayer[bgpicright][x=0mm,y=-\measure{Bleed}]{% \color[captioncolor]{~\tt\bfx #1 / #2 / #4} } \stopfullpagemakeup } % doublepagefig Hraban