# How to remove default line spacing

I have a weird problem with my latex system. I compiled my latex code with the following document definition

\documentclass[a4paper, 10pt]{article}


But the result is too much white space between two consecutive lines. What else should I do to get no spacing?

-

## migrated from stackoverflow.comNov 21 '11 at 18:03

This question came from our site for professional and enthusiast programmers.

Could it be, that you are using a template that already uses setspace with either option onehalfspacing or twohalfspacing or the command \onehalfspacing or \twohalfspacing at the preamble? –  Schweinebacke Nov 21 '11 at 18:17
If this has not solved your problem, you should compose a MWE that illustrates the problem including the \documentclass and the appropriate packages. Personally, I have often solved my own problems in the process of reducing the amount of code actually required to reproduce the problem. –  Peter Grill Nov 21 '11 at 21:01

As pointed out by Werner that should not be the case. So, without a small example MWE that illustrates the specific issue, it is hard to know what the exact problem is. One possibility is that you are concerned about the spacing between consecutive display math environments as in:

\documentclass[a4paper,10pt]{article}
\begin{document}
$x=y$
$z=y$
$u=x$
\end{document}​


If so, then you should restructure to not use consecutive display math environments. See Uneven vertical spacing displaymath for a discussion on why.

-

This should not be the case by default with the provided line, but perhaps some other package or command included in your preamble (or document) that modifies the \baselineskip length. For example, the following MWE:

\documentclass[a4paper,10pt]{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1-4]
\end{document}​


produces as-expected line spacing given by a 12pt (or \baselineskip) as a result of specifying a 10pt option in the document class.

Regardless, if you do want to change line spacing, it is preferred to use the setspace package. It provides commands like \singlespacing, \onehalfspacing, \doublespacing (all of which are toggles/switches, with singlespace[*], onehalfspace and doublespace environment counterparts) and \setstretch{<num>}. The file setspace.sty includes the documentation.

-

You may use LaTeX kernel command \linespread{factor} to increase or decrease line spacing. If you don't use it at the document preamble, you have to activate the change with an additional \selectfont:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
% Default baseline skip of about 1.2 of font size
\lipsum[1]


\linespread would change the line space of everything including footnotes etc. but relative to the default space.
Nevertheless I would not use less than the default \linespread{1}!