On 1/28/2026 8:58 PM, Jim wrote:
Hi,

I am in the middle of trying to put a newsletter together.  A heading
occurred as the last line on a page, so I put
         \testpage[][1.5in]
in front of it.

All was good, the heading went onto the next page.

Then, higher up in the page, I put
         \blank[2*line]
to separate a couple of things.

Curiously, the afore-mentioned heading now appears on the page.

In desperation (publishing deadlines, you know) I can use brute force, but
I hate doing that.

I tried creating a minimal example, but (sort of unfortunately) that
behaved as expected.

Doing a binary search through my config may reveal what sin I have
committed to cause this, but that will have to wait (publishing deadline).

In the interim, does this situation tweak anyone's memory of seeing
something like this before?  If so, do you have any words of wisdom for me,
so I can narrow down the hunt?

It will always be unreliable as it triggers the output routine which can interfere.

You can try several methods:

\testpage
\testpageonly
\testpagesync

If you're in experimental mode you can try this (\pagelastheight might be more reliable that \pagetotal).

\unprotect

\defcsname\??pagecheckermethod 4\endcsname
  {\ifdim\pagegoal<\maxdimen \relax
     \ifdim\pagelastheight<\pagegoal \relax
       \ifdim{\page_check_amount-\pagegoal}>-\lineheight
         \pagecheckerparameter\c!before
         \penalty-\plustenthousand
         \pagecheckerparameter\c!after
       \else
         \pagecheckerparameter\c!inbetween
       \fi
     \else
       \pagecheckerparameter\c!inbetween
     \fi
   \else
     \goodbreak
     \pagecheckerparameter\c!inbetween
   \fi}

\definepagechecker[\s!unknown:4][\s!unknown:0][\c!method=4]

\protect

\showframe

\starttext
    \dorecurse{38}{test #1.1\par}
    \checkpage[unknown:4][lines=23,offset=0pt]
    \dorecurse{10}{test #1.2\par}
\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to