Question: How to prevent page breaking right after paragraph environment

Hello,

For book style, how would I set the paragraph environment (obtained from Insert - Section - Paragraph> so that paragraph (even better all paragraph) is centered and never a widow/orphan single line at the end of page? I think I need to put somewhere.

I know only this much:
<with|par-mode|center|<paragraph|The World is Burning.>>

Thanks.

I have a way which I think can be improved.

First the macros which I think are ok or almost ok, the ones that make sure that there is no page break after the paragraph title.

<assign|paragraph-unnumbered-title|<macro|title|<compound|paragraph-title|<arg|title>>>>

<assign|paragraph-numbered-title|<macro|title|<compound|paragraph-title|<sectional-prefixed|<compound|the-paragraph><compound|paragraph-sep>|<arg|title>>>>>

<assign|paragraph-title|<macro|name|<sectional-normal-bold|<arg|name>>>>

With respect to the default macros with the same names, in paragraph-unnumbered-title and paragraph-unnumbered-title I remove the space before and after the title; then I substitute sectional-normal-bold, which contains a command to inhibit breaking, to sectional-short-bold, which does not.

I need to check again to make sure that I removed all spaces. Also inside sectional-normal-bold there is a <no-indent*> command that inhibits indenting the line following the paragraph title. I do not know whether it is better to keep or remove that.

Now the command I am unhappy with, the one for centering

<assign|paragraph|<macro|title|<with|par-mode|center|<assign|paragraph-numbered|<compound|paragraph-display-numbers>><assign|paragraph-prefix|<macro|<compound|the-paragraph>.>><compound|next-paragraph><compound|paragraph-clean><compound|paragraph-header|<arg|title>><compound|paragraph-toc|<arg|title>><if|<value|paragraph-numbered>|<compound|paragraph-numbered-title|<arg|title>>|<compound|paragraph-unnumbered-title|<arg|title>>>>>>

I tried to move the centering environment (<with|par-mode|center ...) to inner macros (it seemed more elegant), but the title would remain left-aligned. So I wrapped it around everything.

Please let me know if these macros do what you want.