ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] \item would fit, but was pushed to next page.  Work-around or fix?
@ 2024-06-05 15:33 Jim
  2024-06-05 16:04 ` [NTG-context] " Henning Hraban Ramm
  2024-06-06  9:04 ` Aditya Mahajan
  0 siblings, 2 replies; 5+ messages in thread
From: Jim @ 2024-06-05 15:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I had the following structure which ended up at the bottom of a page:

-----------------------------------------------------------------------

\setupcaptions[number=no]
\placefigure[right]
    {blah blah blah}
    {%
        \vskip -15pt
        \externalfigure[DSC_2782][width=0.32\textwidth]
    }
\noindent
{\bf Blah blah blah }
\startitemize[intro,nowhite]
\item blah blah blah blah blah blah!  blah blah blah blah, blah
  blah blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah blah blah blah
  blah.
\item blah blah blah blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah blah blah blah blah
  blah blah blah blah blah.
\stopitemize

--------------------------------------------

There was, in fact, room to put the last \item on the page (and even a bit
more), but ConTeXt insisted on moving the last \item to the next page.  I
assume that its calculations were a bit conservative for whatever reason,
but I really wanted the last item to be on the same page as its friends.

I tried some "tricks" that would have worked for me in plain TeX, but
ConTeXt was having none of that.

Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
    to do an end-run around its calculations?

Note: to solve this problem the use of brute force has been authorized.

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] 5+ messages in thread

* [NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
  2024-06-05 15:33 [NTG-context] \item would fit, but was pushed to next page. Work-around or fix? Jim
@ 2024-06-05 16:04 ` Henning Hraban Ramm
  2024-06-05 16:23   ` Jim
  2024-06-06  9:04 ` Aditya Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2024-06-05 16:04 UTC (permalink / raw)
  To: ntg-context

Am 05.06.24 um 17:33 schrieb Jim:
> Hi,
> 
> I had the following structure which ended up at the bottom of a page:
> Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?
> 
> Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
>      to do an end-run around its calculations?
> 
> Note: to solve this problem the use of brute force has been authorized.

Did you try \adaptlayout?
https://wiki.contextgarden.net/Command/adaptlayout

It might also help to put the itemize in a box (but that might end up on 
the next page).

Hraban

___________________________________________________________________________________
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] 5+ messages in thread

* [NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
  2024-06-05 16:04 ` [NTG-context] " Henning Hraban Ramm
@ 2024-06-05 16:23   ` Jim
  0 siblings, 0 replies; 5+ messages in thread
From: Jim @ 2024-06-05 16:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

On Wed, Jun  5, 2024 at 18:04 (+0200), Henning Hraban Ramm wrote:

> Am 05.06.24 um 17:33 schrieb Jim:
>> Hi,

>> I had the following structure which ended up at the bottom of a page:
> …
>> Q1: Is there a Right Way to force ConTeXt to put an \item on the current page?

>> Q2: If not, does anyone wish to suggest some way to trick ConTeXt here, or
>> to do an end-run around its calculations?

>> Note: to solve this problem the use of brute force has been authorized.

> Did you try \adaptlayout?
> https://wiki.contextgarden.net/Command/adaptlayout

> It might also help to put the itemize in a box (but that might end up on the
> next page).

Hi Hraban,

That works perfectly.  I didn't know about that command before, and my
google searches to find something like that didn't turn anything up.
Undoubtedly I used the wrong search terms.

I tried putting the \placefigure and the itemize in a box, thinking that if
all else failed I could put a negative \vskip at the bottom to make the box
shorter.  However, when I tried putting all that in a \vbox I got some
error messages which were not immediately illuminating (to me).

Thanks for the pointer.

                                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] 5+ messages in thread

* [NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
  2024-06-05 15:33 [NTG-context] \item would fit, but was pushed to next page. Work-around or fix? Jim
  2024-06-05 16:04 ` [NTG-context] " Henning Hraban Ramm
@ 2024-06-06  9:04 ` Aditya Mahajan
  2024-06-06 12:39   ` Jim
  1 sibling, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2024-06-06  9:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 5 Jun 2024, Jim wrote:

> Hi,
> 
> I had the following structure which ended up at the bottom of a page:
> 

This is perhaps not related to what you asked but ...

> \noindent
> {\bf Blah blah blah }
> \startitemize[intro,nowhite]

Starting a paragraph with a group {...} can lead to unexpected outcome. It is better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

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] 5+ messages in thread

* [NTG-context] Re: \item would fit, but was pushed to next page. Work-around or fix?
  2024-06-06  9:04 ` Aditya Mahajan
@ 2024-06-06 12:39   ` Jim
  0 siblings, 0 replies; 5+ messages in thread
From: Jim @ 2024-06-06 12:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Jun  6, 2024 at 11:04 (+0200), Aditya Mahajan wrote:

> On Wed, 5 Jun 2024, Jim wrote:

>> Hi,

>> I had the following structure which ended up at the bottom of a page:


> This is perhaps not related to what you asked but ...

>> \noindent
>> {\bf Blah blah blah }
>> \startitemize[intro,nowhite]

> Starting a paragraph with a group {...} can lead to unexpected outcome. It is better to use \bold{...} here, or \dontleavehmode {\bf ... }. 

Aditya,

thanks for the information.  So far (in my ConTeXt journey) I haven't seen
anything with doing that, but I appreciate the advice.

I don't understand the full Zen of \dontleavehmode (in my poor
understanding I think it should be called \ensurehmode or something like
that), but given that I explicitly used \noindent, is that not an analogous
thing?

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] 5+ messages in thread

end of thread, other threads:[~2024-06-06 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-05 15:33 [NTG-context] \item would fit, but was pushed to next page. Work-around or fix? Jim
2024-06-05 16:04 ` [NTG-context] " Henning Hraban Ramm
2024-06-05 16:23   ` Jim
2024-06-06  9:04 ` Aditya Mahajan
2024-06-06 12:39   ` 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).