On 10/23/18 7:16 PM, Jean-Marc Lasgouttes wrote:
Le 23/10/2018 à 21:11, Paul A. Rubin a écrit :
I just tripped over something interesting (LyX 2.3.1), and I'd like
to make sure it's deliberate before banking on it. I'm working with a
module that adds various paragraph styles. When I'm in a paragraph
whose style comes from the "standard" list (e.g., Verbatim or
Description), if I hit return the new paragraph has the same style,
while if I execute "paragraph-break inverse" the new paragraph has
the Standard style. When I'm in a paragraph from my module, it's
exactly the opposite: return takes me to a Standard paragraph (or, if
nested, to the style of the nesting environment) but "paragraph-break
inverse" takes me to an empty paragraph of the same style as the one
I came from.
Is this intentional?
What is intentional is that the behavior is different between
environments (which can span over several paragraphs) and commands,
which do not.
Is this what you are seeing?
JMarc
Ah, I see. So Return and M-Return switch roles, depending on whether the
current paragraph style is a command or environment. That is what I'm
seeing, now that I know what to look for. I wonder if this should be
documented somewhere? The LFUN manual says paragraph-break moves you out
one level or produces a standard environment; it doesn't say anything
about whether it is being used in an environment or a command. The User
Guide has lots of examples, some using Return and some using Alt+Return,
but I didn't see any guidance as to the rationale for one versus the other.
Anyway, I'm clear on it now. Thanks, JMarc!
Paul