Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

I don't think there is any option here.

I checked the .ui files (the obvious place) and they seem to only allow for configuration of the toolbars.

I checked the configuration file and the preference file, again no luck.

A quick google search returned this page which offers the following suggestion, which is the best I can figure as well, and likely to be the only option short of rewriting the LyX binary: insert a --Separator-- between paragraphs (check the pull-down menu to find it).

There might be a way, e.g., through messing with key bindings, to have LyX automatically insert a --Separator-- every time you hit "Enter" to start a new paragraph.

UPDATE: Following Torbjørn T.'s suggestion (see comments to this answer), you can redefine the break-paragraph keyboard shortcut in order to insert a --Separator-- every time you hit enter. Go to LyX->Preferences->Editing->Shortcuts and search "break-paragraph". 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;.

share|improve this answer
3  
Regarding your last paragraph, a possible command would be command-sequence break-paragraph;layout --Separator--;break-paragraph;. Search the keyboard shortcut list for break-paragraph to find the right one. (Note: it appeared when I tried that the "original" cannot be removed or modified, but if one tries to modify it, a new one will be created, and the original deactivated.) –  Torbjørn T. Jan 1 '13 at 19:59
    
I just checked your suggestion and it works. I'll add that to my answer with appropriate acknowledgment. –  Dennis Jan 1 '13 at 20:07
    
Thanks to both of you, you've made my day! –  Barnabas Szabolcs Jan 1 '13 at 22:29
add comment

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.

share|improve this answer
    
Nifty modification. Cool stuff! –  Dennis Jan 1 '13 at 22:43
    
Since LyX is written in Qt (correct me if Im wrong) and there is nothing OS related here... do you think the same would also work for all platforms? I would then loose the OSX tag (and any refs to Macs) from the question. –  Barnabas Szabolcs Jan 1 '13 at 22:48
    
Works in Windows 7, at least, I get an empty line between paragraphs. –  Torbjørn T. Jan 1 '13 at 23:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.