[Tex/LaTex] How to increase space/indentation of lists like labels and enumerations in LyX

indentationlyxspacing

When I use a label, it leaves a default space between the label and the following text.

I want to increase this horizontal space/indentation by a lot more in LyX, but I'm not sure how to do that.

Just to clarify, I'd really like to do this on LyX and not LaTeX.

Best Answer

Adjusting anything with regards to the lyxlist environment globally would have to be done using a Document > Settings... > Local Layout. The following layout was copied verbatim from stdlyxlist.inc:

Format 49

Style Labeling
  Category              List
  Margin                Manual
  LatexType             List_Environment
  LatexName             lyxlist
  NextNoindent          1
  LabelSep              xxx
  ParSkip               0.4
  TopSep                0.7
  BottomSep             0.7
  ParSep                0.5
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Manual
  LabelString           "00.00.0000"
  HTMLTag               ol
  HTMLAttr              class='lyxlist'
  HTMLItem              li
  HTMLLabel             span
  HTMLLabelAttr         class='lyxlist'

  #define the environment lyxlist
  Preamble
    \newenvironment{lyxlist}[1]
      {\begin{list}{}
        {\settowidth{\labelwidth}{#1}
         \setlength{\leftmargin}{\labelwidth}
         \addtolength{\leftmargin}{\labelsep}
         \renewcommand{\makelabel}[1]{##1\hfil}}}
      {\end{list}}
  EndPreamble

  HTMLStyle
    ol.lyxlist {
      list-style-type: none;
    }
    li.labeling_item {
      text-indent: -5em;
      margin-left: 5em;
    }
    span.lyxlist {
      margin-right: 1em;
    }
  EndHTMLStyle
End

Note the LabelString set to 00.00.0000 by default. Change this to any string that would be long enough to suit your needs and you'll see the corresponding Labeling lists in LyX change their so-called "label sep". You may have to temporarily switch the list to something else and back again in order to see the effect.

The above changes things on the LyX side (in the display). For a global change on LaTeX's side, you'll have to add content to the lyxlist environment definition. For example:

  #define the environment lyxlist
  Preamble
    \newenvironment{lyxlist}[1]
      {\begin{list}{}
        {\settowidth{\labelwidth}{#1}
         \setlength{\leftmargin}{\labelwidth}
         \setlength{\labelsep}{5em}% Change this to suit your needs
         \addtolength{\leftmargin}{\labelsep}
         \renewcommand{\makelabel}[1]{##1\hfil}}}
      {\end{list}}
  EndPreamble
Related Question