ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: wrong page for annotation and \pagenumber
Date: Tue, 16 Jun 2020 16:58:23 +0200	[thread overview]
Message-ID: <29be14b9-d39a-c918-d227-49221e32b578@gmail.com> (raw)
In-Reply-To: <bcc836c2-6335-1021-5dcb-b4cd8b20a332@gmx.es>

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-06-16 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 12:52 Pablo Rodriguez
2020-06-15 14:09 ` Wolfgang Schuster
2020-06-15 15:29   ` Pablo Rodriguez
2020-06-16  2:53 ` Rudolf Bahr
2020-06-16 14:31   ` Pablo Rodriguez
2020-06-16 14:58     ` Wolfgang Schuster [this message]
2020-06-16 17:30       ` Pablo Rodriguez
2020-06-16 17:46         ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29be14b9-d39a-c918-d227-49221e32b578@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).