[PATCH] Support \\*

Pavel Sanda sanda at lyx.org
Fri Jul 15 17:32:34 UTC 2022


Dear Chris,

welcome here and sorry for the late reply.

On Mon, Jun 06, 2022 at 05:46:32PM -0700, Chris Spiegel wrote:
> I'm attaching two patches, one against git master, the other against
> the 2.3.x branch. These patches add a starred new line break
> formatting option (\\*) to complement "Ragged line break", i.e. the \\
> macro.

This is fileformat change, it can not go to 2.3, but only into master.
Also it would need to conversion routine in lyx2lyx for conversion
between different LyX versions (see e.g. commit 0ea9df7467a9b).
 
> My specific use case for this is for short stanzas in a verse
> environment: \\* will prevent a page break in the middle of a stanza.
> 
> For lack of a better term I've called this "Starred line break" though
> I'm sure it can be renamed to something more appropriate.  

Not sure either, but normal user won't get idea what is it for with
this naming. Could not find anything better than "Line break without page break".

Is the meaning of \\* stable enough across different environments?

> I've also given it the keyboard shortcut of meta-shift-enter, which is in the
> ballpark of the other newline-style formatting options.
> 
> I've been using this patch at least since the LyX 1.6.0 days, with no problems.
> 
> Whether this is the best way to support \\* I'm not sure, but I do
> think having the ability to add \\* directly, rather than via ERT, is
> very useful.

I think it would be OK to add it. What do others think?

Pavel


More information about the lyx-devel mailing list