# remove Spacing between lines

I am new at lyx. i have a document that i want to remove all the Spaces between lines. The goal is that the page will be compressed as much as possible. Attached part of the document. if you can halp me, I tried to look for solution but can't find a solution that works.

• \baselineskip=0pt – David Carlisle Feb 14 '17 at 20:29
• \rule{1in}{1in}: all pixels of the page compressed to a square. ;-) – Heiko Oberdiek Feb 14 '17 at 20:35
• \offinterlineskip that disables the normal line spacing with \baselineskip and also sets \lineskip to zero. – Heiko Oberdiek Feb 14 '17 at 20:37
• I try to catch it in the document - Settings - LATEX but it brings me error: \ baselineskip, \ Lineskip: missing number, treaed as zero... – Kobi Hazan Feb 15 '17 at 20:39

A) Document > Setings ... > Text layout >

1. Set Vertical Space in Paragraph separation to Custom and 0 pt.
2. Set Line spacing to Single or even Custom with some value below 1.

B) Set spaces around the display mode:

\setlength\abovedisplayskip{0pt}
\setlength\belowdisplayskip{0pt}


But not in the preamble, so you will need a ERT TeX box (Ctrl+L) to insert this at some point before the first formula.

Alternatively, in the Math toolbar, change the display mode (Ctrl+Shift+H) by online mode (Ctrl+H) but if you maintain formulas at center do not use the normal center environment as this increase the vertical space. Use a ERT box with \hfil before each formula.

BTW, beside the horrible layout, it is not a good idea fix every length to 0pt as this limit LaTeX options to fit things properly. Whenever possible left some glue, like 2pt plus 1 pt minus 1 pt.