[NTG-context] How to prevent \subject from being the last line

Pablo Rodriguez oinos at gmx.es
Sun Feb 19 22:21:06 CET 2023

On 2/19/23 20:34, Sylvain Hubert via ntg-context wrote:
> Dear list,
> I have a long document (A4 * 170 pages) with some CJK fonts, where some
> of the \subject{...} are placed at the end of the corresponding pages,
> which looks awkward. How can one flush those last-line titles to the
> next pages?

Hi Sylvain,

the hard part for the rest of us is figuring out what you may have on
your screen.

\setuphead[subject][before={\blank[preference]}] might help.

Another approach would be \setuphead[subject][after={\blank[samepage,

I mean, either you set a preference for breaking pages before \subject
or you force \subject to be on the same page with next paragraph.

Nothing prevents you from doing both.

BTW, default values for before and after in \setuphead[subject] are
\blank[2*big] and \blank (respectively [copied from strc-def.mkxl]).

> Currently I don't have a MWE, as trivial filling-up with 1-2 pages of
> \lipsum doesn't reproduce the problem. I'm optimistically asking without
> MWE, but if it is necessary anyway, please tell me and I will obfuscate
> the 170-page document and find a way to upload it.

I hope it might help. It is not clear for me whether the CJK fonts are
only for fragments in these languages or the main text is written in any
of these languages.

I had similar issues with \section and only the Latin script was involved.

Again, I hope it might help,


More information about the ntg-context mailing list