# How to squeeze a formula inside a text in latex?

I type some formula in latex inside my text, but When I make it pdf I see it is not squeezed. How I can make it squeeze? See the attached, which shows the problem!

-
please provide a minimum example of the problem: your output is pretty strange, to one used to writing latex, so we really need to see what you wrote to produce it. – wasteofspace Jun 16 '14 at 11:50
Welcome to TeX.SX. As wasteofspace mentioned, it is difficult to guess why your out put is the way it is. Click here to see what a minimal working example (MWE) is. – Pouya Jun 16 '14 at 11:52
Hi, Welcome to TeX.SE. Also explain what you mean with squeezing. Horizontally or vertically? For inline math, you should use $R_1...$ and you should not use manually adjusted parentheses, when they are getting that big. – LaRiFaRi Jun 16 '14 at 11:52

## 1 Answer

In justified paragraphs TeX tries to fill the lines. But it is very difficult, if the line contain large chunks of unbreakable stuff. Then the remaining stretchable spaces are stretched and TeX gives a Underfull \hbox warning.

TeX can break inline math at binary and relational operators unless they are inside a subformula. Curly braces or \left and \right form a subformula that is unbreakable and spaces cannot stretch or shrink as in \mbox.

The following code uses \big instead of \left and \right (but in this case also normal sized parentheses could be used):

\documentclass{article}
\begin{document}
\begin{minipage}{80mm}
where $R_1 = n_1\left(a_e(c_{45} + b_{60}) + F_{80}\right)$,
$P_1 = n_e(m_0 d_{61} + b_2 c_{21}) + n_2 A_{61}$,
$N_2 = n_2\left(n_c(c_{61} + c_{60}) + G_{21}\right)$,
and $P_2 = n_e(a_0 c_{62} + b_1 c_{62})$.
\end{minipage}

\bigskip
\begin{minipage}{80mm}
where $R_1 = n_1\big(a_e(c_{45} + b_{60}) + F_{80}\big)$,
$P_1 = n_e(m_0 d_{61} + b_2 c_{21}) + n_2 A_{61}$,
$N_2 = n_2\big(n_c(c_{61} + c_{60}) + G_{21}\big)$,
and $P_2 = n_e(a_0 c_{62} + b_1 c_{62})$.
\end{minipage}
\end{document}


However the readability of such large amount of inline math is rather poor. I would use displayed equation environments if the place allows it, e.g.:

\documentclass{article}
\usepackage{amsmath}
\setlength{\textwidth}{80mm}
\begin{document}
\begin{align*}
% ...
\intertext{where}
R_1 & = n_1\left(a_e(c_{45} + b_{60}) + F_{80}\right),\\
P_1 & = n_e(m_0 d_{61} + b_2 c_{21}) + n_2 A_{61},\\
N_2 & = n_2\left(n_c(c_{61} + c_{60}) + G_{21}\right)\text{, and}\\
P_2 & = n_e(a_0 c_{62} + b_1 c_{62}).\\
\intertext{or without punctuation, where}
R_1 & = n_1\left(a_e(c_{45} + b_{60}) + F_{80}\right)\\
P_1 & = n_e(m_0 d_{61} + b_2 c_{21}) + n_2 A_{61}\\
N_2 & = n_2\left(n_c(c_{61} + c_{60}) + G_{21}\right)\\
P_2 & = n_e(a_0 c_{62} + b_1 c_{62})\\
\end{align*}
\end{document}


-