# LyX: Vertical spacing only some lines in a paragraph/ only the inline formulas

I have the following problem in LyX: I get many paragraphs with awfully long in-line formulas, which by multi-lining come to be vertically adjacent. The aesthetic effect is quite awful, so I would like to put some space between the lines which contain the equations... How can I do it without changing the vertical spacing of the whole paragraph?

Edit: Sorry, here some example (thought in Lyx it looks worse than in pdflatex)

\documentclass[english]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{babel}
\begin{document}
Choosing the words here because I want to write a long line so that I can verify my hypotesis about how to introduce a proper spacing between only some lines of a given paragraph $k_{x}\rightarrow k_{x}+\frac{z}{l^{2}}$ And then I have: $H_{2x2}=\frac{E_{g}}{2}+Q-\frac{\hbar^{2}}{2}\frac{\partial}{\partial z}\frac{1}{m_{3}}\frac{\partial}{\partial z}+\frac{\hbar^{2}}{2}\frac{1}{m_{1}}(k_{x}+\frac{z}{l^{2}})^{2}+\frac{\hbar^{2}}{2}\frac{1}{m_{2}}k_{y}^{2}+H_{R}+P_{\parallel}P_{\perp}(\frac{\partial}{\partial z}\gamma)(\cos^{2}\theta+r\sin^{2}\theta)\frac{z}{l^{2}}\sigma_{y}-P_{\parallel}P_{\perp}(\frac{\partial}{\partial z}\gamma)\sin\theta\cos\theta(1-r)\frac{z}{l^{2}}\sigma_{z} +\cos\theta\frac{1}{2}\mu_{o}\overline{g_{t}}B_{y}\sigma_{y}-\sin\theta\frac{1}{2}\mu_{0}\overline{g_{t}}B_{y}\sigma_{z}+$$\cos^{2}\theta P_{\parallel}P_{\perp}\overline{\gamma}\frac{1}{l^{2}}\sigma_{y}-\sin\theta\cos\theta P_{\parallel}P_{\perp}\overline{\gamma}\frac{1}{l^{2}}\sigma_{z}+\sin\theta\cos\theta P_{\perp}^{2}\overline{\gamma}\frac{1}{l^{2}}\sigma_{z}+\sin^{2}\theta P_{\perp}^{2}\overline{\gamma}\frac{1}{l^{2}}\sigma_{y}$ some other text that goes on further and I can continue and so on...
\end{document}


$..math..$\vspace{2pt} text...


will put 2pt of space after the line on which the math ends. Of if they are really that long it may be better to use

text...text
\begin{center}
$long wrapping math$
\end{center}
more text


You added an example. I think that would be completely unreadable even with space added. You need to make that display math, perhaps:

\documentclass[english]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{babel}
\begin{document}
Choosing the words here because I want to write a long line so that I can verify my hypotesis about how to introduce a proper spacing between only some lines of a given paragraph $k_{x}\rightarrow k_{x}+\frac{z}{l^{2}}$ And then I have:
\begin{multline}
H_{2x2}={}\\
\frac{E_{g}}{2}+Q-{}\\
\frac{\hbar^{2}}{2}\frac{\partial}{\partial z}\frac{1}{m_{3}}\frac{\partial}{\partial z}+{}\\
\frac{\hbar^{2}}{2}\frac{1}{m_{1}}(k_{x}+\frac{z}{l^{2}})^{2}+{}\\
\frac{\hbar^{2}}{2}\frac{1}{m_{2}}k_{y}^{2}+H_{R}+{}\\
P_{\parallel}P_{\perp}(\frac{\partial}{\partial z}\gamma)(\cos^{2}\theta+r\sin^{2}\theta)\frac{z}{l^{2}}\sigma_{y}-{}\\
P_{\parallel}P_{\perp}(\frac{\partial}{\partial z}\gamma)\sin\theta\cos\theta(1-r)\frac{z}{l^{2}}\sigma_{z} +{}\\
\cos\theta\frac{1}{2}\mu_{o}\overline{g_{t}}B_{y}\sigma_{y}-{}\\
\sin\theta\frac{1}{2}\mu_{0}\overline{g_{t}}B_{y}\sigma_{z}+{}\\
\cos^{2}\theta P_{\parallel}P_{\perp}\overline{\gamma}\frac{1}{l^{2}}\sigma_{y}-{}\\
\sin\theta\cos\theta P_{\parallel}P_{\perp}\overline{\gamma}\frac{1}{l^{2}}\sigma_{z}+{}\\
\sin\theta\cos\theta P_{\perp}^{2}\overline{\gamma}\frac{1}{l^{2}}\sigma_{z}+{}\\
\sin^{2}\theta P_{\perp}^{2}\overline{\gamma}\frac{1}{l^{2}}\sigma_{y}
\end{multline}
some other text that goes on further and I can continue and so on...
\end{document}

• Thanks for the vspace, looks like a good advice.... Am I wrong or the center makes the equation not in-line (and is not easily written in Lyx?) May 1, 2013 at 16:21
• I assume that you wanted long inline math so that it would linebreak and using single \$ in center is inline math to TeX and will automatically break. It does of course have a forced line break and some above and below. Otherwise why do you want inline math rather than display math? May 1, 2013 at 16:32