# Change line spacing of \\

I have a block of text:

Blah: \\
line1 \\
line2 \\
line3 \\
Blah.


I want to change the line spacing between lines 1-3 only. But somehow I cannot do that with \linespread{} or \setstretch{} -- the line spacing created by \\ seems to be unaffected by those commands. What can I do?

• In which context are you using those manual line breaks? You could use the optional argument, as in \\[-5pt] or \\[15pt], but if you tell us the real-case use at hand, perhaps we could suggest better alternatives? – Gonzalo Medina Aug 10 '15 at 0:32
• With \\[<amount of vertical space>]. For example \\[3pt] ? – Zarko Aug 10 '15 at 0:35
• Yes, that solves the problem beautifully. – Yan King Yin Aug 10 '15 at 0:41
• I was trying to inline some code in a literary work. Don't want to invoke the algorithms package :) – Yan King Yin Aug 10 '15 at 0:41

I would have a look on the package listings if you want to add code to your text.

For your example, you may use any addition of vertical space as mentioned here: https://tex.stackexchange.com/a/41488

Here are some examples:

% arara: pdflatex

\documentclass{article}

\begin{document}
\noindent
Blah: \\[1cm]
line1 \medskip\\ % or smallskip or bigskip
line2 \vspace{1cm}\\
line3 \\
Blah.
\end{document}