Latex: how to make some text and an equation inseparable?
-
13-11-2019 - |
Pergunta
I mean, I want something like this:
.... bla blabla, the equation is:
\begin{equation}
...
\end{equation}
And I want to finally render the text and the equation together, that is, no page breaks, no figure/whatever else breaks. They have to be inseparable.
How can I do this?
Solução
Make sure that they belong to the same paragraph:
.... bla blabla, the equation is:
%
\begin{equation}
...
\end{equation}
The percent sign is the important thing here because it prevents a paragraph end. Since \predisplaypenalty
is 10000 by default, the last line of the text will always be on the same page as the equation.
Outras dicas
You could probably adapt the solution proposed in tex.stackexchange.com for lists.
Basically, instead of using a \par
between your text and the equation, use a custom \par
that prevents pagebreak.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow