
Aditya, thanks for the fast reply. On Thu, Apr 24, 2025 at 17:08 (+0200), Hans Hagen wrote:
On 4/24/2025 5:00 PM, Jim wrote:
This could be a bug report, but it is mostly a request for assistance.
In https://www.pragma-ade.com/general/manuals/mathincontext-screen.pdf I see "2.11 Big operators" is at the very bottom of a page (no "content" of section 2.11 is on that page). This is an example of what I don't want, and anyone who feels the same way would consider this a (very minor) bug report for the (otherwise most excellent) math manual.
For plain TeX, I have been using a macro I wrote called \need, so that a usage like \need 2cm would end the current page before omitting any more material, if there is less than 2cm left on the current page. I then used this in chapter and section macros (and anywhere else I felt like).
I have played around a little bit with converting that macro for ConTeXt, but I'm not as confident that it Does The Right Thing in ConTeXt as for plain TeX.
Q: is there a ConTeXt macro which does a \page if there is less space on the current page than specified by the argument to the macro?
\testpage[3] % lines or some dimension
It's typically something you only do when the document is final.
Hans, thanks for the almost-as-fast-as-Aditya reply. I am a bit puzzled by your "It's typically..." comment, for two reasons. (1) When the document is (almost) final, I could just get out the "\page" sledgehammer and whack away with that. (2) The "bad" page break for Section 2.11 only occurs (at present) in the "screen" version, but not in the "paper" version. To fix the screen version, on could (I suppose) do \ifthisisthescreenversion \page \fi ... command to start Section 2.11 ... but just putting \testpage[5] % or whatever number one likes ... command to start Section 2.11 ... takes care of both formats. Bonus puzzlement reason: while some documents do indeed become final, I'd hazard a guess that the majority of documents get updated many times after their first "release into the wild". In any case, thanks very much for the information. Jim