\item would fit, but was pushed to next page. Work-around or fix?
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
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
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
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
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
participants (3)
-
Aditya Mahajan
-
Henning Hraban Ramm
-
Jim