Edit Links |
FAQ /
Spacing
<< | Page list | >>
Frequently Asked Question about adjusting spacing in LyX Table of contents (hide) §1. How do I reduce the vertical space in itemize and enumerate listings?For individual lists, you'll have to do this by hand: for example, for one particular list, you can add the following LaTeX code at the beginning of the list: \setlength{\itemsep}{0mm}
The numerical parameter is an elastic distance and is added to the normal paragraph spacing (\parsep). Thus, to completely avoid spacing between items, use {-1\parsep} instead of {0mm}, and {-0.5\parsep} for half spacing. (Also, in my LyX 2.0.0, the ERT has to be inside the explanation part of the description list, so don't read "at the beginning" overly strictly.) If you want to change the spacing globally, read on:
\let\oldenumerate=\enumerate \def\enumerate{ \oldenumerate \setlength{\itemsep}{0pt} } \let\olditemize=\itemize \def\itemize{ \olditemize \setlength{\itemsep}{0pt} }
§2. How do I insert a fixed amount of horizontal space?LaTeX offers a range of predefined horizontal spaces: \enspace (1/2 em), \thinspace (1/6 em), \negthinspace (-1/6 em), \quad (1 em), \qquad (2 em), etc. An "em" is roughly the width of the letter "m" in the current font. As of version 1.4, LyX supports all these natively. You can insert them via the minibuffer, i.e. with the shortcut With LyX < 1.4, you have to insert the LaTeX commands with ERT. For customized lengths, LaTeX has the \hspace command, which takes any valid TeX length as its argument; units can be mm (millimeters), cm (centimeters), in (inches), pt (points = 1/72 inch), em (width of letter "m"), or ex (height of letter "x"). Examples: \hspace{1in}, \hspace{2.5em}, etc. This is supported natively as of LyX 1.6 (Insert→Formatting→Horizontal Space..., select Custom). In earlier versions of LyX, you have to use ERT. §3. How can I add a thin space?Is there any possibility to insert this small separating space (i.e. the latex: \,) via keyboard and without ERT? Use §4. How can I add "invisible" vertical and/or horizontal distances
More tweaking might be needed for this equation, but I think it explains the trick. There is also a \phantom{} which sets both height and width. §5. Why is Spacing: OneHalf not the same as Spacing: Custom: 1.5?Spacing OneHalf is a predefined spacing provided by the setspace package (LaTeX: \onehalfspacing). It is defined as being 1.5 * line height. So, in a document with 10pt base font size, spacing OneHalf means the line spacing is 15pt. Line spacing thereby means the empty space between the lines [leading] plus the line height. So you have a leading of 5pt in this case. However, spacing Single (LaTeX: \singlespacing) does not mean 1 * line height. If it would, there would be zero leading, and the lines would just sit on top of each other, which would obviously result in unreadable text. Single spacing is usually ca. 1.2 * line height (the precise value depends on the font size). This means, consequently, that OneHalf is not 1.5 * Single, but rather ca. 1.2 * Single (again, depending on the font size). The custom value, as opposed to that, is a real multiplicator of Single. So if you want a line spacing value of 1.5 * singlespacing, use line spacing "Custom: 1.5". Confused? Blame the author of the setspace package ;-) << | FAQ.PageList | >> |