Avoid pagebreak between equation and label

I have a very long equation which barely fits into one line, but the label does not and is positioned one line below. The problem is that if the equation is at the end of a page, the label is moved to the next page.

If possible, I would like to keep the equation as is (no splitting up into two lines, no decreasing the font size), but label should always be directly below the equation.

Edit to provide further information:

Trying to construct a MWE, I think I found the cause, but still no way around. The problem occurs when using the Springer svjour3 class (http://www.springeropen.com/authors/tex) in conjunction with the amsmath package. Not loading amsmath puts the label into the same line.

Unfortunately, this seems not to be an option as I need for example \DeclareMathOperator, besides amsmath is loaded by tikz anyways.

\documentclass[twocolumn]{svjour3}

\usepackage{amsmath}

\begin{document}

\author{First Author}
\maketitle

\section{Section title}
\label{sec:1}
Some text. Some text. Some text. Some text. Some text. Some text.
\vspace{12cm}

$$a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2=c^2.$$

\end{document}

• Would you mind showing some code that gives rise to the unsatisfactory situation? – Mico Oct 27 '15 at 18:42
• by default a label won't split like that, how have you marked this up? – David Carlisle Oct 27 '15 at 18:45
• maybe you have blank line befor your equation (new paragraph). You should remove it as paragraphs don't start with equation normaly. – touhami Oct 27 '15 at 19:43
• Check out the AMS packages for math. The plain LaTeX ones aren't precisely stellar. – vonbrand Oct 27 '15 at 19:49
• @DavidCarlisle: I can reproduce the problem with article.cls, \usepackage[fleqn]{amsmath} and suitable vspace before the equation. The label is in the second column. – Ulrike Fischer Oct 28 '15 at 9:15

If you cramp up the horizontal spacing (to rather dangerously small values) then it fits:

\documentclass[twocolumn]{svjour3}

\usepackage{amsmath}

\begin{document}

\author{First Author}
\maketitle

\section{Section title}
\label{sec:1}
Some text. Some text. Some text. Some text. Some text. Some text.
\vspace{12cm}

$$\medmuskip=0mu \thickmuskip=1mu a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2=c^2.$$

\end{document}


Alternatively if you want the same layout, but in an unbreakable unit, you can use a minipage

\noindent
\begin{minipage}{\linewidth}
$$a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2+a^2+b^2=c^2.$$
\end{minipage}

• Thank you very much for the suggestion. This would definitely avoid the equation and the label being split up. If possible, I am looking for a solution where the original equation stays untouched and the label is in the next line below (just not on another page). – jpmath Oct 28 '15 at 10:19
• @jpmath \noindent\begin{minipage}{\linewidth}... ? – David Carlisle Oct 28 '15 at 10:33
• That does it! If you like to edit this into your answer, I will gladly accept it. – jpmath Oct 28 '15 at 11:18
• @jpmath updated – David Carlisle Oct 28 '15 at 11:23