4

I like to use lists to structure my ideas before writing them down. To organize these notes it is very convenient to have shortcuts to exchange and change the level of indentation (just as in Emacs Orgmode). Lyx can do this.

Unfortunately the vertical space between the items in the UI is quite large, so it takes up too much space and is a little confusing to look at. Is there any way to reduce the amount of vertical space between these items in the UI? (preferably to a single space)

Just for clarification: I'm not interested to modify the vertical space in the output document, but the way the items are displayed in the Lyx UI.

  • 1
    Yes this is possible. You would need to modify the correct files in lib/layouts. As for how to modify them you would need to read the part about layouts in Help > Customization. – scottkosty Nov 25 '15 at 23:58
  • Thank you Scott. The customization of the layouts seems to be quite a rich chapter and I'm not entirely sure how to boil it down. So any additional information regarding which files (no need for modules, right?) or parameters to modify would still be quite helpful. – stats-hb Nov 30 '15 at 14:50
  • I can try to take a look for how to do it if: 1. you read through Help > Customization and take a guess for which tag we need to use. Do not worry if you don't understand everything. Just look for tags that have to do with spacing. 2. you make a minimal example .lyx file and a PDF file and you indicate (e.g. by drawing on the PDF file) exactly which space you would like to decrease. Read here for information on how to create a minimal .lyx file: wiki.lyx.org/FAQ/MinimalExample – scottkosty Nov 30 '15 at 20:34
  • Just a note that the question was cross-posted here: mail-archive.com/lyx-devel@lists.lyx.org/msg191054.html – scottkosty Dec 1 '15 at 23:14
4

Short answer

In Document settings ▷ Local layout, add the following lines:

Style Itemize
  ItemSep 0
  ParSep 0
End
Style Enumerate
  ItemSep 0
  ParSep 0
End

Then click Validate, Convert to latest format, and Apply.

General answer

This sort of question pops up frequently, so I would like to outline a general method that does not require the user to read the whole Customization manual. In LyX it is easy to do this kind of customization of screen elements:

  1. Locate the definition of the element you want to change. For instance here it is the Itemize and Enumerate styles in layouts/stdlists.inc in LyX's installation directory. Other elements will generally be defined in other files of the layouts directory.
  2. Try to change values or add new desired properties in the corresponding style in the Local Layout. It is possible to only change or add desired values of a style with the syntax Style … End as in the example above (for instance here by looking at the original definition I saw that I wanted to change the value of ItemSep). The Local Layout tab makes it easy to do so by trial-and-error (for instance I found that setting ItemSep 0 was not enough so I further tried and also set ParSep 0).

Optionally, the local layout can be then made into a module to avoid doing copy-paste across documents, and for this you should refer to the Customization manual.

  • And by setting 'TopSep' and 'BottomSep' to 0 as well I got the desired close spacing for indented items also. – stats-hb Dec 3 '15 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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