I am trying to keep an equation together with some other descriptive paragraphs, so I put them inside a minipage so that they do not as easily break across pages. However, even though I used \textwidth, the whole text block seems to shift to the right. Because I get an overfull hbox warning, I suspect that in fact the minipage has some internal padding to accommodate the equation number, which leads to the added with.
How can I have it so that the minipage, and the equation and text inside it, simply follow the flow of the rest of the text? (Also there is vertical space between the first line of the paragraph in the minipage and the rest, I am not sure what is causing that.)
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{minipage}{\textwidth}
\vspace{\baselineskip}
\begin{equation}\label{0-eq:mwg-formula}
cross_{MWG} = \frac{1}{4} \cdot mn (m-1)(n-1)
\end{equation}
\vspace{\baselineskip}
\lipsum[3]
\end{minipage}
\end{document}

\noindentjust before\begin{minipage}. – Bernard Mar 25 '21 at 09:57minipageis a box so it's just being indented, you should put a\noindentbefore it. However, I don't quite know what you are trying to do with the\vspace, that cannot possibly be your desired output (and you've got also a spurious space). – campa Mar 25 '21 at 09:58\vspaces provided you use\begin{minipage}[t]{\linewidth}. – campa Mar 25 '21 at 10:07\parindent, unless you explicily say you don't want one. – Bernard Mar 25 '21 at 10:09