Pablo Rodriguez schrieb am 16.06.2020 um 16:31:
On 6/16/20 4:53 AM, Rudolf Bahr wrote:
[...] Hi Pablo,
I fear I don't understand what issue you mean, therefore I append my output here.
Many thanks for your reply, Rudolf.
The issue is that the layer is placed on the first page, where it should be placed on the second page.
This sample shows thie problem in a simpler way:
\definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever]
\setuphead [section] [before={\testpage[2]\blank[2*big]}]
\starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext
I’m afraid that you get the same result, so there may be a bug there.
There is no bug. When you take a look at my pagenumber example you see a few lines at the top show the number of the previous page, this happens because TeX collects more than necessary which means in your example above the layer is placed when TeX was still on the first page. In your example you can add \testpage to \section to force a page break when there isn't enough space available to place the heading, this moves also the layer placement to the next page. Wolfgang