[Tex/LaTex] change the paragraph spacing in LyX UI

lyxspacing

In LyX user interface, there is a good-enough large space between a chapter text and the next paragraph, but between the paragraphs there is no space and it makes harder to see the structure of what I am writing.

I'd like to increase the spacing between two paragraphs only in the UI. I have not found any relevant options in the application preferences so far. So… Is there any setting file somewhere under the hood which I could tweak?

Thanks for any help!

Best Answer

The answer is yes! :) Giant thanks to Dennis and Torbjørn T.!
Here I collected and simplified all info to make paragraph separation work.
NOTE: Nothing you set up here will affect the rendered output, just the look of your LyX UI!

Step 1. Setting up margins and a style which will act as the spacer between paragraphs.
Open Document Settings dialog, go to Local Layout and copy-paste the following:

Format 11
RightMargin 10pt
LeftMargin 10pt

Style --Separator--
         Category            MainText
         KeepEmpty        1
         Margin                Dynamic
         LatexType           Paragraph
         LatexName         dummy
         ParIndent            MM
         Align                    Block
         LabelType           Static
         LabelString          ""
         LabelFont
           Color                 Blue
         EndFont
End

Press "Validate", then press "Apply".

Step 2. Making enter add the paragraph separating space.
Open LyX preferences dialog, go to Editing/Shortcuts. Search for break-paragraph, then select the break-paragraph command and click "Modify". Then, in the "function" text box, delete the "break-paragraph" text and replace it with

command-sequence break-paragraph;layout --Separator--;break-paragraph;

Press "Ok", press "Apply" and press "Save".

Step 3. Add option to be able to access the old paragraph break.
Again, in LyX preferences dialog/Editing/Shortcuts, search for break-paragraph, select the break-paragraph command and click "Modify". Click "Delete Key" and press shift+enter.

Again, press "Ok", press "Apply" and press "Save".

This last step is important, otherwise you would have problems when trying to make an enumeration.

Done.


Tested:

  • OK, LyX 2.0.5 on OSX Lion,
  • OK, LyX 2.0.0 on Windows 7.

If these steps work with your LyX and you don't see it on the list, please edit the post and add yours!


The original ideas are taken from Dennis's answer (appreciate a lot again!).
I slightly modified the text to be typed into Local Layout, so the separator style does really just make a space between two paragraphs.

Related Question