* [NTG-context] *Not* starting a section at the very bottom of a page
@ 2025-04-24 15:00 Jim
2025-04-24 15:07 ` [NTG-context] " Aditya Mahajan
2025-04-24 15:08 ` Hans Hagen
0 siblings, 2 replies; 6+ messages in thread
From: Jim @ 2025-04-24 15:00 UTC (permalink / raw)
To: ntg-context
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?
Thanks.
Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: *Not* starting a section at the very bottom of a page
2025-04-24 15:00 [NTG-context] *Not* starting a section at the very bottom of a page Jim
@ 2025-04-24 15:07 ` Aditya Mahajan
2025-04-24 15:08 ` Hans Hagen
1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2025-04-24 15:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 24 Apr 2025, 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[n]
will check if there is space for at least n "lines"; if not it will issue a pagebreak. So, you can use it as
\testpage[4]
to test for 4 lines, etc.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: *Not* starting a section at the very bottom of a page
2025-04-24 15:00 [NTG-context] *Not* starting a section at the very bottom of a page Jim
2025-04-24 15:07 ` [NTG-context] " Aditya Mahajan
@ 2025-04-24 15:08 ` Hans Hagen
2025-04-24 16:04 ` Jim
1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2025-04-24 15:08 UTC (permalink / raw)
To: ntg-context
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
-----------------------------------------------------------------
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 : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: *Not* starting a section at the very bottom of a page
2025-04-24 15:08 ` Hans Hagen
@ 2025-04-24 16:04 ` Jim
2025-04-24 16:26 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Jim @ 2025-04-24 16:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: *Not* starting a section at the very bottom of a page
2025-04-24 16:04 ` Jim
@ 2025-04-24 16:26 ` Wolfgang Schuster
2025-04-24 23:00 ` Jim
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2025-04-24 16:26 UTC (permalink / raw)
To: ntg-context
Am 24.04.2025 um 18:04 schrieb Jim:
> 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.
1. You can add \testpage to the argument of the before key.
2. You can use modes for settings which apply for screen (or print) only.
\startmode[screen]
\setuphead[section][before={\testpage[4]\blank[...]}]
\stopmode
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: *Not* starting a section at the very bottom of a page
2025-04-24 16:26 ` Wolfgang Schuster
@ 2025-04-24 23:00 ` Jim
0 siblings, 0 replies; 6+ messages in thread
From: Jim @ 2025-04-24 23:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, Apr 24, 2025 at 18:26 (+0200), Wolfgang Schuster wrote:
> Am 24.04.2025 um 18:04 schrieb Jim:
>> 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.
<snip>
>>> > 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.
> 1. You can add \testpage to the argument of the before key.
> 2. You can use modes for settings which apply for screen (or print) only.
> \startmode[screen]
> \setuphead[section][before={\testpage[4]\blank[...]}]
> \stopmode
Wolfgang,
thanks very much for that information... I need to make more use of before
(and after) in various places.
Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-24 23:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-24 15:00 [NTG-context] *Not* starting a section at the very bottom of a page Jim
2025-04-24 15:07 ` [NTG-context] " Aditya Mahajan
2025-04-24 15:08 ` Hans Hagen
2025-04-24 16:04 ` Jim
2025-04-24 16:26 ` Wolfgang Schuster
2025-04-24 23:00 ` Jim
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).