R S Milton wrote:
Hi,

I am facing two problems with blank lines:
1. How to insert a blank line where I need one.

Problem:
When a Enumeration style paragraph (for that matter, any theorem like style)
is followed by Standard style paragraph, LyX does not start a new paragraph
--- no para skip, no para indent. The latex file generated by LyX has
no blank line between them.

Right after an enumeration, it is common to start a new paragraph,
not just continue a paragraph. This requires a blank line to be inserted. LyX does not allow to insert a blank line and start a "new" paragraph.
It only allows to "continue" a paragraph, in Standard style.

Need:
How to insert a physical blank line in LyX (so that there is this blank line
in the exported latex file) before a paragraph starts?

Hack:
Right now, I am inserting an ERT which has just a %. Then LyX allows to start a really "new" paragraph

That's pretty much how I would do it, except that the ERT can be empty (you don't need to type '%') so long as it is in a new standard environment.

If you want to automate this, you can modify whichever .bind file you use to bind the following to an unused key combination:

command-sequence ert-insert; self-insert \par{};

Position the cursor at the start of what should be the new, indented paragraph and invoke the key combination there.

2. How to avoid a blank line where I do not need one. This seems to be more serious.

Problem:
When a Enumeration style paragraph is followed by a nested Enumeration
styel paragraph, LyX inserts a blank line as seen in the exported latex file, leading to a para skip before the nested list.

Again, it is common to start the nested list NOT as a new paragraph within
an outer list.

Need:
How to avoid the physical blank line before the nested list, in the exported latex file?

You might want to file a bug report/enhancement request on this (at http://bugzilla.lyx.org/). I didn't see anything in there about it. (I'm not a TeXpert, so I don't know if this will set off some theological debate about proper spacing. I'm inclined to prefer less vertical space myself.)

Meanwhile, one workaround is to position the cursor at the start of the first nested item, click Insert -> Special Formatting -> Vertical space ..., select Custom, and specify a size of -1 ex. What shows up in the GUI is less than aesthetic, but what shows up in the output seems to be about right.

An alternative to doing this repeatedly is to change the vertical spacing for enumerations in the preamble. See http://wiki.lyx.org/FAQ/Unsorted#toc36 for various solutions. I'm not sure if there's a way to do this that reduces the vertical space between a list item and a nested sublist without also reducing the vertical space between the outermost list and the surrounding text, but there might be.

/Paul

Reply via email to