[Tex/LaTex] linespacing without packages

line-spacing

I want to be sure that I understood this command as it was meant:

  • the `\linespread` command offers just two values: 1.6 (two blank lines) and 1.3 (1 1/2 blank lines)
  • set in the preamble, it affects the whole document
  • to limit this to just an area, I must use:
\linespread{value}\selectfont   % sets (new) value for extra vertical space between lines
text input words input text
\linespread{1}\selectfont   % resets to value set in preamble OR default level

So here my questions:

Is there a way to set, say, a value of 0.2 or negative values with this command, but without using extra packages?

I am right at the beginning of learning LaTeX, and want to stick to the basic commands and basic functions as long as I could before I start using packages, extensions, etc. All I could find up to now was packages, or workarounds that seem a bit far from where I am at the moment.

Best Answer

You are mistaken (and I have no idea where you got the information that \linespread only supports those two values) it supports any value (but not every value makes sense). As mentioned by @egreg there is usually more to adjust than just a linespread and packages bundle this kind of work for you and provide adequate interfaces.

However, to understand how things work, consider the following small little document and look at its result:

\documentclass{article}

\newcommand\test[1]{\linespread{#1}\selectfont
This paragraph uses linespread=#1:
Some text to try out the result of linespread. A little more to have a least three lines on this measure. 
Finish off with a paragraph end so that linebreaking happens.\par\bigskip}

\begin{document}

\test{1}
\test{2}

\linespread{1}\selectfont % reset

{\itshape Going very small means that the baselineskip might become smaller than the text height, but by default a different mechanism will then kick in and keep the lines apart by a minimum of \verb=\lineskip= so nothing overlaps here not even with -1.}

\bigskip

\test{0.5}
\test{0.1}
\test{-1}

{\itshape But if we disable \LaTeX{} setting that keeps lines apart then we get overlaps. Or even a reversal of lines.}

\setlength\lineskiplimit{-1000pt} % allow boxes to overlap by this much

\bigskip

\test{0.5}

\vspace{1cm} % extra space to see what's happening

\test{0.1}

\vspace{1.5cm} % extra space to see what's happening

\test{-1}  % this is now reversed
\end{document}

If you run this you will get:

enter image description here

The result of the negative value (and already the small values) is funny, but one needs to realize what happens here: The typesetting position is at the baseline of the last text line of the paragraph when it is finished, which is not the bottom line of the page. This is the reason why I had to add these extra \vspace commands to jump over text already typeset so this is not really useful at all.

Related Question